Since stack register may be in SImode for TARGET_64BIT, this patch
checks Pmode to adjust stack in proper mode.  OK for trunk?


2012-03-02  H.J. Lu  <hongjiu...@intel.com>

        * config/i386/i386.c (pro_epilogue_adjust_stack): Check Pmode
        instead of TARGET_64BIT.

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 67aaaea..191c8b5 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -9304,7 +9304,7 @@ pro_epilogue_adjust_stack (rtx dest, rtx src, rtx offset,
   rtx insn;
   bool add_frame_related_expr = false;
-  if (! TARGET_64BIT)
+  if (Pmode == SImode)
     insn = gen_pro_epilogue_adjust_stack_si_add (dest, src, offset);
   else if (x86_64_immediate_operand (offset, DImode))
     insn = gen_pro_epilogue_adjust_stack_di_add (dest, src, offset);

Reply via email to