From b81b477cd4392a51112c3af0659ea9fc176e74f1 Mon Sep 17 00:00:00 2001 From: Mihai Popa Date: Wed, 3 Jul 2013 09:21:44 +0000 Subject: This corrects the implementation of Thumb ADR instruction. There are three issues: 1. it should accept only 4-byte aligned addresses 2. the maximum offset should be 1020 3. it should be encoded with the offset scaled by two bits git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185528 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/ARM/basic-thumb2-instructions.s | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/MC/ARM/basic-thumb2-instructions.s') diff --git a/test/MC/ARM/basic-thumb2-instructions.s b/test/MC/ARM/basic-thumb2-instructions.s index b529a26ade..c331d5d522 100644 --- a/test/MC/ARM/basic-thumb2-instructions.s +++ b/test/MC/ARM/basic-thumb2-instructions.s @@ -134,12 +134,14 @@ _func: @------------------------------------------------------------------------------ subw r11, pc, #3270 + adr.w r2, #3 adr.w r11, #-826 adr.w r1, #-0x0 -@ CHECK: subw r11, pc, #3270 @ encoding: [0xaf,0xf6,0xc6,0x4b] -@ CHECK: adr.w r11, #-826 @ encoding: [0xaf,0xf2,0x3a,0x3b] -@ CHECK: adr.w r1, #-0 @ encoding: [0xaf,0xf2,0x00,0x01] +@ CHECK: subw r11, pc, #3270 @ encoding: [0xaf,0xf6,0xc6,0x4b] +@ CHECK: adr.w r2, #3 @ encoding: [0x0f,0xf2,0x03,0x02] +@ CHECK: adr.w r11, #-826 @ encoding: [0xaf,0xf2,0x3a,0x3b] +@ CHECK: adr.w r1, #-0 @ encoding: [0xaf,0xf2,0x00,0x01] @------------------------------------------------------------------------------ @ AND (immediate) -- cgit v1.2.3