From: ktietz Date: Mon, 21 Sep 2009 13:24:37 +0000 (+0000) Subject: 2009-09-21 Kai Tietz X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=1f3263152a2227a0d09b2e2f1db5e7b5d0d2b596 2009-09-21 Kai Tietz * config/i386/i386.c (ix86_expand_epilogue): Adjust offset for xmm register restore. 2009-09-21 Kai Tietz * gcc.dg/torture/calleesave-sse.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151918 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83b4fc37e10..9dbabcd1256 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-09-21 Kai Tietz + + * config/i386/i386.c (ix86_expand_epilogue): Adjust offset for + xmm register restore. + 2009-09-21 Jan Hubicka * dwarf2out.c (decl_loc_table_eq): Allow decl_loc_table to be NULL. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 3d907c04e1d..335a5260bd1 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8916,7 +8916,7 @@ ix86_expand_epilogue (int style) hard_frame_pointer_rtx, GEN_INT (offset), style, false); ix86_emit_restore_sse_regs_using_mov (stack_pointer_rtx, - frame.to_allocate, red_offset, + 0, red_offset, style == 2); pro_epilogue_adjust_stack (stack_pointer_rtx, stack_pointer_rtx, GEN_INT (frame.nsseregs * 16 + frame.padding0), diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e676b08e15d..89f787a2e12 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-09-21 Kai Tietz + + * gcc.dg/torture/calleesave-sse.c: New. + 2009-09-21 Jan Hubicka * gcc.dg/guality/inline-params.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/torture/calleesave-sse.c b/gcc/testsuite/gcc.dg/torture/calleesave-sse.c new file mode 100644 index 00000000000..292791c7259 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/calleesave-sse.c @@ -0,0 +1,43 @@ +/* { dg-do run } */ +/* { dg-options "-fno-omit-frame-pointer" } */ + +#define alloca __builtin_alloca +extern void abort (void); + +__attribute__ ((noinline)) static double +bar (double a, double b, double c, double d, char *h) +{ + *h = 0; + return a * b + b + c; +} + +__attribute__ ((noinline)) static int +boo (double a, double b, double c, double d) +{ + return c * b + a + b; +} + +__attribute__ ((noinline)) static double +foo (double a, double b, double c, double d) +{ + int aa = boo (b, c, d, a); + return bar (a, b, c, d, (char *) alloca (aa)) + + bar (d, c, b, a, (char *) alloca (aa)); +} + +int main () +{ + double a = 2.0, b = 3.0, c = 4.0, d = 5.0; + double r1, r2; + int aa; + + aa = boo (b, c, d, a); + r1 = bar (a, b, c, d, (char *) alloca (aa)) + + bar (d, c, b, a, (char *) alloca (aa)); + r2 = foo (a, b, c, d); + + if (r1 != r2) + abort (); + return 0; +} +