===================================================================
@@ -7,6 +7,7 @@
#include <x86intrin.h>
#include "bmi2-check.h"
+#ifdef _ARCH_PWR7
__attribute__((noinline))
unsigned long long
calc_pdep_u64 (unsigned long long a, unsigned long long mask)
@@ -21,11 +22,13 @@ calc_pdep_u64 (unsigned long long a, unsigned long
}
return res;
}
+#endif /* _ARCH_PWR7 */
static
void
bmi2_test ()
{
+#ifdef _ARCH_PWR7
unsigned long long i;
unsigned long long src = 0xce7acce7acce7ac;
unsigned long long res, res_ref;
@@ -39,4 +42,5 @@ bmi2_test ()
if (res != res_ref)
abort ();
}
+#endif /* _ARCH_PWR7 */
}
===================================================================
@@ -7,6 +7,7 @@
#include <x86intrin.h>
#include "bmi2-check.h"
+#ifdef _ARCH_PWR7
__attribute__((noinline))
unsigned long long
calc_pext_u64 (unsigned long long a, unsigned long long mask)
@@ -22,10 +23,12 @@ calc_pext_u64 (unsigned long long a, unsigned long
return res;
}
+#endif /* _ARCH_PWR7 */
static void
bmi2_test ()
{
+#ifdef _ARCH_PWR7
unsigned long long i;
unsigned long long src = 0xce7acce7acce7ac;
unsigned long long res, res_ref;
@@ -39,4 +42,5 @@ bmi2_test ()
if (res != res_ref)
abort();
}
+#endif /* _ARCH_PWR7 */
}
===================================================================
@@ -7,6 +7,7 @@
#include <x86intrin.h>
#include "bmi2-check.h"
+#ifdef _ARCH_PWR7
__attribute__((noinline))
unsigned
calc_pdep_u32 (unsigned a, int mask)
@@ -22,10 +23,12 @@ calc_pdep_u32 (unsigned a, int mask)
return res;
}
+#endif /* _ARCH_PWR7 */
static void
bmi2_test ()
{
+#ifdef _ARCH_PWR7
unsigned i;
unsigned src = 0xce7acc;
unsigned res, res_ref;
@@ -39,4 +42,5 @@ bmi2_test ()
if (res != res_ref)
abort();
}
+#endif /* _ARCH_PWR7 */
}
===================================================================
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3" } */
+/* { dg-options "-O3 -mcpu=power7" } */
/* { dg-require-effective-target lp64 } */
/* { dg-require-effective-target powerpc_vsx_ok } */
===================================================================
@@ -7,6 +7,7 @@
#include <x86intrin.h>
#include "bmi2-check.h"
+#ifdef _ARCH_PWR7
__attribute__((noinline))
unsigned
calc_pext_u32 (unsigned a, unsigned mask)
@@ -22,10 +23,12 @@ calc_pext_u32 (unsigned a, unsigned mask)
return res;
}
+#endif /* _ARCH_PWR7 */
static void
bmi2_test ()
{
+#ifdef _ARCH_PWR7
unsigned i;
unsigned src = 0xce7acc;
unsigned res, res_ref;
@@ -39,4 +42,5 @@ bmi2_test ()
if (res != res_ref)
abort();
}
+#endif /* _ARCH_PWR7 */
}