OSDN Git Service

PR target/31507
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Oct 2007 22:35:01 +0000 (22:35 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Oct 2007 22:35:01 +0000 (22:35 +0000)
* config/i386/i386.md (pushsf_rex64): Use X instead of < constraints
for the first push_operand.

* gcc.dg/pr31507-1.c: New test.
* gcc.dg/pr31507-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129807 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr31507-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr31507-2.c [new file with mode: 0644]

index 75cc8da..ad2c78d 100644 (file)
@@ -1,3 +1,9 @@
+2007-10-31  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/31507
+       * config/i386/i386.md (pushsf_rex64): Use X instead of < constraints
+       for the first push_operand.
+
 2007-10-31  Revital Eres  <eres@il.ibm.com>
 
        * config/rs6000/paired.md (sminv2sf3, smaxv2sf3, reduc_smax_v2sf,
index 1681883..7bc3cf4 100644 (file)
    (set_attr "mode" "SF,SI,SF")])
 
 (define_insn "*pushsf_rex64"
-  [(set (match_operand:SF 0 "push_operand" "=<,<,<")
+  [(set (match_operand:SF 0 "push_operand" "=X,X,X")
        (match_operand:SF 1 "nonmemory_no_elim_operand" "f,rF,x"))]
   "TARGET_64BIT"
 {
index d8f691a..2689335 100644 (file)
@@ -1,3 +1,9 @@
+2007-10-31  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/31507
+       * gcc.dg/pr31507-1.c: New test.
+       * gcc.dg/pr31507-2.c: New test.
+
 2007-10-31  Revital Eres  <eres@il.ibm.com>
 
        * gcc.dg/vect/vect.exp: Add support for powerpc-*paired
diff --git a/gcc/testsuite/gcc.dg/pr31507-1.c b/gcc/testsuite/gcc.dg/pr31507-1.c
new file mode 100644 (file)
index 0000000..dbba1e1
--- /dev/null
@@ -0,0 +1,41 @@
+/* PR target/31507 */
+/* { dg-do run } */
+/* { dg-options "-Os -fno-omit-frame-pointer" } */
+
+extern void abort (void);
+
+__attribute__((noinline)) void
+foo (double d0, double d1, double d2, double d3,
+     double d4, double d5, double d6, double d7,
+     float f0, float f1, float f2, float f3,
+     char *p)
+{
+  if (d0 != 0 || d1 != 1 || d2 != 2 || d3 != 3)
+    abort ();
+  if (d4 != 4 || d5 != 5 || d6 != 6 || d7 != 7)
+    abort ();
+  if (f0 != 10 || f1 != 11 || f2 != 12 || f3 != 13)
+    abort ();
+  if (__builtin_memcmp (p, "foo", 4) != 0)
+    abort ();
+  __builtin_memcpy (p, "bar", 4);
+}
+
+__attribute__((noinline)) void
+bar (int x)
+{
+  char p[x];
+  if (x >= sizeof "foo")
+    __builtin_memcpy (p, "foo", 4);
+  foo (0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
+       10.0f, 11.0f, 12.0f, 13.0f, p);
+  if (x >= sizeof "bar" && __builtin_memcmp (p, "bar", 4) != 0)
+    abort ();
+}
+
+int
+main (void)
+{
+  bar (128);
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr31507-2.c b/gcc/testsuite/gcc.dg/pr31507-2.c
new file mode 100644 (file)
index 0000000..ee2388b
--- /dev/null
@@ -0,0 +1,14 @@
+/* PR target/31507 */
+/* { dg-do compile } */
+/* { dg-options "-Os -fno-omit-frame-pointer" } */
+
+typedef int (*closure_test_type3)(float, float, float, float, float, float,
+                                 float, float, double, int, float, float, int,
+                                 float, float, int);
+int f (closure_test_type3 pcl)
+{
+  int res;
+  res = (pcl)
+    (1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9, 10, 11.11, 12.0, 13,
+     19.19, 21.21, 1);
+}