* gcc.dg/altivec-varargs-1.c: Enable testcase on ppc linux.
authorhpenner <hpenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Dec 2003 07:52:00 +0000 (07:52 +0000)
committerhpenner <hpenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Dec 2003 07:52:00 +0000 (07:52 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74823 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/altivec-varargs-1.c

index 980e449..073216a 100644 (file)
@@ -1,3 +1,7 @@
+2003-12-19  Hartmut Penner  <hpenner@de.ibm.com>
+
+       * gcc.dg/altivec-varargs-1.c: Enable testcase on ppc linux.
+
 2003-12-18  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR debug/12923
index b866500..caf6a26 100644 (file)
@@ -1,9 +1,8 @@
-/* { dg-do run { target powerpc*-*-darwin* powerpc*-*-*altivec* } } */
-/* { dg-options "-maltivec" } */
-/* This test requires altivec, which means it'll fail on Darwin running
-   on G3. FIXME.  */
+/* { dg-do run { target powerpc*-*-darwin* powerpc*-*-*altivec* powerpc*-*-linux*} } */
+/* { dg-options "-maltivec -mabi=altivec -fno-inline" } */
 
 #include <stdarg.h>
+#include <signal.h>
 
 #define vector __attribute__((mode(V4SI)))
 
@@ -54,7 +53,7 @@ void bar(vector unsigned int a, ...)
 }
 
 
-int main(void)
+int main1(void)
 {
   /* In this call, in the Darwin ABI, the first argument goes into v2
      the second one into r9-r10 and memory,
@@ -72,3 +71,20 @@ int main(void)
        (vector unsigned int){30,31,32,33});
   return 0;
 }
+
+void 
+sig_ill_handler (int sig)
+{
+    exit(0);
+}
+
+int main (void)
+{
+  /* Exit on systems without altivec.  */
+  signal (SIGILL, sig_ill_handler);
+  /* Altivec instruction, 'vor %v0,%v0,%v0'.  */
+  asm volatile (".long 0x10000484");
+  signal (SIGILL, SIG_DFL);
+
+  return main1 ();
+}