* config/i386/i386.c (ix86_expand_prologue): If the function uses a
frame pointer, restore eax with an ebp-relative address.
From-SVN: r85595
+2004-08-05 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/i386/i386.c (ix86_expand_prologue): If the function uses a
+ frame pointer, restore eax with an ebp-relative address.
+
2004-08-04 Geoffrey Keating <geoffk@apple.com>
PR 14516
if (eax_live)
{
- rtx t = plus_constant (stack_pointer_rtx, allocate);
+ rtx t;
+ if (frame_pointer_needed)
+ t = plus_constant (hard_frame_pointer_rtx,
+ allocate
+ - frame.to_allocate
+ - frame.nregs * UNITS_PER_WORD);
+ else
+ t = plus_constant (stack_pointer_rtx, allocate);
emit_move_insn (eax, gen_rtx_MEM (SImode, t));
}
}
+2004-08-05 Richard Sandiford <rsandifo@redhat.com>
+
+ * gcc.c-torture/execute/20040805-1.c: New test.
+
2004-08-04 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.dg/20020118-1.c: Declare abort.
--- /dev/null
+#if __INT_MAX__ < 32768 || (defined(STACK_SIZE) && STACK_SIZE < 0x12000)
+int main () { exit (0); }
+#else
+int a[2] = { 2, 3 };
+
+static int __attribute__((noinline))
+bar (int x, void *b)
+{
+ a[0]++;
+ return x;
+}
+
+static int __attribute__((noinline))
+foo (int x)
+{
+ char buf[0x10000];
+ int y = a[0];
+ a[1] = y;
+ x = bar (x, buf);
+ y = bar (y, buf);
+ return x + y;
+}
+
+int
+main ()
+{
+ if (foo (100) != 102)
+ abort ();
+ exit (0);
+}
+#endif