This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add missing Thumb2 assembler diagnostics.
ClosedPublic

Authored by efriedma on Jun 26 2018, 2:54 PM.

Details

Summary

Mostly just adding checks for Thumb2 instructions which correspond to ARM instructions which already had diagnostics. While I'm here, also fix ARM-mode strd to check the input registers correctly.

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.Jun 26 2018, 2:54 PM
SjoerdMeijer accepted this revision.Jun 27 2018, 1:00 AM

Looks OK to me.

lib/Target/ARM/AsmParser/ARMAsmParser.cpp
6405

Nit: all these cases are all so similar, and differ only in a few constants. While you're at it, do you think these patterns can be factored out?

This revision is now accepted and ready to land.Jun 27 2018, 1:00 AM
efriedma added inline comments.Jun 27 2018, 1:57 PM
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
6405

Maybe I can factor out the LDRD/STRD cases, specifically... something like bool ValidateLDRDSTRD(const MCInst &Inst, bool Load, bool ARMMode, bool Increment)?

efriedma updated this revision to Diff 153191.Jun 27 2018, 3:16 PM

Refactored the ldrd/strd checking.

cheers, looks good!

This revision was automatically updated to reflect the committed changes.