Hi, MIPS backend supports three float point ABI: "hard", "soft" and "single". Clang driver does not support these float ABI correctly and has the following bugs: 1. The "single" float ABI is not supported at all. 2. It's impossible to turn on "hard" float ABI using command line. The driver accepts "-mhard-float" argument and pass it further but "-mhard-float" is not valid CC1 option. 3. If no one float ABI option is specified, the driver shows a warning and suggests to use "-mfloat-abi=soft" option. But this option is not supported for MIPS targets. 4. Clang does not define macros to mark selected float ABI (__mips_hard_float / __mips_soft_float / __mips_single_float).
The attached patch solves these problems by this way: 1. Clang driver accepts the following options for MIPS targets and configures the backend accordingly: "hard": "-mhard-float" or "-mfloat-abi=hard" "soft": "-msoft-float" or "-mfloat-abi=soft" "single": "-mfloat-abi=single" 2. Float ABI marker macros are defined. 3. If float ABI is not selected explicitly, the driver does not show any warning and uses "hard" ABI by default. I switched default float ABI to be compatible with gcc driver. -- Simon
mips-float-abi.patch
Description: mips-float-abi.patch
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
