diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-11-10 19:18:01 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-11-10 19:18:01 +0000 |
commit | ee10ff89a2934636570cb17b756bf31b2a38aab5 (patch) | |
tree | 95f3446ea98fa1984a7c8303b3c5f4124b74f26b /test/MC | |
parent | a6f5a81285bab84212209d47b1238505512c7c87 (diff) | |
download | llvm-ee10ff89a2934636570cb17b756bf31b2a38aab5.tar.gz llvm-ee10ff89a2934636570cb17b756bf31b2a38aab5.tar.bz2 llvm-ee10ff89a2934636570cb17b756bf31b2a38aab5.tar.xz |
ARM assembly parsing for LSR/LSL/ROR(immediate).
More of rdar://9704684
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144301 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/ARM/basic-arm-instructions.s | 35 | ||||
-rw-r--r-- | test/MC/ARM/thumb-diagnostics.s | 4 |
2 files changed, 33 insertions, 6 deletions
diff --git a/test/MC/ARM/basic-arm-instructions.s b/test/MC/ARM/basic-arm-instructions.s index f2f6a94727..22ad3cd9cc 100644 --- a/test/MC/ARM/basic-arm-instructions.s +++ b/test/MC/ARM/basic-arm-instructions.s @@ -261,9 +261,11 @@ Lforward: @------------------------------------------------------------------------------ asr r2, r4, #32 asr r2, r4, #2 + asr r2, r4, #0 @ CHECK: asr r2, r4, #32 @ encoding: [0x44,0x20,0xa0,0xe1] @ CHECK: asr r2, r4, #2 @ encoding: [0x44,0x21,0xa0,0xe1] +@ CHECK: mov r2, r4 @ encoding: [0x04,0x20,0xa0,0xe1] @------------------------------------------------------------------------------ @@ -787,11 +789,28 @@ Lforward: @ CHECK: ldrhthi r8, [r11], #0 @ encoding: [0xb0,0x80,0xfb,0x80] @------------------------------------------------------------------------------ -@ FIXME: LSL +@ LSL @------------------------------------------------------------------------------ + lsl r2, r4, #31 + lsl r2, r4, #1 + lsl r2, r4, #0 + +@ CHECK: lsl r2, r4, #31 @ encoding: [0x84,0x2f,0xa0,0xe1] +@ CHECK: lsl r2, r4, #1 @ encoding: [0x84,0x20,0xa0,0xe1] +@ CHECK: mov r2, r4 @ encoding: [0x04,0x20,0xa0,0xe1] + + @------------------------------------------------------------------------------ -@ FIXME: LSR +@ LSR @------------------------------------------------------------------------------ + lsr r2, r4, #32 + lsr r2, r4, #2 + lsr r2, r4, #0 + +@ CHECK: lsr r2, r4, #32 @ encoding: [0x24,0x20,0xa0,0xe1] +@ CHECK: lsr r2, r4, #2 @ encoding: [0x24,0x21,0xa0,0xe1] +@ CHECK: mov r2, r4 @ encoding: [0x04,0x20,0xa0,0xe1] + @------------------------------------------------------------------------------ @ MCR/MCR2 @@ -1320,6 +1339,18 @@ Lforward: @------------------------------------------------------------------------------ +@ ROR +@------------------------------------------------------------------------------ + ror r2, r4, #31 + ror r2, r4, #1 + ror r2, r4, #0 + +@ CHECK: ror r2, r4, #31 @ encoding: [0xe4,0x2f,0xa0,0xe1] +@ CHECK: ror r2, r4, #1 @ encoding: [0xe4,0x20,0xa0,0xe1] +@ CHECK: mov r2, r4 @ encoding: [0x04,0x20,0xa0,0xe1] + + +@------------------------------------------------------------------------------ @ RSB @------------------------------------------------------------------------------ rsb r4, r5, #0xf000 diff --git a/test/MC/ARM/thumb-diagnostics.s b/test/MC/ARM/thumb-diagnostics.s index 548ba70bfc..99d7e38c7e 100644 --- a/test/MC/ARM/thumb-diagnostics.s +++ b/test/MC/ARM/thumb-diagnostics.s @@ -24,13 +24,9 @@ @ Out of range immediates for ASR instruction. asrs r2, r3, #33 - asrs r2, r3, #0 @ CHECK-ERRORS: error: invalid operand for instruction @ CHECK-ERRORS: asrs r2, r3, #33 @ CHECK-ERRORS: ^ -@ CHECK-ERRORS: error: invalid operand for instruction -@ CHECK-ERRORS: asrs r2, r3, #0 -@ CHECK-ERRORS: ^ @ Out of range immediates for BKPT instruction. bkpt #256 |