Debian Codegraph @

gcc/testsuite/gcc.target/i386/writeeflags-1.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-O0" } */
3
4 #include <x86intrin.h>
5 #ifdef DEBUG
6 #include <stdio.h>
7 #endif
8
9 extern void abort (void);
10
11 #ifdef __x86_64__
12 #define EFLAGS_TYPE unsigned long long int
13 #else
14 #define EFLAGS_TYPE unsigned int
15 #endif
16
17 int
18 main ()
19 {
20 EFLAGS_TYPE flags = 0xD7; /* 111010111b */
21
22 __writeeflags (flags);
23
24 flags = __readeflags ();
25
26 if ((flags & 0xFF) != 0xD7)
27 abort ();
28
29 #ifdef DEBUG
30 printf ("PASSED\n");
31 #endif
32
33 return 0;
34 }
35