This is an archive of the discontinued LLVM Phabricator instance.

Thumb2 BXJ should be undefined for v7M, v8A
ClosedPublic

Authored by olista01 on Sep 23 2014, 1:15 AM.

Details

Reviewers
rengolin
Summary

The Thumb2 BXJ instruction (Branch and Exchange Jazelle) is not defined for v7M or v8A. It is defined for all other Thumb2-supporting architectures (v6T2, v7A and v7R).

Diff Detail

Event Timeline

olista01 updated this revision to Diff 13975.Sep 23 2014, 1:15 AM
olista01 retitled this revision from to Thumb2 BXJ should be undefined for v7M, v8A.
olista01 updated this object.
olista01 edited the test plan for this revision. (Show Details)
olista01 set the repository for this revision to rL LLVM.
olista01 added a subscriber: Unknown Object (MLST).
rengolin added inline comments.
test/MC/ARM/thumb2-bxj.s
10

this error message is misleading

olista01 added inline comments.Sep 25 2014, 2:24 AM
test/MC/ARM/thumb2-bxj.s
10

There are many other instructions that give this error, for example "adds r0, #0x100" gives it when assembling for v6M, despite the fact that the instruction is also allowed by v7M.

The set of missing features comes from TableGen'd code (near the end of AsmMatcherEmitter.cpp), which reports the missing feature set for the instruction which has the fewest missing features (or the last one found in case of ties). Maybe this could be improved to report multiple instructions that were rejected because of missing target features, but that is well outside the scope of this patch.

rengolin accepted this revision.Sep 25 2014, 2:29 AM
rengolin added a reviewer: rengolin.
rengolin added inline comments.
test/MC/ARM/thumb2-bxj.s
10

Good point. Can you create a low priority bug regarding this? Not necessarily critical, but a good FIXME case for newcomers.

LGTM. Thanks!

This revision is now accepted and ready to land.Sep 25 2014, 2:29 AM
olista01 closed this revision.Sep 25 2014, 3:12 AM

Thanks. I have committed this as r218445, and opened http://llvm.org/bugs/show_bug.cgi?id=21066 to cover improving the error messages.