This is an archive of the discontinued LLVM Phabricator instance.

[ARM, Asm] Add diagnostics for general-purpose register operands
ClosedPublic

Authored by olista01 on Aug 14 2017, 9:25 AM.

Details

Summary

This adds diagnostic strings for the ARM general-purpose register
classes, which will be used when these classes are expected by the
assembler, but the provided operand is not valid.

One of these, rGPR, requires C++ code to select the correct error
message, as that class contains different registers in pre-v8 and v8
targets. The rest can all have their diagnostic strings stored in the
tablegen description of them.

Diff Detail

Repository
rL LLVM

Event Timeline

olista01 created this revision.Aug 14 2017, 9:25 AM
rengolin accepted this revision.Aug 14 2017, 11:54 AM

Other than the one comment, LGTM. Thanks!

test/MC/ARM/ldrd-strd-gnu-thumb-bad-regs.s
3 ↗(On Diff #111003)

Right, this is possibly worse than before. Do you have a patch in the queue?

This revision is now accepted and ready to land.Aug 14 2017, 11:54 AM
olista01 added inline comments.Aug 15 2017, 2:56 AM
test/MC/ARM/ldrd-strd-gnu-thumb-bad-regs.s
3 ↗(On Diff #111003)

Yep, I'm working on one, but I keep finding more (unrelated) bugs in these aliases.

olista01 added inline comments.
test/MC/ARM/ldrd-strd-gnu-thumb-bad-regs.s
3 ↗(On Diff #111003)

D36732 to fix this.

This revision was automatically updated to reflect the committed changes.