Author: zoltan Date: 2008-01-20 12:24:46 -0500 (Sun, 20 Jan 2008) New Revision: 93353
Modified: trunk/mono/mono/mini/ChangeLog trunk/mono/mono/mini/mini-amd64.c Log: 2008-01-20 Zoltan Varga <[EMAIL PROTECTED]> * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two stack slots. Modified: trunk/mono/mono/mini/ChangeLog =================================================================== --- trunk/mono/mono/mini/ChangeLog 2008-01-20 16:30:17 UTC (rev 93352) +++ trunk/mono/mono/mini/ChangeLog 2008-01-20 17:24:46 UTC (rev 93353) @@ -1,3 +1,8 @@ +2008-01-20 Zoltan Varga <[EMAIL PROTECTED]> + + * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two + stack slots. + 2008-01-18 Zoltan Varga <[EMAIL PROTECTED]> * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if Modified: trunk/mono/mono/mini/mini-amd64.c =================================================================== --- trunk/mono/mono/mini/mini-amd64.c 2008-01-20 16:30:17 UTC (rev 93352) +++ trunk/mono/mono/mini/mini-amd64.c 2008-01-20 17:24:46 UTC (rev 93353) @@ -4415,18 +4415,21 @@ } } - alloc_size = ALIGN_TO (cfg->stack_offset, MONO_ARCH_FRAME_ALIGNMENT); - - alloc_size -= pos; - - if (cfg->arch.omit_fp) + if (cfg->arch.omit_fp) { /* * On enter, the stack is misaligned by the the pushing of the return * address. It is either made aligned by the pushing of %rbp, or by * this. */ - alloc_size += 8; + alloc_size = ALIGN_TO (cfg->stack_offset, 8); + if ((alloc_size % 16) == 0) + alloc_size += 8; + } else { + alloc_size = ALIGN_TO (cfg->stack_offset, MONO_ARCH_FRAME_ALIGNMENT); + alloc_size -= pos; + } + cfg->arch.stack_alloc_size = alloc_size; /* Allocate stack frame */ _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches