4 typedef unsigned int UInt
;
9 #define GO16(REG,VALUE) \
11 __asm__ __volatile__( \
12 "pushl %%" REG " \n\t" \
13 "movl 0(" "%0" "), %%" REG " \n\t" \
14 ".byte 0x66 \n\t" "bswapl %%" REG "\n\t" \
15 "movl %%" REG ", 0(" "%0" ") \n\t" \
17 : : "r" (&value) : REG, "memory", "cc" \
19 printf("0x%08x\n", value)
22 GO16("eax", 0x12345678);
23 GO16("ebx", 0x23456789);
24 GO16("ecx", 0x3456789a);
25 GO16("edx", 0x456789ab);
26 GO16("esi", 0x56789abc);
27 GO16("edi", 0x6789abcd);
28 //GO16("ebp", 0x789abcde); // The compiler complains