4 typedef unsigned long long int ULong
;
5 typedef unsigned int UInt
;
15 extern void foo ( void );
23 "\txorl %eax, %eax\n" // get eflags in a known state
25 "\tmovl " VG_SYM(eax
) ",%eax\n"
26 "\tmovl " VG_SYM(ebx
) ",%ebx\n"
27 "\tmovl " VG_SYM(ecx
) ",%ecx\n"
28 "\tmovl " VG_SYM(edx
) ",%edx\n"
29 "\tcmpxchg8b " VG_SYM(m64
) "\n"
30 "\tmovl %eax," VG_SYM(eax
) "\n"
31 "\tmovl %ebx," VG_SYM(ebx
) "\n"
32 "\tmovl %ecx," VG_SYM(ecx
) "\n"
33 "\tmovl %edx," VG_SYM(edx
) "\n"
36 "\tmovl %eax," VG_SYM(zout
) "\n"
47 edx
= 0x11111111; eax
= 0x22222222;
48 ecx
= 0x33333333; ebx
= 0x44444444;
50 m64
= 0x1111111122222222ULL
;
52 printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
53 eax
, ebx
, ecx
, edx
, zout
& 0xFFFF, m64
);
55 edx
= 0x11111111; eax
= 0x22222222;
56 ecx
= 0x33333333; ebx
= 0x44444444;
58 m64
= 0x1111111122222222ULL
;
61 printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
62 eax
, ebx
, ecx
, edx
, zout
& 0xFFFF, m64
);
64 edx
= 0x11111111; eax
= 0x22222222;
65 ecx
= 0x33333333; ebx
= 0x44444444;
67 m64
= 0x1111111122222222ULL
;
68 m64
+= 0x100000000ULL
;
70 printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
71 eax
, ebx
, ecx
, edx
, zout
& 0xFFFF, m64
);
73 edx
= 0x11111111; eax
= 0x22222222;
74 ecx
= 0x33333333; ebx
= 0x44444444;
76 m64
= 0x6666666677777777ULL
;
78 printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
79 eax
, ebx
, ecx
, edx
, zout
& 0xFFFF, m64
);