20000724-1.c, [...]: Move to gcc.target/i386 directory.
authorUros Bizjak <ubizjak@gmail.com>
Wed, 22 Aug 2007 12:12:10 +0000 (14:12 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 22 Aug 2007 12:12:10 +0000 (14:12 +0200)
* gcc.dg/20000724-1.c, gcc.dg/980312-1.c, gcc.dg/980313-1.c,
gcc.dg/attr-returns_twice-1.c, gcc.dg/inline-mcpy.c, gcc.dg/pr25196.c,
gcc.dg/pr25993.c, gcc.dg/pr26449.c, gcc.dg/pr28839.c,
gcc.dg/pr32191.c: Move to gcc.target/i386 directory.
* gcc.target/i386/pr31854.c, gcc.target/i386/pr32065-1.c,
gcc.target/i386/pr32065-2.c: Use dg-require-effective-target dfp.

From-SVN: r127702

24 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20000724-1.c [deleted file]
gcc/testsuite/gcc.dg/980312-1.c [deleted file]
gcc/testsuite/gcc.dg/980313-1.c [deleted file]
gcc/testsuite/gcc.dg/attr-returns_twice-1.c [deleted file]
gcc/testsuite/gcc.dg/inline-mcpy.c [deleted file]
gcc/testsuite/gcc.dg/pr25196.c [deleted file]
gcc/testsuite/gcc.dg/pr25993.c [deleted file]
gcc/testsuite/gcc.dg/pr26449.c [deleted file]
gcc/testsuite/gcc.dg/pr28839.c [deleted file]
gcc/testsuite/gcc.dg/pr32191.c [deleted file]
gcc/testsuite/gcc.target/i386/20000724-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/980312-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/980313-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/attr-returns_twice-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/inline-mcpy.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr25196.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr25993.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr26449.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr28839.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr31854.c
gcc/testsuite/gcc.target/i386/pr32065-1.c
gcc/testsuite/gcc.target/i386/pr32065-2.c
gcc/testsuite/gcc.target/i386/pr32191.c [new file with mode: 0644]

index 189097d0a581f13e8bc58f48cc5cfb0cde147789..02cc97c3e15e21cc40c4673b5c9ee42ad96785d6 100644 (file)
@@ -1,3 +1,12 @@
+2007-08-22  Uros Bizjak  <ubizjak@gmail.com>
+
+       * gcc.dg/20000724-1.c, gcc.dg/980312-1.c, gcc.dg/980313-1.c,
+       gcc.dg/attr-returns_twice-1.c, gcc.dg/inline-mcpy.c, gcc.dg/pr25196.c,
+       gcc.dg/pr25993.c, gcc.dg/pr26449.c, gcc.dg/pr28839.c,
+       gcc.dg/pr32191.c: Move to gcc.target/i386 directory.
+       * gcc.target/i386/pr31854.c, gcc.target/i386/pr32065-1.c,
+       gcc.target/i386/pr32065-2.c: Use dg-require-effective-target dfp.
+
 2007-08-22  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/33007
diff --git a/gcc/testsuite/gcc.dg/20000724-1.c b/gcc/testsuite/gcc.dg/20000724-1.c
deleted file mode 100644 (file)
index 0516ae4..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "-O2 -fomit-frame-pointer" } */
-/* { dg-require-effective-target ilp32 } */
-
-extern void abort (void);
-extern void exit (int);
-
-struct s {
-  struct { int a; } a;
-  int b;
-  struct { struct { int a; } a; struct t { struct t *a, *b; } b; } c;
-};
-
-int bar(int (*fn)(void *), void *arg, unsigned long flags)
-{
-  return 0;
-}
-
-int baz(void *x)
-{
-  return 0;
-}
-
-void do_check (struct s *) asm ("do_check") __attribute__((regparm(1)));
-
-void __attribute__((regparm(1))) do_check(struct s *x)
-{
-  if (x->a.a || x->b || x->c.a.a)
-    abort();
-  if (x->c.b.a != &x->c.b || x->c.b.b != &x->c.b)
-    abort();
-}
-
-#define NT "\n\t"
-
-asm ("\n"
-"___checkme:"
-NT     "pushl %eax; pushl %ebx; pushl %ecx; pushl %edx; pushl %esi; pushl %edi"
-
-NT     "pushl $0; pushl $0; pushl $0; pushl $0; pushl $0"
-NT     "pushl $0; pushl $0; pushl $0; pushl $0; pushl $0"
-
-NT     "movl %ecx, %eax"
-NT     "call do_check"
-
-NT     "popl %eax; popl %eax; popl %eax; popl %eax; popl %eax"
-NT     "popl %eax; popl %eax; popl %eax; popl %eax; popl %eax"
-
-NT     "popl %edi; popl %esi; popl %edx; popl %ecx; popl %ebx; popl %eax"
-NT     "ret"
-);
-
-extern inline void do_asm(struct s * x)
-{
-  asm volatile("call ___checkme" : : "c" (x) : "memory");
-}
-
-int foo(void)
-{
-  struct s x = { { 0 }, 0, { { 0 }, { &x.c.b, &x.c.b } } };
-  bar(baz, &x, 1);
-  do_asm(&x);
-  bar(baz, &x, 1);
-  do_asm(&x);
-  return 0;
-}
-
-int main()
-{
-  foo();
-  exit(0);
-}
diff --git a/gcc/testsuite/gcc.dg/980312-1.c b/gcc/testsuite/gcc.dg/980312-1.c
deleted file mode 100644 (file)
index edf3cf5..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* { dg-do link { target i?86-*-* x86_64-*-* } } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O2 -march=pentiumpro" } */
-
-extern __inline  double
-__expm1 (double __x)
-{
-  double __temp;
-  __temp = 1.0;
-  return __temp;
-}
-extern __inline  double
-__sgn1 (double __x)
-{
-  return __x >= 0.0 ? 1.0 : -1.0;
-}
-double
-tanh (double __x)
-{
-  return  __expm1 (__x) * __sgn1 (-__x);
-}
-main ()
-{
-  return tanh (3.45) != 0;
-}
diff --git a/gcc/testsuite/gcc.dg/980313-1.c b/gcc/testsuite/gcc.dg/980313-1.c
deleted file mode 100644 (file)
index 889654f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* { dg-do link { target i?86-*-* x86_64-*-* } } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O2 -march=pentiumpro" } */
-
-extern __inline  double
-__expm1 (double __x)
-{
-  double __temp;
-  __temp -= 1.0;
-  return __temp;
-}
-extern __inline  double
-__sgn1 (double __x)
-{
-  return __x >= 0.0 ? 1.0 : -1.0;
-}
-double
-tanh (double __x)
-{
-  register double __exm1 = __expm1 (__x);
-  return __exm1 / (__exm1 + 2.0) * __sgn1 (-__x);
-}
-main ()
-{
-  return tanh (3.45) != 0;
-}
diff --git a/gcc/testsuite/gcc.dg/attr-returns_twice-1.c b/gcc/testsuite/gcc.dg/attr-returns_twice-1.c
deleted file mode 100644 (file)
index e2e725e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-Wclobbered" } */
-
-int newsetjmp(void) __attribute__((returns_twice));
-void g(int);
-
-int
-main (void)
-{
-  register int reg asm ("esi") = 1; /* { dg-warning "might be clobbered" "" } */
-
-  if (!newsetjmp ())
-    {
-      reg = 2;
-      g (reg);
-    }
-  else
-    {
-      g (reg);
-    }
-
-  return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/inline-mcpy.c b/gcc/testsuite/gcc.dg/inline-mcpy.c
deleted file mode 100644 (file)
index 4917394..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Test if we inline memcpy even with -Os, when the user requested it.  */
-/* Don't name this test with memcpy in its name, otherwise the scan-assembler
-   would be confused.  */
-/* { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "-Os -minline-all-stringops" } */
-/* { dg-final { scan-assembler-not "memcpy" } } */
-char f(int i)
-{
-  char *ram_split[] = { "5:3", "3:1", "1:1", "3:5" };
-  return ram_split[i][0];
-}
diff --git a/gcc/testsuite/gcc.dg/pr25196.c b/gcc/testsuite/gcc.dg/pr25196.c
deleted file mode 100644 (file)
index e73faff..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-march=i386 -O3 -fomit-frame-pointer" } */
-
-/* For this test case, we used to do an invalid load motion after
-   reload, because we missed autoincrements of the stack pointer.  */
-
-extern void abort (void);
-
-static int j;
-
-static void __attribute__((noinline))
-f1 (int a, int b, int c, int d, int e)
-{
-  j = a;
-}
-
-int __attribute__((noinline))
-f2 (int a, int b, int c, int d, int e)
-{
-  if ((b & 0x1111) != 1)
-    f1 (a, b, c, d, e);
-  return 0;
-}
-
-int
-main (void)
-{
-  f2 (123, 0, 0, 0, 0);
-  if (j != 123)
-    abort ();
-  return 0;
-}
-
diff --git a/gcc/testsuite/gcc.dg/pr25993.c b/gcc/testsuite/gcc.dg/pr25993.c
deleted file mode 100644 (file)
index c771966..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/* { dg-do assemble { target i?86-*-* x86_64-*-* } } */
-/* { dg-skip-if "" { "*-*-darwin*" } { "*" } { "" } } */
-/* { dg-options "-std=c99 -x assembler-with-cpp" } */
-
-#ifndef __ASSEMBLER__
-extern int func(void);
-#else
-.global func
-.type func,%function
-.align 4
-func:
-        ret
-.size func,.-func
-#endif
diff --git a/gcc/testsuite/gcc.dg/pr26449.c b/gcc/testsuite/gcc.dg/pr26449.c
deleted file mode 100644 (file)
index dc622fa..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/* { dg-do compile { target i?86-*-* } } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O1 -ftree-vectorize -march=pentium4 -std=c99" } */
-
-void matmul_i4 (int bbase_yn, int xcount)
-{
-  int x;
-  int * restrict dest_y;
-  const int * abase_n;
-
-  for (x = 0;  x < xcount;  x++)
-    {
-      dest_y[x] += abase_n[x] * bbase_yn;
-    }
-}
diff --git a/gcc/testsuite/gcc.dg/pr28839.c b/gcc/testsuite/gcc.dg/pr28839.c
deleted file mode 100644 (file)
index 56a42a3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -msse2 -ftree-vectorize -funswitch-loops" } */
-
-static int ready[10];
-void abort (void);
-void test_once (int t,int t1)
-{
-  int i, repeat;
-  for (i = 0; i < 10; i++)
-    {
-      ready[i] = 0;
-      if (t1)
-       if (b())
-         abort ();
-    }
-  if (t)
-    abort ();
-}
diff --git a/gcc/testsuite/gcc.dg/pr32191.c b/gcc/testsuite/gcc.dg/pr32191.c
deleted file mode 100644 (file)
index b76b588..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
-/* { dg-options "-std=c99" } */
-
-typedef _Complex float __attribute__((mode(TC))) _Complex128;
-
-_Complex128 foo (_Complex128 x, _Complex128 y)
-{
-  return x * y;
-}
diff --git a/gcc/testsuite/gcc.target/i386/20000724-1.c b/gcc/testsuite/gcc.target/i386/20000724-1.c
new file mode 100644 (file)
index 0000000..b3be437
--- /dev/null
@@ -0,0 +1,72 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2 -fomit-frame-pointer" } */
+
+extern void abort (void);
+extern void exit (int);
+
+struct s {
+  struct { int a; } a;
+  int b;
+  struct { struct { int a; } a; struct t { struct t *a, *b; } b; } c;
+};
+
+int bar(int (*fn)(void *), void *arg, unsigned long flags)
+{
+  return 0;
+}
+
+int baz(void *x)
+{
+  return 0;
+}
+
+void do_check (struct s *) asm ("do_check") __attribute__((regparm(1)));
+
+void __attribute__((regparm(1))) do_check(struct s *x)
+{
+  if (x->a.a || x->b || x->c.a.a)
+    abort();
+  if (x->c.b.a != &x->c.b || x->c.b.b != &x->c.b)
+    abort();
+}
+
+#define NT "\n\t"
+
+asm ("\n"
+"___checkme:"
+NT     "pushl %eax; pushl %ebx; pushl %ecx; pushl %edx; pushl %esi; pushl %edi"
+
+NT     "pushl $0; pushl $0; pushl $0; pushl $0; pushl $0"
+NT     "pushl $0; pushl $0; pushl $0; pushl $0; pushl $0"
+
+NT     "movl %ecx, %eax"
+NT     "call do_check"
+
+NT     "popl %eax; popl %eax; popl %eax; popl %eax; popl %eax"
+NT     "popl %eax; popl %eax; popl %eax; popl %eax; popl %eax"
+
+NT     "popl %edi; popl %esi; popl %edx; popl %ecx; popl %ebx; popl %eax"
+NT     "ret"
+);
+
+extern inline void do_asm(struct s * x)
+{
+  asm volatile("call ___checkme" : : "c" (x) : "memory");
+}
+
+int foo(void)
+{
+  struct s x = { { 0 }, 0, { { 0 }, { &x.c.b, &x.c.b } } };
+  bar(baz, &x, 1);
+  do_asm(&x);
+  bar(baz, &x, 1);
+  do_asm(&x);
+  return 0;
+}
+
+int main()
+{
+  foo();
+  exit(0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/980312-1.c b/gcc/testsuite/gcc.target/i386/980312-1.c
new file mode 100644 (file)
index 0000000..72cdd5e
--- /dev/null
@@ -0,0 +1,25 @@
+/* { dg-do link } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2 -march=pentiumpro" } */
+
+extern __inline  double
+__expm1 (double __x)
+{
+  double __temp;
+  __temp = 1.0;
+  return __temp;
+}
+extern __inline  double
+__sgn1 (double __x)
+{
+  return __x >= 0.0 ? 1.0 : -1.0;
+}
+double
+tanh (double __x)
+{
+  return  __expm1 (__x) * __sgn1 (-__x);
+}
+main ()
+{
+  return tanh (3.45) != 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/980313-1.c b/gcc/testsuite/gcc.target/i386/980313-1.c
new file mode 100644 (file)
index 0000000..3b5263c
--- /dev/null
@@ -0,0 +1,26 @@
+/* { dg-do link } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2 -march=pentiumpro" } */
+
+extern __inline  double
+__expm1 (double __x)
+{
+  double __temp;
+  __temp -= 1.0;
+  return __temp;
+}
+extern __inline  double
+__sgn1 (double __x)
+{
+  return __x >= 0.0 ? 1.0 : -1.0;
+}
+double
+tanh (double __x)
+{
+  register double __exm1 = __expm1 (__x);
+  return __exm1 / (__exm1 + 2.0) * __sgn1 (-__x);
+}
+main ()
+{
+  return tanh (3.45) != 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/attr-returns_twice-1.c b/gcc/testsuite/gcc.target/i386/attr-returns_twice-1.c
new file mode 100644 (file)
index 0000000..cd820d2
--- /dev/null
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-Wclobbered" } */
+
+int newsetjmp(void) __attribute__((returns_twice));
+void g(int);
+
+int
+main (void)
+{
+  register int reg asm ("esi") = 1; /* { dg-warning "might be clobbered" "" } */
+
+  if (!newsetjmp ())
+    {
+      reg = 2;
+      g (reg);
+    }
+  else
+    {
+      g (reg);
+    }
+
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/inline-mcpy.c b/gcc/testsuite/gcc.target/i386/inline-mcpy.c
new file mode 100644 (file)
index 0000000..7eacb5f
--- /dev/null
@@ -0,0 +1,11 @@
+/* Test if we inline memcpy even with -Os, when the user requested it.  */
+/* Don't name this test with memcpy in its name, otherwise the scan-assembler
+   would be confused.  */
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-Os -minline-all-stringops" } */
+/* { dg-final { scan-assembler-not "memcpy" } } */
+char f(int i)
+{
+  char *ram_split[] = { "5:3", "3:1", "1:1", "3:5" };
+  return ram_split[i][0];
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr25196.c b/gcc/testsuite/gcc.target/i386/pr25196.c
new file mode 100644 (file)
index 0000000..c3b69b8
--- /dev/null
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-march=i386 -O3 -fomit-frame-pointer" } */
+
+/* For this test case, we used to do an invalid load motion after
+   reload, because we missed autoincrements of the stack pointer.  */
+
+extern void abort (void);
+
+static int j;
+
+static void __attribute__((noinline))
+f1 (int a, int b, int c, int d, int e)
+{
+  j = a;
+}
+
+int __attribute__((noinline))
+f2 (int a, int b, int c, int d, int e)
+{
+  if ((b & 0x1111) != 1)
+    f1 (a, b, c, d, e);
+  return 0;
+}
+
+int
+main (void)
+{
+  f2 (123, 0, 0, 0, 0);
+  if (j != 123)
+    abort ();
+  return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/pr25993.c b/gcc/testsuite/gcc.target/i386/pr25993.c
new file mode 100644 (file)
index 0000000..ebdc903
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do assemble } */
+/* { dg-skip-if "" { "*-*-darwin*" } { "*" } { "" } } */
+/* { dg-options "-std=c99 -x assembler-with-cpp" } */
+
+#ifndef __ASSEMBLER__
+extern int func(void);
+#else
+.global func
+.type func,%function
+.align 4
+func:
+        ret
+.size func,.-func
+#endif
diff --git a/gcc/testsuite/gcc.target/i386/pr26449.c b/gcc/testsuite/gcc.target/i386/pr26449.c
new file mode 100644 (file)
index 0000000..7a61296
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O1 -ftree-vectorize -march=pentium4 -std=c99" } */
+
+void matmul_i4 (int bbase_yn, int xcount)
+{
+  int x;
+  int * restrict dest_y;
+  const int * abase_n;
+
+  for (x = 0;  x < xcount;  x++)
+    {
+      dest_y[x] += abase_n[x] * bbase_yn;
+    }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr28839.c b/gcc/testsuite/gcc.target/i386/pr28839.c
new file mode 100644 (file)
index 0000000..6a21516
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2 -ftree-vectorize -funswitch-loops" } */
+
+static int ready[10];
+void abort (void);
+void test_once (int t,int t1)
+{
+  int i, repeat;
+  for (i = 0; i < 10; i++)
+    {
+      ready[i] = 0;
+      if (t1)
+       if (b())
+         abort ();
+    }
+  if (t)
+    abort ();
+}
index d5dca57ea630228371e4905ef899e3193174289d..6fcd20ef047f6e00afb8e2f9b1f0995bdceb811e 100644 (file)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target dfp } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target dfp } */
 /* { dg-options "-O -std=gnu99" } */
 
 _Decimal128 d128;
index 9c8b03e8558c28e2423841807fc3a85a603fa000..eefea27f16aee849061b20ff5d764bcd284fde93 100644 (file)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target dfp } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target dfp } */
 /* { dg-options "-msse -std=gnu99" } */
 
 _Decimal128 test (void)
index 185163b3bcc11d502942c765ec5657aa8cde4fdd..61ecfe9e3b62f94632981687bb155ca19bbcb732 100644 (file)
@@ -1,4 +1,5 @@
-/* { dg-do run { target dfp } } */
+/* { dg-do run } */
+/* { dg-require-effective-target dfp } */
 /* { dg-options "-Os -msse -std=gnu99" } */
 
 extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/pr32191.c b/gcc/testsuite/gcc.target/i386/pr32191.c
new file mode 100644 (file)
index 0000000..0da5d5c
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-std=c99" } */
+
+typedef _Complex float __attribute__((mode(TC))) _Complex128;
+
+_Complex128 foo (_Complex128 x, _Complex128 y)
+{
+  return x * y;
+}