This is an archive of the discontinued LLVM Phabricator instance.

[1/4] SP and PC as shifted-reg operands are unpredictable in ARMv7 Thumb
ClosedPublic

Authored by tyomitch on Oct 28 2015, 3:06 AM.

Diff Detail

Event Timeline

tyomitch updated this revision to Diff 38638.Oct 28 2015, 3:06 AM
tyomitch retitled this revision from to [1/4] SP and PC as shifted-reg operands are unpredictable in ARMv7 Thumb.
tyomitch added reviewers: jmolloy, rengolin.
tyomitch added a subscriber: llvm-commits.
rengolin added inline comments.Oct 28 2015, 3:55 AM
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
8546–8555
} else if (...) {
8655

This seems an awfully specific error message to this generic error.

So far, the only use in for SP, but if someone re-uses it for something else, the error message will be completely bogus.

test/MC/ARM/thumb2-diagnostics.s
99

Also add a test for SP on ARMv8.

tyomitch added inline comments.Oct 28 2015, 4:22 AM
test/MC/ARM/thumb2-diagnostics.s
99

Actually, I'm adding such a test in http://reviews.llvm.org/D14142#inline-115599 -- the motivation being that this test file checks encodings invalid both in ARMv7 and in ARMv8, while test/MC/ARM/basic-thumb2-instructions-v8.s checks encodings invalid in ARMv7 but valid in ARMv8.

Should I move that hunk into this patch?

rengolin added inline comments.Oct 28 2015, 4:27 AM
test/MC/ARM/thumb2-diagnostics.s
99

I think all patches could be merged together. Now that I have reviewed them all separately, I realised that they are very much entangled.

tyomitch updated this revision to Diff 38653.Oct 28 2015, 6:40 AM

The four patches updated and merged.

rengolin accepted this revision.Oct 28 2015, 6:45 AM
rengolin edited edge metadata.

Thanks! LGTM.

This revision is now accepted and ready to land.Oct 28 2015, 6:45 AM
This revision was automatically updated to reflect the committed changes.