[Mono-dev] Patch: Stack alignment on x86

Zoltan Varga vargaz at gmail.com
Fri Oct 17 12:54:07 EDT 2008


Hi,

  Looks good. Why is this part needed:

+                       if (cfg->method->wrapper_type ==
MONO_WRAPPER_NATIVE_TO_MANAGED ||
+                                       cfg->method->wrapper_type ==
MONO_WRAPPER_RUNTIME_INVOKE) {
+                               x86_pop_reg (code, X86_ESP);
+                       }

Those wrappers are never called from managed code.

               Zoltan

2008/10/17 Mark Probst <mark.probst at gmail.com>:
> Hi,
>
> This patch aligns the stack in managed code on x86 to 16 bytes on all
> platforms, not only on Darwin, as done (incompletely) previously.  In
> addition the alignment can now be specified by a #define.
>
> The reason for this patch is that floating point code that uses doubles
> performs poorly if the stack (and thus the local variables) is not
> aligned to at least 8 bytes.
>
> Paolo: Please review.
>
> Mark
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>


More information about the Mono-devel-list mailing list