diff options
Diffstat (limited to 'waftools/fragments/ebx.c')
-rw-r--r-- | waftools/fragments/ebx.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/waftools/fragments/ebx.c b/waftools/fragments/ebx.c new file mode 100644 index 0000000000..b487939c56 --- /dev/null +++ b/waftools/fragments/ebx.c @@ -0,0 +1,12 @@ +int main(void) { + int x; + __asm__ volatile( + "xor %0, %0" + :"=b"(x) + // just adding ebx to clobber list seems unreliable with some + // compilers, e.g. Haiku's gcc 2.95 + ); + // and the above check does not work for OSX 64 bit... + __asm__ volatile("":::"%ebx"); + return 0; +} |