aboutsummaryrefslogtreecommitdiffhomepage
path: root/waftools/fragments/ebx.c
blob: b487939c5603ef20fe9382354436c6f5e0773a4d (plain)
1
2
3
4
5
6
7
8
9
10
11
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;
}