diff options
| author | Jim Grosbach <grosbach@apple.com> | 2011-09-01 00:28:52 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2011-09-01 00:28:52 +0000 |
| commit | 1d3c137839265494b2c0828f2b8bf311cfbc7a0b (patch) | |
| tree | 02b2da34de494562ae5c4be4f774f13e4f4abc6a /llvm/test | |
| parent | eef47ba664b73ea68a8346bbf4e780de47031d4b (diff) | |
| download | bcm5719-llvm-1d3c137839265494b2c0828f2b8bf311cfbc7a0b.tar.gz bcm5719-llvm-1d3c137839265494b2c0828f2b8bf311cfbc7a0b.zip | |
Thumb2 assembly parsing and encoding for ADD(immediate).
llvm-svn: 138922
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/MC/ARM/basic-thumb2-instructions.s | 28 | ||||
| -rw-r--r-- | llvm/test/MC/ARM/thumb-diagnostics.s | 4 |
2 files changed, 30 insertions, 2 deletions
diff --git a/llvm/test/MC/ARM/basic-thumb2-instructions.s b/llvm/test/MC/ARM/basic-thumb2-instructions.s index d00566ae04a..492687ea40c 100644 --- a/llvm/test/MC/ARM/basic-thumb2-instructions.s +++ b/llvm/test/MC/ARM/basic-thumb2-instructions.s @@ -60,6 +60,34 @@ _func: @------------------------------------------------------------------------------ +@ ADD (immediate) +@------------------------------------------------------------------------------ + itet eq + addeq r1, r2, #4 + addwne r5, r3, #1023 + addeq r4, r5, #293 + add r2, sp, #1024 + add r2, r8, #0xff00 + add r2, r3, #257 + addw r2, r3, #257 + add r12, r6, #0x100 + addw r12, r6, #0x100 + adds r1, r2, #0x1f0 + +@ CHECK: itet eq @ encoding: [0x0a,0xbf] +@ CHECK: addeq r1, r2, #4 @ encoding: [0x11,0x1d] +@ CHECK: addwne r5, r3, #1023 @ encoding: [0x03,0xf2,0xff,0x35] +@ CHECK: addweq r4, r5, #293 @ encoding: [0x05,0xf2,0x25,0x14] +@ CHECK: add.w r2, sp, #1024 @ encoding: [0x0d,0xf5,0x80,0x62] +@ CHECK: add.w r2, r8, #65280 @ encoding: [0x08,0xf5,0x7f,0x42] +@ CHECK: addw r2, r3, #257 @ encoding: [0x03,0xf2,0x01,0x12] +@ CHECK: addw r2, r3, #257 @ encoding: [0x03,0xf2,0x01,0x12] +@ CHECK: add.w r12, r6, #256 @ encoding: [0x06,0xf5,0x80,0x7c] +@ CHECK: addw r12, r6, #256 @ encoding: [0x06,0xf2,0x00,0x1c] +@ CHECK: adds.w r1, r2, #496 @ encoding: [0x12,0xf5,0xf8,0x71] + + +@------------------------------------------------------------------------------ @ CBZ/CBNZ @------------------------------------------------------------------------------ cbnz r7, #6 diff --git a/llvm/test/MC/ARM/thumb-diagnostics.s b/llvm/test/MC/ARM/thumb-diagnostics.s index ea5d115be94..72572bca5c7 100644 --- a/llvm/test/MC/ARM/thumb-diagnostics.s +++ b/llvm/test/MC/ARM/thumb-diagnostics.s @@ -134,6 +134,6 @@ error: invalid operand for instruction @ CHECK-ERRORS: error: invalid operand for instruction @ CHECK-ERRORS: add sp, sp, #512 @ CHECK-ERRORS: ^ -@ CHECK-ERRORS: error: invalid operand for instruction +@ CHECK-ERRORS: error: instruction requires a CPU feature not currently enabled @ CHECK-ERRORS: add r2, sp, #1024 -@ CHECK-ERRORS: ^ +@ CHECK-ERRORS: ^ |

