4 typedef unsigned long long int ULong
;
5 typedef unsigned int UInt
;
15 extern void foo ( void );
24 "\txorl %eax, %eax\n" // get eflags in a known state
26 "\tmovl " VG_SYM(eax
) ",%eax\n"
27 "\tmovl " VG_SYM(ebx
) ",%ebx\n"
28 "\tmovl " VG_SYM(ecx
) ",%ecx\n"
29 "\tmovl " VG_SYM(edx
) ",%edx\n"
30 "\tcmpxchg8b " VG_SYM(m64
) "\n"
31 "\tmovl %eax," VG_SYM(eax
) "\n"
32 "\tmovl %ebx," VG_SYM(ebx
) "\n"
33 "\tmovl %ecx," VG_SYM(ecx
) "\n"
34 "\tmovl %edx," VG_SYM(edx
) "\n"
37 "\tmovl %eax," VG_SYM(zout
) "\n"
49 edx
= 0x11111111; eax
= 0x22222222;
50 ecx
= 0x33333333; ebx
= 0x44444444;
52 m64
= 0x1111111122222222ULL
;
54 printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
55 eax
, ebx
, ecx
, edx
, zout
& 0xFFFF, m64
);
57 edx
= 0x11111111; eax
= 0x22222222;
58 ecx
= 0x33333333; ebx
= 0x44444444;
60 m64
= 0x1111111122222222ULL
;
63 printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
64 eax
, ebx
, ecx
, edx
, zout
& 0xFFFF, m64
);
66 edx
= 0x11111111; eax
= 0x22222222;
67 ecx
= 0x33333333; ebx
= 0x44444444;
69 m64
= 0x1111111122222222ULL
;
70 m64
+= 0x100000000ULL
;
72 printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
73 eax
, ebx
, ecx
, edx
, zout
& 0xFFFF, m64
);
75 edx
= 0x11111111; eax
= 0x22222222;
76 ecx
= 0x33333333; ebx
= 0x44444444;
78 m64
= 0x6666666677777777ULL
;
80 printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
81 eax
, ebx
, ecx
, edx
, zout
& 0xFFFF, m64
);