aboutsummaryrefslogtreecommitdiff
path: root/test/MC
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-09-16 22:58:42 +0000
committerJim Grosbach <grosbach@apple.com>2011-09-16 22:58:42 +0000
commitf67e8554bf4808ad447ffb5d2deebbb10b810391 (patch)
tree34cc11357e26a4749b8d74d2fde2b9c771bab3dc /test/MC
parente4f2df945a69e70f8e045baea3a14f3cdc076554 (diff)
Thumb2 assembly parsing and encoding for SUB(immediate).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/ARM/basic-thumb2-instructions.s28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/MC/ARM/basic-thumb2-instructions.s b/test/MC/ARM/basic-thumb2-instructions.s
index 3d86850ced..7f08d480b2 100644
--- a/test/MC/ARM/basic-thumb2-instructions.s
+++ b/test/MC/ARM/basic-thumb2-instructions.s
@@ -2391,6 +2391,34 @@ _func:
@------------------------------------------------------------------------------
+@ SUB (immediate)
+@------------------------------------------------------------------------------
+ itet eq
+ subeq r1, r2, #4
+ subwne r5, r3, #1023
+ subeq r4, r5, #293
+ sub r2, sp, #1024
+ sub r2, r8, #0xff00
+ sub r2, r3, #257
+ subw r2, r3, #257
+ sub r12, r6, #0x100
+ subw r12, r6, #0x100
+ subs r1, r2, #0x1f0
+
+@ CHECK: itet eq @ encoding: [0x0a,0xbf]
+@ CHECK: subeq r1, r2, #4 @ encoding: [0x11,0x1f]
+@ CHECK: subwne r5, r3, #1023 @ encoding: [0xa3,0xf2,0xff,0x35]
+@ CHECK: subweq r4, r5, #293 @ encoding: [0xa5,0xf2,0x25,0x14]
+@ CHECK: sub.w r2, sp, #1024 @ encoding: [0xad,0xf5,0x80,0x62]
+@ CHECK: sub.w r2, r8, #65280 @ encoding: [0xa8,0xf5,0x7f,0x42]
+@ CHECK: subw r2, r3, #257 @ encoding: [0xa3,0xf2,0x01,0x12]
+@ CHECK: subw r2, r3, #257 @ encoding: [0xa3,0xf2,0x01,0x12]
+@ CHECK: sub.w r12, r6, #256 @ encoding: [0xa6,0xf5,0x80,0x7c]
+@ CHECK: subw r12, r6, #256 @ encoding: [0xa6,0xf2,0x00,0x1c]
+@ CHECK: subs.w r1, r2, #496 @ encoding: [0xb2,0xf5,0xf8,0x71]
+
+
+@------------------------------------------------------------------------------
@ SUB (register)
@------------------------------------------------------------------------------
sub.w r5, r2, r12, rrx