This is an archive of the discontinued LLVM Phabricator instance.

[Sparc] Use float register for integer constrained with "f" in inline asm
ClosedPublic

Authored by dcederman on Sep 4 2018, 2:09 AM.

Details

Summary

Constraining an integer value to a floating point register using "f" causes an llvm_unreachable to trigger. This patch allows i32 integers to be placed in a single precision float register and i64 integers to be placed in a double precision float register. This matches the behavior of GCC.

For other types the llvm_unreachable is removed to instead trigger an error message that points out the offending line.

Diff Detail

Repository
rL LLVM

Event Timeline

dcederman created this revision.Sep 4 2018, 2:09 AM
jyknight accepted this revision.Dec 4 2018, 3:06 PM

Seems odd, but this appears to match GCC's behavior, so, LG.

This revision is now accepted and ready to land.Dec 4 2018, 3:06 PM
This revision was automatically updated to reflect the committed changes.