regtest: broaden none/tests/linux/bug498317 suppression for PPC
[valgrind.git] / none / tests / amd64 / clc.c
blobfc3d1d885da15db4e7c7abaaa39f4ab06f345047
2 #include <stdio.h>
4 typedef unsigned long long int ULong;
6 ULong do_clc ( void )
8 ULong res;
9 __asm__ __volatile__(
10 "pushq $0x8d5\n\t" /* OSZACP */
11 "popfq\n\t"
12 "clc\n\t"
13 "pushfq\n\t"
14 "popq %0"
15 : "=r"(res)
17 : "memory", "cc"
19 return res;
22 ULong do_stc ( void )
24 ULong res;
25 __asm__ __volatile__(
26 "pushq $0x0\n\t"
27 "popfq\n\t"
28 "stc\n\t"
29 "pushfq\n\t"
30 "popq %0"
31 : "=r"(res)
33 : "memory", "cc"
35 return res;
38 ULong do_cmc ( void )
40 ULong res;
41 __asm__ __volatile__(
42 "pushq $0x0\n\t"
43 "popfq\n\t"
44 "stc\n\t"
45 "cmc\n\t"
46 "pushfq\n\t"
47 "popq %0"
48 : "=r"(res)
50 : "memory", "cc"
52 return res;
55 int main ( void )
57 printf("clc: 0x%016llx\n", 0x8d5 & do_clc());
58 printf("stc: 0x%016llx\n", 0x8d5 & do_stc());
59 printf("cmc: 0x%016llx\n", 0x8d5 & do_cmc());
60 return 0;