summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/aes-avx-check.h
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2011-07-27 17:39:58 +0200
committerUros Bizjak <uros@gcc.gnu.org>2011-07-27 17:39:58 +0200
commit5019a14eee123f629c24747178e6ab3c22a5dbc9 (patch)
tree30a92bd776f2098bf54c9a150f76213611aa0cdf /gcc/testsuite/gcc.target/i386/aes-avx-check.h
parent2fe83a0c9f923c21c75498982c2606beacc3f5d6 (diff)
downloadgcc-5019a14eee123f629c24747178e6ab3c22a5dbc9.tar.gz
avx-os-support.h: New.
* gcc.target/i386/avx-os-support.h: New. * gcc.target/i386/avx-check.h: Include avx-os-support.h (main): Check avx_os_support before the test is run. * gcc.target/i386/aes-avx-check.h: Ditto. * gcc.target/i386/pclmul-avx-check.h: Ditto. From-SVN: r176829
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/aes-avx-check.h')
-rw-r--r--gcc/testsuite/gcc.target/i386/aes-avx-check.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.target/i386/aes-avx-check.h b/gcc/testsuite/gcc.target/i386/aes-avx-check.h
index 36a038ea341..f2a4ead4014 100644
--- a/gcc/testsuite/gcc.target/i386/aes-avx-check.h
+++ b/gcc/testsuite/gcc.target/i386/aes-avx-check.h
@@ -3,6 +3,7 @@
#endif
#include <stdlib.h>
#include "cpuid.h"
+#include "avx-os-support.h"
static void aes_avx_test (void);
@@ -22,8 +23,9 @@ main ()
return 0;
/* Run AES + AVX test only if host has AES + AVX support. */
- if ((ecx & (bit_AVX | bit_OSXSAVE | bit_AES))
- == (bit_AVX | bit_OSXSAVE | bit_AES))
+ if (((ecx & (bit_AVX | bit_OSXSAVE | bit_AES))
+ == (bit_AVX | bit_OSXSAVE | bit_AES))
+ && avx_os_support ())
{
do_test ();
#ifdef DEBUG