ARM testcases for MOVT.
authorJim Grosbach <grosbach@apple.com>
Tue, 19 Jul 2011 20:23:25 +0000 (20:23 +0000)
committerJim Grosbach <grosbach@apple.com>
Tue, 19 Jul 2011 20:23:25 +0000 (20:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135516 91177308-0d34-0410-b5e6-96231b3b80d8

test/MC/ARM/basic-arm-instructions.s
test/MC/ARM/diagnostics.s

index 3bc061127a43a48670523b7a6f6729f6de6a4de1..9c403883a86e165731842b5f4b6e94637f337a1d 100644 (file)
@@ -704,6 +704,17 @@ _func:
 @ CHECK: moveq r2, r3                  @ encoding: [0x03,0x20,0xa0,0x01]
 @ CHECK: movseq        r2, r3                  @ encoding: [0x03,0x20,0xb0,0x01]
 
+@------------------------------------------------------------------------------
+@ MOVT
+@------------------------------------------------------------------------------
+    movt r3, #7
+    movt r6, #0xffff
+    movteq r4, #0xff0
+
+@ CHECK: movt  r3, #7                  @ encoding: [0x07,0x30,0x40,0xe3]
+@ CHECK: movt  r6, #65535              @ encoding: [0xff,0x6f,0x4f,0xe3]
+@ CHECK: movteq        r4, #4080               @ encoding: [0xf0,0x4f,0x40,0x03]
+
 @------------------------------------------------------------------------------
 @ STM*
 @------------------------------------------------------------------------------
index 08c982e182fcdc954b6ec8bc46596a915497ab70..b0101414e8946c36ee4e26f5838db517569ef3cf 100644 (file)
@@ -99,3 +99,7 @@
         movwseq r9, #0xffff
 @ CHECK-ERRORS: error: invalid operand for instruction
 @ CHECK-ERRORS: error: instruction 'movw' can not set flags, but 's' suffix specified
+
+        @ Out of range immediate for MOVT
+        movt r9, 0x10000
+@ CHECK-ERRORS: error: invalid operand for instruction