OSDN Git Service

2009-09-29 Harsha Jagasia <harsha.jagasia@amd.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / funcspec-8.c
index 115f608..ba4b7f2 100644 (file)
@@ -1,6 +1,7 @@
 /* Test whether using target specific options, we can use the x86 builtin
    functions in functions with the appropriate function specific options.  */
 /* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
 /* { dg-options "-O2 -march=k8 -mfpmath=sse" } */
 
 typedef float     __m128  __attribute__ ((__vector_size__ (16), __may_alias__));
@@ -12,7 +13,7 @@ typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
 #error "-msse3 should not be set for this test"
 #endif
 
-__m128d sse3_hsubpd (__m128d a, __m128d b) __attribute__((__option__("sse3")));
+__m128d sse3_hsubpd (__m128d a, __m128d b) __attribute__((__target__("sse3")));
 __m128d generic_hsubpd (__m128d a, __m128d b);
 
 __m128d
@@ -31,7 +32,7 @@ generic_hsubpd (__m128d a, __m128d b)
 #error "-mssse3 should not be set for this test"
 #endif
 
-__m128w ssse3_psignd128 (__m128w a, __m128w b) __attribute__((__option__("ssse3")));
+__m128w ssse3_psignd128 (__m128w a, __m128w b) __attribute__((__target__("ssse3")));
 __m128w generic_psignd (__m128w ab, __m128w b);
 
 __m128w
@@ -50,7 +51,7 @@ generic_psignd128 (__m128w a, __m128w b)
 #error "-msse4.1 should not be set for this test"
 #endif
 
-__m128d sse4_1_blendvpd (__m128d a, __m128d b, __m128d c) __attribute__((__option__("sse4.1")));
+__m128d sse4_1_blendvpd (__m128d a, __m128d b, __m128d c) __attribute__((__target__("sse4.1")));
 __m128d generic_blendvpd (__m128d a, __m128d b, __m128d c);
 
 __m128d
@@ -69,7 +70,7 @@ generic_blendvpd  (__m128d a, __m128d b, __m128d c)
 #error "-msse4.2 should not be set for this test"
 #endif
 
-__m128i sse4_2_pcmpgtq (__m128i a, __m128i b) __attribute__((__option__("sse4.2")));
+__m128i sse4_2_pcmpgtq (__m128i a, __m128i b) __attribute__((__target__("sse4.2")));
 __m128i generic_pcmpgtq (__m128i ab, __m128i b);
 
 __m128i
@@ -88,7 +89,7 @@ generic_pcmpgtq (__m128i a, __m128i b)
 #error "-msse4a should not be set for this test"
 #endif
 
-__m128i sse4_2_insertq (__m128i a, __m128i b) __attribute__((__option__("sse4a")));
+__m128i sse4_2_insertq (__m128i a, __m128i b) __attribute__((__target__("sse4a")));
 __m128i generic_insertq (__m128i ab, __m128i b);
 
 __m128i
@@ -103,30 +104,30 @@ generic_insertq (__m128i a, __m128i b)
   return __builtin_ia32_insertq (a, b);                        /* { dg-error "needs isa option" } */
 }
 
-#ifdef __SSE5__
-#error "-msse5 should not be set for this test"
+#ifdef __FMA4__
+#error "-mfma4 should not be set for this test"
 #endif
 
-__m128d sse5_fmaddpd (__m128d a, __m128d b, __m128d c) __attribute__((__option__("sse5")));
+__m128d fma4_fmaddpd (__m128d a, __m128d b, __m128d c) __attribute__((__target__("fma4")));
 __m128d generic_fmaddpd (__m128d a, __m128d b, __m128d c);
 
 __m128d
-sse5_fmaddpd  (__m128d a, __m128d b, __m128d c)
+fma4_fmaddpd  (__m128d a, __m128d b, __m128d c)
 {
-  return __builtin_ia32_fmaddpd (a, b, c);
+  return __builtin_ia32_vfmaddpd (a, b, c);
 }
 
 __m128d
 generic_fmaddpd  (__m128d a, __m128d b, __m128d c)
 {
-  return __builtin_ia32_fmaddpd (a, b, c);             /* { dg-error "needs isa option" } */
+  return __builtin_ia32_vfmaddpd (a, b, c);            /* { dg-error "needs isa option" } */
 }
 
 #ifdef __AES__
 #error "-maes should not be set for this test"
 #endif
 
-__m128i aes_aesimc128 (__m128i a) __attribute__((__option__("aes")));
+__m128i aes_aesimc128 (__m128i a) __attribute__((__target__("aes")));
 __m128i generic_aesimc128 (__m128i a);
 
 __m128i
@@ -145,7 +146,7 @@ generic_aesimc128 (__m128i a)
 #error "-mpclmul should not be set for this test"
 #endif
 
-__m128i pclmul_pclmulqdq128 (__m128i a, __m128i b) __attribute__((__option__("pclmul")));
+__m128i pclmul_pclmulqdq128 (__m128i a, __m128i b) __attribute__((__target__("pclmul")));
 __m128i generic_pclmulqdq128 (__m128i a, __m128i b);
 
 __m128i