Patchwork [google] Specify target as ix86 or x86_64 for test builtin_target.c (issue5174041)

login
register
mail settings
Submitter Sriraman Tallam
Date Sept. 30, 2011, 9:49 p.m.
Message ID <CAAs8Hmyo=YjsJ_bMG9zUcKoeaOmGVckF53Exzh-zmSfMC0r8XA@mail.gmail.com>
Download mbox | patch
Permalink /patch/117225/
State New
Headers show

Comments

Sriraman Tallam - Sept. 30, 2011, 9:49 p.m.
Moving test gcc.target/i386

	* testsuite/gcc.dg/builtin_target.c: Remove.
	* testsuite/gcc.target/i386/builtin_target.c: New file.

On Fri, Sep 30, 2011 at 2:33 PM, Richard Henderson <rth@redhat.com> wrote:
> On 09/30/2011 02:09 PM, Sriraman Tallam wrote:
>>       * testsuite/gcc.dg/builtin_target.c: Specify target as ix86 or
>>       x86_64.
>>
>> Index: gcc.dg/builtin_target.c
>> ===================================================================
>> --- gcc.dg/builtin_target.c   (revision 179400)
>> +++ gcc.dg/builtin_target.c   (working copy)
>> @@ -1,6 +1,6 @@
>>  /* This test checks if the __builtin_cpu_* calls are recognized. */
>>
>> -/* { dg-do run } */
>> +/* { dg-do run { target i?86-*-* x86_64-*-* } } */
>
> This is an indication that the test is in the wrong place.
> It should be in gcc.target/i386/

Sorry, did not realize.


>
>
> r~
>

Patch

Index: gcc.target/i386/builtin_target.c
===================================================================
--- gcc.target/i386/builtin_target.c	(revision 0)
+++ gcc.target/i386/builtin_target.c	(revision 0)
@@ -0,0 +1,53 @@ 
+/* This test checks if the __builtin_cpu_* calls are recognized. */
+
+/* { dg-do run } */
+
+int
+fn1 ()
+{
+  if (__builtin_cpu_supports_cmov () < 0)
+    return -1;
+  if (__builtin_cpu_supports_mmx () < 0)
+    return -1;
+  if (__builtin_cpu_supports_popcount () < 0)
+    return -1;
+  if (__builtin_cpu_supports_sse () < 0)
+    return -1;
+  if (__builtin_cpu_supports_sse2 () < 0)
+    return -1;
+  if (__builtin_cpu_supports_sse3 () < 0)
+    return -1;
+  if (__builtin_cpu_supports_ssse3 () < 0)
+    return -1;
+  if (__builtin_cpu_supports_sse4_1 () < 0)
+    return -1;
+  if (__builtin_cpu_supports_sse4_2 () < 0)
+    return -1;
+  if (__builtin_cpu_is_amd () < 0)
+    return -1;
+  if (__builtin_cpu_is_intel () < 0)
+    return -1;
+  if (__builtin_cpu_is_intel_atom () < 0)
+    return -1;
+  if (__builtin_cpu_is_intel_core2 () < 0)
+    return -1;
+  if (__builtin_cpu_is_intel_corei7_nehalem () < 0)
+    return -1;
+  if (__builtin_cpu_is_intel_corei7_westmere () < 0)
+    return -1;
+  if (__builtin_cpu_is_intel_corei7_sandybridge () < 0)
+    return -1;
+  if (__builtin_cpu_is_amdfam10_barcelona () < 0)
+    return -1;
+  if (__builtin_cpu_is_amdfam10_shanghai () < 0)
+    return -1;
+  if (__builtin_cpu_is_amdfam10_istanbul () < 0)
+    return -1;
+
+  return 0;
+}
+
+int main ()
+{
+  return fn1 ();
+}
Index: gcc.dg/builtin_target.c
===================================================================
--- gcc.dg/builtin_target.c	(revision 179400)
+++ gcc.dg/builtin_target.c	(working copy)
@@ -1,53 +0,0 @@ 
-/* This test checks if the __builtin_cpu_* calls are recognized. */
-
-/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-
-int
-fn1 ()
-{
-  if (__builtin_cpu_supports_cmov () < 0)
-    return -1;
-  if (__builtin_cpu_supports_mmx () < 0)
-    return -1;
-  if (__builtin_cpu_supports_popcount () < 0)
-    return -1;
-  if (__builtin_cpu_supports_sse () < 0)
-    return -1;
-  if (__builtin_cpu_supports_sse2 () < 0)
-    return -1;
-  if (__builtin_cpu_supports_sse3 () < 0)
-    return -1;
-  if (__builtin_cpu_supports_ssse3 () < 0)
-    return -1;
-  if (__builtin_cpu_supports_sse4_1 () < 0)
-    return -1;
-  if (__builtin_cpu_supports_sse4_2 () < 0)
-    return -1;
-  if (__builtin_cpu_is_amd () < 0)
-    return -1;
-  if (__builtin_cpu_is_intel () < 0)
-    return -1;
-  if (__builtin_cpu_is_intel_atom () < 0)
-    return -1;
-  if (__builtin_cpu_is_intel_core2 () < 0)
-    return -1;
-  if (__builtin_cpu_is_intel_corei7_nehalem () < 0)
-    return -1;
-  if (__builtin_cpu_is_intel_corei7_westmere () < 0)
-    return -1;
-  if (__builtin_cpu_is_intel_corei7_sandybridge () < 0)
-    return -1;
-  if (__builtin_cpu_is_amdfam10_barcelona () < 0)
-    return -1;
-  if (__builtin_cpu_is_amdfam10_shanghai () < 0)
-    return -1;
-  if (__builtin_cpu_is_amdfam10_istanbul () < 0)
-    return -1;
-
-  return 0;
-}
-
-int main ()
-{
-  return fn1 ();
-}