4 unsigned int _eax
,_ebx
,_ecx
,_edx
;
5 unsigned int level
= 0;
7 /* Test gcc inline asm for x86. Note that we CANNOT plainly use __x86_64__
8 * to correspond to a 64-bit environment without also checking that __ILP32__
9 * is NOT set, since x32 uses __x86_64__.
11 #if (defined(__x86_64__) && !defined(__ILP32__))
12 __asm__("push %%rbx \n\t"
16 : "=a"(_eax
), "=r"(_ebx
), "=c"(_ecx
), "=d"(_edx
) : "0"(level
));
17 #elif (defined(__x86_64__) && defined(__ILP32__)) || defined(__i386__)
18 __asm__("push %%ebx \n\t"
22 : "=a"(_eax
), "=r"(_ebx
), "=c"(_ecx
), "=d"(_edx
) : "0"(level
));
24 # error Cannot detect whether this is a 32-bit or 64-bit x86 build.