Stop only if there aren't any usable algorithms
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / writeeflags-1.c
blob446840cb33c4ba2f7f9f0bf7585296e50610ef02
1 /* { dg-do run } */
2 /* { dg-options "-O0" } */
4 #include <x86intrin.h>
6 #ifdef __x86_64__
7 #define EFLAGS_TYPE unsigned long long int
8 #else
9 #define EFLAGS_TYPE unsigned int
10 #endif
12 int
13 main ()
15 EFLAGS_TYPE flags = 0xD7; /* 111010111b */
17 __writeeflags (flags);
19 flags = __readeflags ();
21 if ((flags & 0xFF) != 0xD7)
22 abort ();
24 #ifdef DEBUG
25 printf ("PASSED\n");
26 #endif
28 return 0;