]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/56807 (mingw32: Conflict between stack realignment and stack probe destr...
authorKai Tietz <ktietz@redhat.com>
Tue, 10 Dec 2013 16:36:53 +0000 (17:36 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Tue, 10 Dec 2013 16:36:53 +0000 (17:36 +0100)
    PR target/56807
    * config/i386/i386.c (ix86_expand_prologue): Address saved
    registers stack-relative, not via frame-pointer.

From-SVN: r205860

gcc/ChangeLog
gcc/config/i386/i386.c

index 969aec8a06dcdc675c9c5b3488d1a7cbe934fb87..3ad6d1ca8ca65a624e1467e6d81bb7cef10f57ae 100644 (file)
@@ -1,3 +1,9 @@
+2013-12-10  Kai Tietz  <ktietz@redhat.com>
+
+       PR target/56807
+       * config/i386/i386.c (ix86_expand_prologue): Address saved
+       registers stack-relative, not via frame-pointer.
+
 2013-12-10  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/38474
index 5a75bf96ff62a8825e30ac30280a4951a071ae59..cdd63e537f098ece54cb00184d49e284224312d1 100644 (file)
@@ -10946,18 +10946,21 @@ ix86_expand_prologue (void)
        }
       m->fs.sp_offset += allocate;
 
+      /* Use stack_pointer_rtx for relative addressing so that code
+        works for realigned stack, too.  */
       if (r10_live && eax_live)
         {
-         t = choose_baseaddr (m->fs.sp_offset - allocate);
+         t = plus_constant (Pmode, stack_pointer_rtx, allocate);
          emit_move_insn (gen_rtx_REG (word_mode, R10_REG),
                          gen_frame_mem (word_mode, t));
-         t = choose_baseaddr (m->fs.sp_offset - allocate - UNITS_PER_WORD);
+         t = plus_constant (Pmode, stack_pointer_rtx,
+                            allocate - UNITS_PER_WORD);
          emit_move_insn (gen_rtx_REG (word_mode, AX_REG),
                          gen_frame_mem (word_mode, t));
        }
       else if (eax_live || r10_live)
        {
-         t = choose_baseaddr (m->fs.sp_offset - allocate);
+         t = plus_constant (Pmode, stack_pointer_rtx, allocate);
          emit_move_insn (gen_rtx_REG (word_mode,
                                       (eax_live ? AX_REG : R10_REG)),
                          gen_frame_mem (word_mode, t));