[PATCH] Thumb2 BXJ should be undefined for v7M, v8A

Oliver Stannard oliver.stannard at arm.com
Thu Sep 25 02:24:16 PDT 2014


================
Comment at: test/MC/ARM/thumb2-bxj.s:10
@@ +9,2 @@
+@ CHECK: bxj r2                      @ encoding: [0xc2,0xf3,0x00,0x8f]
+@ UNDEF: error: instruction requires: arm-mode
----------------
rengolin wrote:
> this error message is misleading
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.

http://reviews.llvm.org/D5458






More information about the llvm-commits mailing list