diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2009-09-09 19:05:55 +0000 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2009-09-09 21:05:55 +0200 |
commit | 3d887721064c855f5743b0d8884642b39b44c9ab (patch) | |
tree | 876bf740a262ab2d54b2c43de9af012546f64013 | |
parent | 80a76d1d753b3b36b45f28901cdc7a886d6a808b (diff) | |
download | gcc-3d887721064c855f5743b0d8884642b39b44c9ab.zip gcc-3d887721064c855f5743b0d8884642b39b44c9ab.tar.gz gcc-3d887721064c855f5743b0d8884642b39b44c9ab.tar.bz2 |
i386.c (ix86_can_use_return_insn_p): Check for padding0, too.
2009-09-09 Kai Tietz <kai.tietz@onevision.com>
PR/41315
* config/i386.c (ix86_can_use_return_insn_p): Check for
padding0, too.
(ix86_expand_prologue): Take frame.padding0 into logic of
to_allocate checks.
(ix86_expand_epilogue): Likewise.
From-SVN: r151570
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 16 |
2 files changed, 18 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 668caa2..6546694 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2009-09-09 Kai Tietz <kai.tietz@onevision.com> + + PR/41315 + * config/i386.c (ix86_can_use_return_insn_p): Check for + padding0, too. + (ix86_expand_prologue): Take frame.padding0 into logic of + to_allocate checks. + (ix86_expand_epilogue): Likewise. + 2009-09-09 Jakub Jelinek <jakub@redhat.com> * config/t-slibgcc-elf-ver (SHLIB_MAKE_SOLINK, SHLIB_INSTALL_SOLINK): diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index ccb5e2f..f8d77dd 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -7441,7 +7441,8 @@ ix86_can_use_return_insn_p (void) return 0; ix86_compute_frame_layout (&frame); - return frame.to_allocate == 0 && (frame.nregs + frame.nsseregs) == 0; + return frame.to_allocate == 0 && frame.padding0 == 0 + && (frame.nregs + frame.nsseregs) == 0; } /* Value should be nonzero if functions must have frame pointers. @@ -8482,7 +8483,7 @@ ix86_expand_prologue (void) && (! TARGET_STACK_PROBE || allocate < CHECK_STACK_LIMIT))) { if (!frame_pointer_needed - || !frame.to_allocate + || !(frame.to_allocate + frame.padding0) || crtl->stack_realign_needed) ix86_emit_save_regs_using_mov (stack_pointer_rtx, frame.to_allocate @@ -8492,7 +8493,7 @@ ix86_expand_prologue (void) -frame.nregs * UNITS_PER_WORD); } if (!frame_pointer_needed - || !frame.to_allocate + || !(frame.to_allocate + frame.padding0) || crtl->stack_realign_needed) ix86_emit_save_sse_regs_using_mov (stack_pointer_rtx, frame.to_allocate); @@ -8804,9 +8805,10 @@ ix86_expand_epilogue (int style) if ((!sp_valid && (frame.nregs + frame.nsseregs) <= 1) || (TARGET_EPILOGUE_USING_MOVE && cfun->machine->use_fast_prologue_epilogue - && ((frame.nregs + frame.nsseregs) > 1 || frame.to_allocate)) + && ((frame.nregs + frame.nsseregs) > 1 + || (frame.to_allocate + frame.padding0) != 0)) || (frame_pointer_needed && !(frame.nregs + frame.nsseregs) - && frame.to_allocate) + && (frame.to_allocate + frame.padding0) != 0) || (frame_pointer_needed && TARGET_USE_LEAVE && cfun->machine->use_fast_prologue_epilogue && (frame.nregs + frame.nsseregs) == 1) @@ -8822,7 +8824,7 @@ ix86_expand_epilogue (int style) be addressed by bp. sp must be used instead. */ if (!frame_pointer_needed - || (sp_valid && !frame.to_allocate) + || (sp_valid && !(frame.to_allocate + frame.padding0)) || stack_realign_fp) { ix86_emit_restore_sse_regs_using_mov (stack_pointer_rtx, @@ -8952,7 +8954,7 @@ ix86_expand_epilogue (int style) GEN_INT (frame.nsseregs * 16 + frame.padding0), style, false); } - else if (frame.to_allocate || frame.nsseregs) + else if (frame.to_allocate || frame.padding0 || frame.nsseregs) { ix86_emit_restore_sse_regs_using_mov (stack_pointer_rtx, frame.to_allocate, red_offset, |