]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/30120 (silent miscompilation of argument passing)
authorUros Bizjak <ubizjak@gmail.com>
Fri, 8 Dec 2006 18:20:25 +0000 (19:20 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 8 Dec 2006 18:20:25 +0000 (19:20 +0100)
        PR target/30120
        * reg-stack.c (convert_regs_entry): Mark current argument passing
        registers as live.

        * config/i386/i386.h (X87_REGPARM_MAX): Set to 0 to disable passing
        of float arguments in x87 registers.

testsuite/ChangeLog:

        * gcc.target/i386/x87regparm-1.c: XFAIL.
        * gcc.target/i386/x87regparm-2.c: XFAIL.
        * gcc.target/i386/x87regparm-3.c: XFAIL.
        * gcc.target/i386/x87regparm-4.c: XFAIL.

From-SVN: r119663

gcc/ChangeLog
gcc/config/i386/i386.h
gcc/reg-stack.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/x87regparm-1.c
gcc/testsuite/gcc.target/i386/x87regparm-2.c
gcc/testsuite/gcc.target/i386/x87regparm-3.c
gcc/testsuite/gcc.target/i386/x87regparm-4.c

index bb905058aa1c50f072b179526f24aa21084409f4..287d0dea5333b0856fbebdac246c5f996c852618 100644 (file)
@@ -1,3 +1,12 @@
+2006-12-08  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/30120
+       * reg-stack.c (convert_regs_entry): Mark current argument passing
+       registers as live.
+
+       * config/i386/i386.h (X87_REGPARM_MAX): Set to 0 to disable passing
+       of float arguments in x87 registers.
+
 2006-12-08  John David Anglin  <dave.anglin.@nrc-cnrc.gc.ca>
 
        * pa.h (LEGITIMATE_CONSTANT_P): Simplify.
index dc15a2b808a52ca9460dd045a5361138b6ec63cb..e05bf66624d9eccb7449dff365f2b3360846f2e6 100644 (file)
@@ -1778,7 +1778,9 @@ do {                                                                      \
 
 #define REGPARM_MAX (TARGET_64BIT ? 6 : 3)
 
-#define X87_REGPARM_MAX 3
+/* ??? Currently disabled, as reg-stack.c does not know how to
+   rearrange input registers if some arguments are left unused.  */
+#define X87_REGPARM_MAX 0
 
 #define SSE_REGPARM_MAX (TARGET_64BIT ? 8 : (TARGET_SSE ? 3 : 0))
 
index 57924ceba28a0db106fd2fa2f98ab27052d2bb65..327cee51f088d48fec98dfa7781f90923fdc578b 100644 (file)
@@ -2595,7 +2595,8 @@ convert_regs_entry (void)
       int reg, top = -1;
 
       for (reg = LAST_STACK_REG; reg >= FIRST_STACK_REG; --reg)
-       if (TEST_HARD_REG_BIT (bi->stack_in.reg_set, reg))
+       if (TEST_HARD_REG_BIT (bi->stack_in.reg_set, reg)
+           || TEST_HARD_REG_BIT (incoming_regs, reg))
          {
            rtx init;
 
index fe8632a881d0bd216a4c3e404270a31e4d6b5069..a0542868738fd7de0cdd19528bef6049ba5755f8 100644 (file)
@@ -1,3 +1,10 @@
+2006-12-08  Uros Bizjak  <ubizjak@gmail.com>
+
+       * gcc.target/i386/x87regparm-1.c: XFAIL.
+       * gcc.target/i386/x87regparm-2.c: XFAIL.
+       * gcc.target/i386/x87regparm-3.c: XFAIL.
+       * gcc.target/i386/x87regparm-4.c: XFAIL.
+
 2006-12-08  Manuel Lopez-Ibanez <manu@gcc.gnu.org>
 
        * lib/target-supports.exp
index fa93401cd905d465f1586c7f168cd84c5440bede..a1e6660a783a8af454e9a96f16f4117bfbbdd870 100644 (file)
@@ -19,4 +19,4 @@ void test()
 
 /* Check that no memory is used to pass arguments.  */
 
-/* { dg-final { scan-assembler-not "\\(%esp\\)" } } */
+/* { dg-final { scan-assembler-not "\\(%esp\\)" { xfail *-*-* } } } */
index b28dbc1cc77d811af297383b95bf038b426dd1d8..47508f841a1a4aa1915d92e34f5d6f1db98059b9 100644 (file)
@@ -19,4 +19,4 @@ void test()
 
 /* Check that no memory is used to pass arguments.  */
 
-/* { dg-final { scan-assembler-not "\\(%esp\\)" } } */
+/* { dg-final { scan-assembler-not "\\(%esp\\)" { xfail *-*-* } } } */
index b90ff858a09c87672e71d96b37b48383a7ac2eb2..8e3ff70dffa0511184494a124cd2eadf3e41c94d 100644 (file)
@@ -19,4 +19,4 @@ void test()
 
 /* Check that float and double arguments are passed through memory.  */
 
-/* { dg-final { scan-assembler-times "\\(%esp\\)" 4 } } */
+/* { dg-final { scan-assembler-times "\\(%esp\\)" 4 { xfail *-*-* } } } */
index 78a6cddedd4bb3d91c19e1c82675194641674f0a..95fe2a56fcad4e89cbdc4c1f27b410c7672b0f5b 100644 (file)
@@ -19,4 +19,4 @@ void test()
 
 /* Check that no memory is used to pass arguments.  */
 
-/* { dg-final { scan-assembler-not "\\(%esp\\)" } } */
+/* { dg-final { scan-assembler-not "\\(%esp\\)" { xfail *-*-* } } } */