2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / aes-check.h
blobf56f1adeb3e67453944420699084d07f7fc90c33
1 #include <stdio.h>
2 #include <stdlib.h>
4 #include "cpuid.h"
6 static void aes_test (void);
8 int
9 main ()
11 unsigned int eax, ebx, ecx, edx;
13 if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
14 return 0;
16 /* Run AES test only if host has AES support. */
17 if (ecx & bit_AES)
19 aes_test ();
20 #ifdef DEBUG
21 printf ("PASSED\n");
22 #endif
24 #ifdef DEBUG
25 else
26 printf ("SKIPPED\n");
27 #endif
29 return 0;