This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR target/59034: FAIL gcc.c-torture/compile/20031208-1.c
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: ubizjak at gmail dot com
- Date: Wed, 6 Nov 2013 22:19:39 -0800
- Subject: PATCH: PR target/59034: FAIL gcc.c-torture/compile/20031208-1.c
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
We should use Pmode with stack_pointer_rtx. OK for trunk and 4.8
branch?
Thanks.
H.J.
---
gcc/
2013-11-06 H.J. Lu <hongjiu.lu@intel.com>
PR target/59034
* config/i386/i386.md (push peepholer/splitter): Use Pmode
with stack_pointer_rtx.
gcc/testsuite/
2013-11-06 H.J. Lu <hongjiu.lu@intel.com>
PR target/59034
* gcc.target/i386/pr59034-1.c: New test.
* gcc.target/i386/pr59034-2.c: Likewise.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index c7ec0c1..a2c81e5 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -1669,7 +1669,7 @@
split_double_mode (DImode, &operands[1], 1, &operands[2], &operands[3]);
operands[1] = gen_lowpart (DImode, operands[2]);
- operands[2] = gen_rtx_MEM (SImode, gen_rtx_PLUS (DImode, stack_pointer_rtx,
+ operands[2] = gen_rtx_MEM (SImode, gen_rtx_PLUS (Pmode, stack_pointer_rtx,
GEN_INT (4)));
})
@@ -1686,7 +1686,7 @@
split_double_mode (DImode, &operands[1], 1, &operands[2], &operands[3]);
operands[1] = gen_lowpart (DImode, operands[2]);
- operands[2] = gen_rtx_MEM (SImode, gen_rtx_PLUS (DImode, stack_pointer_rtx,
+ operands[2] = gen_rtx_MEM (SImode, gen_rtx_PLUS (Pmode, stack_pointer_rtx,
GEN_INT (4)));
})
diff --git a/gcc/testsuite/gcc.target/i386/pr59034-1.c b/gcc/testsuite/gcc.target/i386/pr59034-1.c
new file mode 100644
index 0000000..1f4c4e0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59034-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O -mx32 -mtune=corei7 -maddress-mode=short" } */
+
+extern int foo(int, ...);
+int bar(void) {
+ long double l = 1.2345E6;
+ foo(0, l);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59034-2.c b/gcc/testsuite/gcc.target/i386/pr59034-2.c
new file mode 100644
index 0000000..14e594b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59034-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O -mx32 -mtune=corei7 -maddress-mode=long" } */
+
+extern int foo(int, ...);
+int bar(void) {
+ long double l = 1.2345E6;
+ foo(0, l);
+ return 0;
+}