llvm-project/llvm/test/MC/Disassembler/ARM
Simon Tatham ffb2b347ff [ARM] Fix handling of zero offsets in LOB instructions.
The BF and WLS/WLSTP instructions have various branch-offset fields
occupying different positions and lengths in the instruction encoding,
and all of them were decoded at disassembly time by the function
DecodeBFLabelOffset() which returned SoftFail if the offset was zero.

In fact, it's perfectly fine and not even a SoftFail for most of those
offset fields to be zero. The only one that can't be zero is the 4-bit
field labelled `boff` in the architecture spec, occupying bits {26-23}
of the BF instruction family. If that one is zero, the encoding
overlaps other instructions (WLS, DLS, LETP, VCTP), so it ought to be
a full Fail.

Fixed by adding an extra template parameter to DecodeBFLabelOffset
which controls whether a zero offset is accepted or rejected. Adjusted
existing tests (only in error messages for bad disassemblies); added
extra tests to demonstrate zero offsets being accepted in all the
right places, and a few demonstrating rejection of zero `boff`.

Reviewers: DavidSpickett, ostannard

Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63864

llvm-svn: 364533
2019-06-27 12:41:07 +00:00
..
addrmode2-reencoding.txt
arm-LDREXD-reencoding.txt
arm-STREXD-reencoding.txt
arm-tests.txt
arm-thumb-trustzone.txt
arm-trustzone.txt
arm-vmrs_vmsr.txt [ARM] Fix disassembly for conditional VMRS and VMSR instructions in ARM mode 2017-10-18 14:47:37 +00:00
armv8.1a.txt
armv8.2a-dotprod-a32.s [ARM] Assembler support for the ARMv8.2a dot product instructions 2017-08-11 09:52:30 +00:00
armv8.2a-dotprod-t32.s [ARM] Assembler support for the ARMv8.2a dot product instructions 2017-08-11 09:52:30 +00:00
armv8.3a-js-arm.txt [ARM][AArch64] v8.3-A Javascript Conversion 2017-08-22 11:08:21 +00:00
armv8.3a-js-thumb.txt [ARM][AArch64] v8.3-A Javascript Conversion 2017-08-22 11:08:21 +00:00
armv8.4a-trace-a32.txt [AArch64][ARM] Armv8.4-A: Trace synchronization barrier instruction 2018-07-06 08:03:12 +00:00
armv8.4a-trace-t32.txt [AArch64][ARM] Armv8.4-A: Trace synchronization barrier instruction 2018-07-06 08:03:12 +00:00
armv8.5a-sb-thumb.txt [ARM] Add command-line option for SB 2019-01-03 12:09:12 +00:00
armv8.5a-sb.txt [NFC] Fix missing testfile change of rL350299 2019-01-03 12:48:06 +00:00
armv8a-fpmul-a32.txt [ARM/AArch64] Support FP16 +fp16fml instructions 2018-08-17 11:29:49 +00:00
armv8a-fpmul-t32.txt [ARM/AArch64] Support FP16 +fp16fml instructions 2018-08-17 11:29:49 +00:00
basic-arm-instructions-v8.txt
basic-arm-instructions.txt [ARM][v8.5A] Add speculation barriers SSBB and PSSBB 2018-09-28 08:27:56 +00:00
clrm.txt [ARM] Add the non-MVE instructions in Arm v8.1-M. 2019-06-11 09:29:18 +00:00
coprocessors-arm.txt [ARM] Make coprocessor number restrictions consistent. 2019-06-27 12:40:55 +00:00
coprocessors-thumb.txt [ARM] Make coprocessor number restrictions consistent. 2019-06-27 12:40:55 +00:00
crc32-thumb.txt
crc32.txt
csdb-arm.txt [ARM][AArch64] Add CSDB speculation barrier instruction 2018-02-06 09:24:47 +00:00
csdb-thumb.txt [ARM][AArch64] Add CSDB speculation barrier instruction 2018-02-06 09:24:47 +00:00
d16.txt
dfb-arm.txt [ARM] Armv8-R DFB instruction 2017-12-21 11:17:49 +00:00
dfb-thumb.txt [ARM] Armv8-R DFB instruction 2017-12-21 11:17:49 +00:00
fp-armv8.txt
fp-encoding.txt Revert "[ARM] Fix assembly and disassembly for VMRS/VMSR" 2017-08-08 17:16:46 +00:00
fullfp16-arm-neg.txt
fullfp16-arm-nopred.txt [ARM] Make fullfp16 instructions not conditionalisable. 2019-02-25 10:39:53 +00:00
fullfp16-arm.txt
fullfp16-neon-arm-neg.txt
fullfp16-neon-arm.txt
fullfp16-neon-thumb-neg.txt
fullfp16-neon-thumb.txt
fullfp16-thumb-neg.txt
fullfp16-thumb-nopred.txt [ARM] Make fullfp16 instructions not conditionalisable. 2019-02-25 10:39:53 +00:00
fullfp16-thumb.txt
hex-immediates.txt
invalid-FSTMX-arm.txt
invalid-IT-CC15.txt ARM: correctly decode VFP instructions following unpredictable t2IT 2018-06-26 11:39:20 +00:00
invalid-armv7.txt [ARM][MC] Update one test case in 'test/MC/Disassembler/ARM/invalid-armv7.txt' 2019-03-05 03:07:56 +00:00
invalid-armv8.1a.txt
invalid-armv8.txt
invalid-because-armv7.txt
invalid-thumb-MSR-MClass.txt [ARM]Decoding MSR with unpredictable destination register causes an assert 2018-03-06 15:21:19 +00:00
invalid-thumbv7-xfail.txt
invalid-thumbv7.txt ARM: disallow add/sub to sp unless Rn is also sp. 2019-04-23 13:50:13 +00:00
invalid-thumbv8.1a.txt
invalid-thumbv8.txt
invalid-virtexts.arm.txt
ldrd-armv4.txt
lit.local.cfg [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
load-store-acquire-release-v8-thumb.txt
load-store-acquire-release-v8.txt
marked-up-thumb.txt
memory-arm-instructions.txt
move-banked-regs-arm.txt
move-banked-regs-thumb.txt
mve-bitops.txt [ARM] Add MVE vector bit-operations (register inputs). 2019-06-19 16:43:53 +00:00
mve-float.txt [ARM] Add a batch of MVE floating-point instructions. 2019-06-21 09:35:07 +00:00
mve-integer.txt [ARM] Add a batch of MVE integer instructions. 2019-06-20 15:16:56 +00:00
mve-interleave.txt [ARM] Add MVE interleaving load/store family. 2019-06-24 10:00:39 +00:00
mve-load-store.txt [ARM] Add MVE vector load/store instructions. 2019-06-25 11:24:18 +00:00
mve-minmax.txt [ARM] Add MVE integer vector min/max instructions. 2019-06-18 15:51:46 +00:00
mve-misc.txt [ARM] Fix handling of zero offsets in LOB instructions. 2019-06-27 12:41:07 +00:00
mve-qdest-qsrc.txt [ARM] Add a batch of similarly encoded MVE instructions. 2019-06-21 12:13:59 +00:00
mve-qdest-rsrc.txt [ARM] Fix handling of zero offsets in LOB instructions. 2019-06-27 12:41:07 +00:00
mve-reductions.txt [ARM] Add MVE horizontal accumulation instructions 2019-06-14 14:31:13 +00:00
mve-scalar-shift.txt [ARM] Tighten restrictions on use of SP in v8.1-M CSEL. 2019-06-27 12:40:40 +00:00
mve-shifts.txt [ARM] Add MVE vector shift instructions. 2019-06-18 16:19:59 +00:00
mve-vcmp.txt [ARM] Add MVE vector compare instructions. 2019-06-21 11:14:51 +00:00
mve-vmov-lane.txt [ARM] Add MVE vector bit-operations (register inputs). 2019-06-19 16:43:53 +00:00
mve-vmov-pair.txt [ARM] Add MVE 64-bit GPR <-> vector move instructions. 2019-06-21 13:17:23 +00:00
mve-vpt.txt [ARM] Set up infrastructure for MVE vector instructions. 2019-06-13 13:11:13 +00:00
neon-complex-arm.txt [ARM] v8.3-a complex number support 2017-09-29 13:11:33 +00:00
neon-complex-thumb.txt [ARM] v8.3-a complex number support 2017-09-29 13:11:33 +00:00
neon-crypto.txt
neon-tests.txt
neon-v8.txt
neon.txt
neont-VLD-reencoding.txt
neont-VST-reencoding.txt
neont2.txt
ras-extension-arm.txt
ras-extension-thumb.txt [ARM] Extra MVE-related testing. 2019-06-25 11:24:42 +00:00
thumb-MSR-MClass.txt
thumb-fp-armv8.txt
thumb-neon-crypto.txt
thumb-neon-v8.txt
thumb-printf.txt
thumb-tests.txt
thumb-v8.1a.txt
thumb-v8.txt
thumb-vmrs_vmsr.txt [ARM] Fix disassembly for conditional VMRS and VMSR instructions in ARM mode 2017-10-18 14:47:37 +00:00
thumb1.txt
thumb2-bit-15.txt [ARM] Turn some undefined encoding bits into 0s. 2019-06-04 08:28:48 +00:00
thumb2-preloads.txt
thumb2-v8.1m.txt [ARM] Fix handling of zero offsets in LOB instructions. 2019-06-27 12:41:07 +00:00
thumb2-v8.txt
thumb2-v8m.txt
thumb2.txt [ARM][v8.5A] Add speculation barriers SSBB and PSSBB 2018-09-28 08:27:56 +00:00
thumbv8.1m-vmrs-vmsr.txt [ARM] Add the non-MVE instructions in Arm v8.1-M. 2019-06-11 09:29:18 +00:00
thumbv8.1m.s [ARM] Tighten restrictions on use of SP in v8.1-M CSEL. 2019-06-27 12:40:40 +00:00
unpredictable-ADC-arm.txt
unpredictable-ADDREXT3-arm.txt
unpredictable-AExtI-arm.txt
unpredictable-AI1cmp-arm.txt
unpredictable-BFI.txt
unpredictable-LDR-arm.txt
unpredictable-LDRD-arm.txt
unpredictable-LSL-regform.txt
unpredictable-MRRC2-arm.txt
unpredictable-MRS-arm.txt
unpredictable-MUL-arm.txt
unpredictable-MVN-arm.txt [ARM] Add support for unpredictable MVN instructions. 2018-02-01 12:06:57 +00:00
unpredictable-RSC-arm.txt
unpredictable-SEL-arm.txt
unpredictable-SHADD16-arm.txt
unpredictable-SSAT-arm.txt
unpredictable-STRBrs-arm.txt
unpredictable-UQADD8-arm.txt
unpredictable-swp-arm.txt
unpredictables-thumb.txt
vfp4.txt
virtexts-arm.txt
virtexts-thumb.txt
vscclrm.txt [ARM] Fix a typo in the test from r363039 2019-06-11 13:36:06 +00:00
vstrldr_sys.txt [ARM] Add the non-MVE instructions in Arm v8.1-M. 2019-06-11 09:29:18 +00:00