The fX version of floating-point registers only supports single precision. We need to map the name to dX for doubles and qX for long doubles if we want getRegForInlineAsmConstraint() to be able to pick the correct register class.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Some test cases for the error cases would be good here (e.g. "{f1}" with a double).
lib/Target/Sparc/SparcISelLowering.cpp | ||
---|---|---|
3501–3504 ↗ | (On Diff #148203) | Ugh, unrelated to this commit, but this just made me notice that in Clang's inline asm code, we convert register names *to* r0-r31, only to convert it back, here. That's just silly. |
3516 ↗ | (On Diff #148203) | As a note, that SparcAsmParser.cpp has to do something very similar in MorphToDoubleReg. It might be nice if they could use the same code. But, this seems fine for now. |