You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clang and gcc seem to have different behavior of floating point constraints for inline asm targetting MIPS. Consider this simple example
// gcc compiles this but clang does notvoidread_float(float*p) {
floatresult=*p;
__asm__("" ::"r"(result));
}
The following code compiles fine on gcc when targeting MIPS, but clang gives a compile error couldn't allocate input reg for constraint 'r'
Clang requires the register constraint here to be "f" not "r". However applying an "f" constraint, causes gcc to fail compilation with the error error: impossible constraint in 'asm' while clang compiles the code fine.
// clang compiles this but gcc does notvoidread_float(float*p) {
floatresult=*p;
__asm__("" ::"f"(result));
}