mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
m_fixed: asm: cc is not a register
gcc accepts __asm__ ( "" : : : "%cc"); but not clang: error: unknown register name '%cc' in asm :"%cc", "%edx" // edx and condition codes clobbered 'cc' is not a register, thus '%cc' is rightfully not accepted. Repro: build the project on x86_64 with: cmake -H. -Bbuild -DCMAKE_C_COMPILER=clang -DCMAKE_SIZEOF_VOID_P=4 -DCMAKE_C_FLAGS="-m32"
This commit is contained in:
parent
8e5ac64d7c
commit
6866dac171
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ typedef INT32 fixed_t;
|
|||
:"=a" (ret) // eax is always the result and the first operand (%0,%1)
|
||||
:"0" (a), "r" (b) // and %2 is what we use imull on with what in %1
|
||||
, "I" (FRACBITS) // %3 holds FRACBITS (normally 16)
|
||||
:"%cc", "%edx" // edx and condition codes clobbered
|
||||
:"cc", "%edx" // edx and condition codes clobbered
|
||||
);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue