Author: zoltan
Date: 2005-04-17 13:29:23 -0400 (Sun, 17 Apr 2005)
New Revision: 43148
Modified:
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/cpu-pentium.md
trunk/mono/mono/mini/mini-x86.c
Log:
2005-04-17 Zoltan Varga <[EMAIL PROTECTED]>
* mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated
area not
just the last bytes.
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2005-04-17 16:38:21 UTC (rev 43147)
+++ trunk/mono/mono/mini/ChangeLog 2005-04-17 17:29:23 UTC (rev 43148)
@@ -1,5 +1,10 @@
2005-04-17 Zoltan Varga <[EMAIL PROTECTED]>
+ * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated
area not
+ just the last bytes.
+
+2005-04-17 Zoltan Varga <[EMAIL PROTECTED]>
+
* aot.c (mono_compile_assembly): Fix warning.
* mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
Modified: trunk/mono/mono/mini/cpu-pentium.md
===================================================================
--- trunk/mono/mono/mini/cpu-pentium.md 2005-04-17 16:38:21 UTC (rev 43147)
+++ trunk/mono/mono/mini/cpu-pentium.md 2005-04-17 17:29:23 UTC (rev 43148)
@@ -269,7 +269,7 @@
ldloc:
ldloca:
stloc:
-localloc: dest:i src1:i len:80
+localloc: dest:i src1:i len:120
endfilter:
unaligned.:
volatile.:
Modified: trunk/mono/mono/mini/mini-x86.c
===================================================================
--- trunk/mono/mono/mini/mini-x86.c 2005-04-17 16:38:21 UTC (rev 43147)
+++ trunk/mono/mono/mini/mini-x86.c 2005-04-17 17:29:23 UTC (rev 43148)
@@ -2643,6 +2643,27 @@
br[2] = code; /* loop */
x86_alu_reg_imm (code, X86_SUB, X86_ESP, 0x1000);
x86_test_membase_reg (code, X86_ESP, 0, X86_ESP);
+
+ /*
+ * By the end of the loop, sreg2 is smaller than 0x1000, so the
init routine
+ * that follows only initializes the last part of the area.
+ */
+ /* Same as the init code below with size==0x1000 */
+ if (tree->flags & MONO_INST_INIT) {
+ x86_push_reg (code, X86_EAX);
+ x86_push_reg (code, X86_ECX);
+ x86_push_reg (code, X86_EDI);
+ x86_mov_reg_imm (code, X86_ECX, (0x1000 >> 2));
+ x86_alu_reg_reg (code, X86_XOR, X86_EAX, X86_EAX);
+ x86_lea_membase (code, X86_EDI, X86_ESP, 12);
+ x86_cld (code);
+ x86_prefix (code, X86_REP_PREFIX);
+ x86_stosl (code);
+ x86_pop_reg (code, X86_EDI);
+ x86_pop_reg (code, X86_ECX);
+ x86_pop_reg (code, X86_EAX);
+ }
+
x86_alu_reg_imm (code, X86_SUB, sreg, 0x1000);
x86_alu_reg_imm (code, X86_CMP, sreg, 0x1000);
br[3] = code; x86_branch8 (code, X86_CC_AE, 0, FALSE);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches