This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch i386]: Fix recent bootstrap failure for x86_64 windows target


Hello,

recently we got a bootstrap failure in libfortran's transfer.c:sset
function.  This is caused by optimizing alloca into prologue.  This
can cause for x64 with SEH to too large prologue-frame-size for SEH
information.
This patch simply assumes that iff the function is using an alloca
call, then we should set frame's hard_frame_pointer_offset to its
current  stack_pointer_offset (minus 128 delta for smaller common
stack-address ranges).

ChangeLog

2011-08-04  Kai Tietz  <ktietz@redhat.com>

        * config/i386/i386.c (ix86_compute_frame_layout): Adjust
hard_frame_pointer_offset
        if function uses alloca.

Regression test in progress. Ok for apply after successful test?

Regards,
Kai


Index: i386.c
===================================================================
--- i386.c      (revision 177412)
+++ i386.c      (working copy)
@@ -8860,7 +8860,7 @@

       /* If we can leave the frame pointer where it is, do so.  */
       diff = frame->stack_pointer_offset - frame->hard_frame_pointer_offset;
-      if (diff > 240 || (diff & 15) != 0)
+      if (diff > 240 || (diff & 15) != 0 || cfun->calls_alloca != 0)
        {
          /* Ideally we'd determine what portion of the local stack frame
             (within the constraint of the lowest 240) is most heavily used.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]