summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/bmi-check.h
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2017-09-03 23:17:26 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2017-09-03 23:17:26 +0000
commit3c824e452091f24976fcd669c85c92653646d4a6 (patch)
tree4236956a5e13c223f2a0138d3a90e43c9dfe1650 /gcc/testsuite/gcc.target/i386/bmi-check.h
parenta89fcaa4ac386213f474c9035790f77791b133c8 (diff)
downloadgcc-3c824e452091f24976fcd669c85c92653646d4a6.tar.gz
* gcc.target/i386/adx-check.h (main): Use __get_cpuid_count.
* gcc.target/i386/bmi-check.h (main): Ditto. * gcc.target/i386/bmi2-check.h (main): Ditto. * gcc.target/i386/rtm-check.h (main): Ditto. * gcc.target/i386/sha-check.h (main): Ditto. * gcc.target/i386/avx2-check.h (check_osxsave): New function. (main): Use __get_cpuid_count. Use check_osxsave. * gcc.target/i386/avx512-check.h (check_osxsave): New function. (main): Use __get_cpuid_count. Use check_osxsave. Reorder conditions. * gcc.target/i386/mpx/mpx-check.h (check_osxsave): New function. (main): Use check_osxsave. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251629 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/bmi-check.h')
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-check.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/testsuite/gcc.target/i386/bmi-check.h b/gcc/testsuite/gcc.target/i386/bmi-check.h
index 8fad38ad072..1973f3b6468 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-check.h
+++ b/gcc/testsuite/gcc.target/i386/bmi-check.h
@@ -17,23 +17,21 @@ main ()
{
unsigned int eax, ebx, ecx, edx;
- if (__get_cpuid_max (0, NULL) < 7)
+ if (!__get_cpuid_count (7, 0, &eax, &ebx, &ecx, &edx))
return 0;
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
/* Run BMI test only if host has BMI support. */
if (ebx & bit_BMI)
{
do_test ();
#ifdef DEBUG
- printf ("PASSED\n");
+ printf ("PASSED\n");
#endif
+ return 0;
}
+
#ifdef DEBUG
- else
- printf ("SKIPPED\n");
+ printf ("SKIPPED\n");
#endif
-
return 0;
}