4 typedef unsigned long long int ULong
;
6 extern ULong
lahf_1 ( void );
12 "\tmovabsq $0xFFFFFFFFFFFFFFFF, %rax\n"
13 "\tmovabsq $0x8765432112345678, %rdx\n"
15 "\t.byte 0x9F\n" /* lahf */
20 extern ULong
lahf_0 ( void );
26 "\tmovabsq $0x0, %rax\n"
27 "\tmovabsq $0x8765432112345678, %rdx\n"
29 "\t.byte 0x9F\n" /* lahf */
34 extern ULong
sahf_then_lahf ( ULong
);
39 "\t.byte 0x9E\n" /* sahf */
40 "\tmovabsq $0, %rax\n"
41 "\t.byte 0x9F\n" /* lahf */
49 printf("0x%llx\n", lahf_0());
50 printf("0x%llx\n", lahf_1());
51 for (i
= 0; i
< 255; i
++) {
52 ULong x
= sahf_then_lahf(i
<< 8);
53 printf("%llx -> %llx\n", i
, x
);