diff options
author | Mihai Popa <mihail.popa@gmail.com> | 2013-07-03 09:21:44 +0000 |
---|---|---|
committer | Mihai Popa <mihail.popa@gmail.com> | 2013-07-03 09:21:44 +0000 |
commit | b81b477cd4392a51112c3af0659ea9fc176e74f1 (patch) | |
tree | cf756fe65576dcd08809d3b7db34079776a0a7bc /test/MC/ARM/basic-thumb2-instructions.s | |
parent | a10c01a6c62792be825c562314a646437b21bfec (diff) | |
download | llvm-b81b477cd4392a51112c3af0659ea9fc176e74f1.tar.gz llvm-b81b477cd4392a51112c3af0659ea9fc176e74f1.tar.bz2 llvm-b81b477cd4392a51112c3af0659ea9fc176e74f1.tar.xz |
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
Diffstat (limited to 'test/MC/ARM/basic-thumb2-instructions.s')
-rw-r--r-- | test/MC/ARM/basic-thumb2-instructions.s | 8 |
1 files changed, 5 insertions, 3 deletions
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) |