[Bug c/41184] wrong optimise code, epilogue code adjust wrong rsp before pop

ktietz at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Aug 29 12:33:00 GMT 2009



------- Comment #5 from ktietz at gcc dot gnu dot org  2009-08-29 12:33 -------
This bug is reasoned by ix86_expand_epilogue. At one place frame.padding0
wasn't added to pro_epilogue_adjust_stack.

Following patch fixes this. It has to applied to 4.4 branch, too.

I'll post it to ML
Index: gcc/gcc/config/i386/i386.c
===================================================================
--- gcc.orig/gcc/config/i386/i386.c     2009-08-27 15:04:03.000000000 +0200
+++ gcc/gcc/config/i386/i386.c  2009-08-29 14:24:32.750680900 +0200
@@ -8949,7 +8949,7 @@
                                                frame.to_allocate, red_offset,
                                                style == 2);
          pro_epilogue_adjust_stack (stack_pointer_rtx, stack_pointer_rtx,
-                                    GEN_INT (frame.nsseregs * 16),
+                                    GEN_INT (frame.nsseregs * 16 +
frame.padding0),
                                     style, false);
        }
       else if (frame.to_allocate || frame.nsseregs)


-- 

ktietz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu dot
                   |                            |org
         AssignedTo|unassigned at gcc dot gnu   |ktietz at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-29 12:33:43
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41184



More information about the Gcc-bugs mailing list