Thumb parsing and encoding for SUB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138359 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/MC/ARM/basic-thumb-instructions.s b/test/MC/ARM/basic-thumb-instructions.s
index 7692abd..e72a363 100644
--- a/test/MC/ARM/basic-thumb-instructions.s
+++ b/test/MC/ARM/basic-thumb-instructions.s
@@ -505,3 +505,31 @@
         strh r6, [r2, r6]
 
 @ CHECK: strh	r6, [r2, r6]            @ encoding: [0x96,0x53]
+
+
+@------------------------------------------------------------------------------
+@ SUB (immediate)
+@------------------------------------------------------------------------------
+        subs r1, r2, #3
+        subs r2, #3
+        subs r2, #8
+
+@ CHECK: subs	r1, r2, #3              @ encoding: [0xd1,0x1e]
+@ CHECK: subs	r2, #3                  @ encoding: [0x03,0x3a]
+@ CHECK: subs	r2, #8                  @ encoding: [0x08,0x3a]
+
+
+@------------------------------------------------------------------------------
+@ FIXME: SUB (SP minus immediate)
+@------------------------------------------------------------------------------
+@------------------------------------------------------------------------------
+@ FIXME: SUB (SP minus register)
+@------------------------------------------------------------------------------
+
+
+@------------------------------------------------------------------------------
+@ SUB (register)
+@------------------------------------------------------------------------------
+        subs r1, r2, r3
+
+@ CHECK: subs	r1, r2, r3              @ encoding: [0xd1,0x1a]