diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-01-21 16:53:31 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2002-01-21 16:53:31 +0100 |
commit | 0333394edfb117c6a3b599dcc9c20ae872a2b0be (patch) | |
tree | b5b862995df2efeb1772947bacfcb44a7e1ae43a | |
parent | e9d1b155fc792949cbee6234b4628340f923fd3b (diff) | |
download | gcc-0333394edfb117c6a3b599dcc9c20ae872a2b0be.zip gcc-0333394edfb117c6a3b599dcc9c20ae872a2b0be.tar.gz gcc-0333394edfb117c6a3b599dcc9c20ae872a2b0be.tar.bz2 |
i386.c (ix86_function_arg_regno_p): Never return true for 64-bit mode only SSE registers in 32-bit mode.
* config/i386/i386.c (ix86_function_arg_regno_p): Never return
true for 64-bit mode only SSE registers in 32-bit mode.
* gcc.dg/20020218-1.c: New test.
From-SVN: r49046
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/20020218-1.c | 34 |
4 files changed, 45 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b83e503..be36d31 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-01-21 Jakub Jelinek <jakub@redhat.com> + + * config/i386/i386.c (ix86_function_arg_regno_p): Never return + true for 64-bit mode only SSE registers in 32-bit mode. + 2002-01-21 Kazu Hirata <kazu@hxi.com> * unwind-dw2.c: Fix formatting. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a51990b..7eedba3 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1483,7 +1483,8 @@ ix86_function_arg_regno_p (regno) { int i; if (!TARGET_64BIT) - return regno < REGPARM_MAX || (TARGET_SSE && SSE_REGNO_P (regno)); + return (regno < REGPARM_MAX + || (TARGET_SSE && SSE_REGNO_P (regno) && !fixed_regs[regno])); if (SSE_REGNO_P (regno) && TARGET_SSE) return true; /* RAX is used as hidden argument to va_arg functions. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9fd7c57..d806caf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-01-21 Jakub Jelinek <jakub@redhat.com> + + * gcc.dg/20020218-1.c: New test. + 2002-01-21 David.Billinghurst <David.Billinghurst@riotinto.com> * lib/prune.exp (prune_gcc_output): Prune "At global scope" diff --git a/gcc/testsuite/gcc.dg/20020218-1.c b/gcc/testsuite/gcc.dg/20020218-1.c new file mode 100644 index 0000000..2887328 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20020218-1.c @@ -0,0 +1,34 @@ +/* Verify that X86-64 only SSE registers aren't restored on IA-32. */ +/* { dg-do compile { target i?86-*-* } } */ +/* { dg-options "-O2 -msse" } */ +/* { dg-final { scan-assembler-not "xmm8" } } */ + +extern void abort (void); +extern void exit (int); + +void *bar (void *p, void *q) +{ + if (p != (void *) 26 || q != (void *) 35) + abort (); + return (void *) 76; +} + +void *foo (void **args) +{ + void *argcookie = &args[1]; + + __builtin_return (__builtin_apply (args[0], &argcookie, + 2 * sizeof (void *))); +} + +int main (void) +{ + void *args[3]; + + args[0] = (void *) bar; + args[1] = (void *) 26; + args[2] = (void *) 35; + if (foo (args) != (void *) 76) + abort (); + exit (0); +} |