diff options
Diffstat (limited to 'test/MC/ARM')
-rw-r--r-- | test/MC/ARM/basic-thumb-instructions.s | 22 | ||||
-rw-r--r-- | test/MC/ARM/thumb-diagnostics.s | 8 |
2 files changed, 27 insertions, 3 deletions
diff --git a/test/MC/ARM/basic-thumb-instructions.s b/test/MC/ARM/basic-thumb-instructions.s index 0bb528b..c2d6f42 100644 --- a/test/MC/ARM/basic-thumb-instructions.s +++ b/test/MC/ARM/basic-thumb-instructions.s @@ -296,3 +296,25 @@ _func: lsrs r2, r6 @ CHECK: lsrs r2, r6 @ encoding: [0xf2,0x40] + + +@------------------------------------------------------------------------------ +@ MOV (immediate) +@------------------------------------------------------------------------------ + movs r2, #0 + movs r2, #255 + movs r2, #23 + +@ CHECK: movs r2, #0 @ encoding: [0x00,0x22] +@ CHECK: movs r2, #255 @ encoding: [0xff,0x22] +@ CHECK: movs r2, #23 @ encoding: [0x17,0x22] + + +@------------------------------------------------------------------------------ +@ MOV (register) +@------------------------------------------------------------------------------ + mov r3, r4 + movs r1, r3 + +@ CHECK: mov r3, r4 @ encoding: [0x23,0x46] +@ CHECK: movs r1, r3 @ encoding: [0x19,0x00] diff --git a/test/MC/ARM/thumb-diagnostics.s b/test/MC/ARM/thumb-diagnostics.s index df8f226..6deccac 100644 --- a/test/MC/ARM/thumb-diagnostics.s +++ b/test/MC/ARM/thumb-diagnostics.s @@ -1,5 +1,7 @@ @ RUN: not llvm-mc -triple=thumbv6-apple-darwin < %s 2> %t @ RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s +@ RUN: not llvm-mc -triple=thumbv5-apple-darwin < %s 2> %t +@ RUN: FileCheck --check-prefix=CHECK-ERRORS-V5 < %t %s @ Check for various assembly diagnostic messages on invalid input. @@ -15,9 +17,9 @@ @ CHECK-ERRORS: error: instruction variant requires Thumb2 @ CHECK-ERRORS: add r2, r3 @ CHECK-ERRORS: ^ -@ CHECK-ERRORS: error: instruction variant requires ARMv6 or later -@ CHECK-ERRORS: mov r2, r3 -@ CHECK-ERRORS: ^ +@ CHECK-ERRORS-V5: error: instruction variant requires ARMv6 or later +@ CHECK-ERRORS-V5: mov r2, r3 +@ CHECK-ERRORS-V5: ^ @ Out of range immediates for ASR instruction. |