--- mono/mini/mini-amd64.c	2009-03-19 21:08:18 UTC (rev 129824)
+++ mono/mini/mini-amd64.c	2009-03-19 21:09:53 UTC (rev 129825)
@@ -1009,7 +1009,7 @@
 		locals_size += mono_type_size (ins->inst_vtype, &ialign);
 	}
 
-	if ((cfg->num_varinfo > 10000) || (locals_size >= (1 << 15))) {
+	if ((cfg->num_varinfo > 5000) || (locals_size >= (1 << 15)) || (header->code_size > 110000)) {
 		/* Avoid hitting the stack_alloc_size < (1 << 16) assertion in emit_epilog () */
 		cfg->arch.omit_fp = FALSE;
 	}