This is an archive of the discontinued LLVM Phabricator instance.

[X86] Enable soft float ABI for x86
ClosedPublic

Authored by mkuper on Oct 8 2015, 7:43 AM.

Details

Summary

The Intel MCU psABI is a new soft-float ABI, based on the IA32 psABI.
The document describing the ABI can be found here: https://github.com/hjl-tools/x86-psABI/wiki/iamcu-psABI-0.7.pdf

Perhaps the biggest difference between the IA32 and MCU ABIs is that the MCU ABI is soft-float.
This patch makes the x86-32 ABI code respect "-mfloat-abi soft" and generate float inreg arguments.

This is the first patch in a series - there will be separate patches to add the "-miamcu" driver option, as well as more ABI adjustments to actually make it work.

(I'll clean up the one-letter variable names in a separate commit.)

Diff Detail

Event Timeline

mkuper updated this revision to Diff 36853.Oct 8 2015, 7:43 AM
mkuper retitled this revision from to [X86] Enable soft float ABI for x86.
mkuper updated this object.
mkuper added reviewers: rafael, rnk.
mkuper added a subscriber: cfe-commits.
rnk accepted this revision.Oct 16 2015, 6:50 PM
rnk edited edge metadata.

lgtm Sorry, took me a while to read the document and understand why you want float inreg.

I think we overload LLVM inreg to mean "put this float / double in an SSE register", but I think it's reasonable for it to mean "put it in an integer register" when FP support is disabled in the subtarget.

This revision is now accepted and ready to land.Oct 16 2015, 6:50 PM

It's ok, thanks a lot for taking the time to review it!

This revision was automatically updated to reflect the committed changes.