Thumb assembly parsing and encoding for LDR(literal).
authorJim Grosbach <grosbach@apple.com>
Fri, 19 Aug 2011 18:20:48 +0000 (18:20 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 19 Aug 2011 18:20:48 +0000 (18:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138052 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
test/MC/ARM/basic-thumb-instructions.s

index 89b5acefa538c66e4c8438adcab9dafb2eb63429..8520c3fe4c4935adc1006b355e24477227d36e59 100644 (file)
@@ -79,7 +79,7 @@ public:
 { "fixup_arm_thumb_bl",      0,            32,  MCFixupKindInfo::FKF_IsPCRel },
 { "fixup_arm_thumb_blx",     0,            32,  MCFixupKindInfo::FKF_IsPCRel },
 { "fixup_arm_thumb_cb",      0,            16,  MCFixupKindInfo::FKF_IsPCRel },
-{ "fixup_arm_thumb_cp",      1,             8,  MCFixupKindInfo::FKF_IsPCRel },
+{ "fixup_arm_thumb_cp",      0,             8,  MCFixupKindInfo::FKF_IsPCRel },
 { "fixup_arm_thumb_bcc",     0,             8,  MCFixupKindInfo::FKF_IsPCRel },
 // movw / movt: 16-bits immediate but scattered into two chunks 0 - 12, 16 - 19.
 { "fixup_arm_movt_hi16",     0,            20,  0 },
index 9d19f33d724999689fa85ac04ac24261afb2577a..63928a1b5faaff66bbf28229fd04d7e2861ccbd7 100644 (file)
@@ -194,3 +194,11 @@ _func:
 @ CHECK: ldr   r2, [sp, #24]           @ encoding: [0x06,0x9a]
 @ CHECK: ldr   r3, [sp, #1020]         @ encoding: [0xff,0x9b]
 
+
+@------------------------------------------------------------------------------
+@ LDR (literal)
+@------------------------------------------------------------------------------
+        ldr r1, _foo
+
+@ CHECK: ldr   r1, _foo                @ encoding: [A,0x49]
+             @   fixup A - offset: 0, value: _foo, kind: fixup_arm_thumb_cp