Thumb2 assembly parsing and encoding for LDR(literal).
authorJim Grosbach <grosbach@apple.com>
Wed, 7 Sep 2011 21:33:16 +0000 (21:33 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 7 Sep 2011 21:33:16 +0000 (21:33 +0000)
Need branch relocation support to distinguish this encoding from the
16-bit Thumb1 encoding w/o the explicit .w suffix. That comes later, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139257 91177308-0d34-0410-b5e6-96231b3b80d8

test/MC/ARM/basic-thumb2-instructions.s

index c041015fedf435e833fc3776db976df0e53c1b7f..40c152d347914758fdfca284b2f01df35ff10140 100644 (file)
@@ -530,6 +530,15 @@ _func:
 @ CHECK: ldr.w pc, [r7, #257]          @ encoding: [0xd7,0xf8,0x01,0xf1]
 
 
+@------------------------------------------------------------------------------
+@ LDR(literal)
+@------------------------------------------------------------------------------
+        ldr.w r5, _foo
+
+@ CHECK: ldr.w r5, _foo                @ encoding: [0x5f'A',0xf8'A',A,0x50'A']
+            @   fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
+
+
 @------------------------------------------------------------------------------
 @ IT
 @------------------------------------------------------------------------------