Add CC clobber to cpuid call
This should not be needed, but it does not hurt. According to Ian Lance Taylor (http://gcc.gnu.org/ml/gcc-help/2014-02/msg00023.html), the CC clobber causes GCC to forget its internal representation of flag state. It should not be needed for cpuid. However, Clang has some odd behave in a couple of versions of its compiler when using cpuid. Both JW and UB experienced it on separate occassions.pull/339/head
parent
61aa62bd8f
commit
5be05bce07
1
cpu.cpp
1
cpu.cpp
|
|
@ -113,6 +113,7 @@ bool CpuId(word32 input, word32 output[4])
|
||||||
# endif
|
# endif
|
||||||
: "=a" (output[0]), "=D" (output[1]), "=c" (output[2]), "=d" (output[3])
|
: "=a" (output[0]), "=D" (output[1]), "=c" (output[2]), "=d" (output[3])
|
||||||
: "a" (input), "c" (0)
|
: "a" (input), "c" (0)
|
||||||
|
: "cc"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue