diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2009-09-21 13:24:37 +0000 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2009-09-21 15:24:37 +0200 |
commit | 4b51caf2da7937a038f058455e6d287d44f519f7 (patch) | |
tree | 5c5d0e9d3727c64bf5fe7ec4d83dee9d121ccfb8 | |
parent | 5b5fba56fea9bbf4a3406fe32d52925dfe5e2f24 (diff) | |
download | gcc-4b51caf2da7937a038f058455e6d287d44f519f7.zip gcc-4b51caf2da7937a038f058455e6d287d44f519f7.tar.gz gcc-4b51caf2da7937a038f058455e6d287d44f519f7.tar.bz2 |
i386.c (ix86_expand_epilogue): Adjust offset for xmm register restore.
2009-09-21 Kai Tietz <kai.tietz@onevision.com>
* config/i386/i386.c (ix86_expand_epilogue): Adjust offset for
xmm register restore.
2009-09-21 Kai Tietz <kai.tietz@onevision.com>
* gcc.dg/torture/calleesave-sse.c: New.
From-SVN: r151918
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/calleesave-sse.c | 43 |
4 files changed, 53 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83b4fc3..9dbabcd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-09-21 Kai Tietz <kai.tietz@onevision.com> + + * config/i386/i386.c (ix86_expand_epilogue): Adjust offset for + xmm register restore. + 2009-09-21 Jan Hubicka <jh@suse.cz> * 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 3d907c0..335a526 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 e676b08..89f787a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-09-21 Kai Tietz <kai.tietz@onevision.com> + + * gcc.dg/torture/calleesave-sse.c: New. + 2009-09-21 Jan Hubicka <jh@suse.cz> * 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 0000000..292791c --- /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; +} + |