From b78821d380b6f9514bd3b56b1c27ba367660228b Mon Sep 17 00:00:00 2001 From: Joe Abbey Date: Tue, 26 Mar 2013 13:58:53 +0000 Subject: Patch by Gordon Keiser! If PC or SP is the destination, the disassembler erroneously failed with the invalid encoding, despite the manual saying that both are fine. This patch addresses failure to decode encoding T4 of LDR (A8.8.62) which is a postindexed load, where the offset 0xc is applied to SP after the load occurs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178017 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/Disassembler/ARM/thumb2.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/MC/Disassembler/ARM/thumb2.txt') diff --git a/test/MC/Disassembler/ARM/thumb2.txt b/test/MC/Disassembler/ARM/thumb2.txt index 45dace3b09..0baa98a5d9 100644 --- a/test/MC/Disassembler/ARM/thumb2.txt +++ b/test/MC/Disassembler/ARM/thumb2.txt @@ -554,6 +554,7 @@ # CHECK: ldr.w r8, [r8, r2, lsl #2] # CHECK: ldr.w r7, [sp, r2, lsl #1] # CHECK: ldr.w r7, [sp, r2] +# CHECK: ldr pc, [sp], #12 # CHECK: ldr r2, [r4, #255]! # CHECK: ldr r8, [sp, #4]! # CHECK: ldr lr, [sp, #-4]! @@ -567,6 +568,7 @@ 0x58 0xf8 0x22 0x80 0x5d 0xf8 0x12 0x70 0x5d 0xf8 0x02 0x70 +0x5d 0xf8 0x0c 0xfb 0x54 0xf8 0xff 0x2f 0x5d 0xf8 0x04 0x8f 0x5d 0xf8 0x04 0xed -- cgit v1.2.3-18-g5258 From ce888351106a72825e2a107cb08d7130f3dce0ee Mon Sep 17 00:00:00 2001 From: Gordon Keiser Date: Thu, 28 Mar 2013 19:22:28 +0000 Subject: Fix issue with disassembler decoding CBZ/CBNZ immediates as negatives when the upper bit is set. They should always be zero-extended, not sign extended. Added test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178275 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/Disassembler/ARM/thumb2.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/MC/Disassembler/ARM/thumb2.txt') diff --git a/test/MC/Disassembler/ARM/thumb2.txt b/test/MC/Disassembler/ARM/thumb2.txt index 0baa98a5d9..31f75b39fa 100644 --- a/test/MC/Disassembler/ARM/thumb2.txt +++ b/test/MC/Disassembler/ARM/thumb2.txt @@ -254,9 +254,12 @@ #------------------------------------------------------------------------------ # CHECK: cbnz r7, #6 # CHECK: cbnz r7, #12 +# CHECK: cbz r4, #64 0x1f 0xb9 0x37 0xb9 +0x04 0xb3 + #------------------------------------------------------------------------------ # CDP/CDP2 -- cgit v1.2.3-18-g5258