MC/ARM: Fix-up fixup offset for fixup_arm_branch target specific fixup.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 14 Dec 2010 17:37:16 +0000 (17:37 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 14 Dec 2010 17:37:16 +0000 (17:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121772 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMMCCodeEmitter.cpp
test/MC/ARM/arm_fixups.s [new file with mode: 0644]

index b82d38ed7255e5b258a9632553f8cd88183b13d1..0924591a60c74aaef77e95946eb3b6842dd201f8 100644 (file)
@@ -58,7 +58,7 @@ public:
 { "fixup_arm_adr_pcrel_12",  1,            24,  MCFixupKindInfo::FKF_IsPCRel },
 { "fixup_t2_adr_pcrel_12",   0,            32,  MCFixupKindInfo::FKF_IsPCRel |
                                                 MCFixupKindInfo::FKF_IsAligned},
-{ "fixup_arm_branch",        1,            24,  MCFixupKindInfo::FKF_IsPCRel },
+{ "fixup_arm_branch",        0,            24,  MCFixupKindInfo::FKF_IsPCRel },
 { "fixup_t2_condbranch",     0,            32,  MCFixupKindInfo::FKF_IsPCRel },
 { "fixup_t2_uncondbranch",   0,            32,  MCFixupKindInfo::FKF_IsPCRel },
 { "fixup_arm_thumb_br",      0,            16,  MCFixupKindInfo::FKF_IsPCRel },
diff --git a/test/MC/ARM/arm_fixups.s b/test/MC/ARM/arm_fixups.s
new file mode 100644 (file)
index 0000000..146de9c
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: llvm-mc -triple arm-unknown-unknown %s --show-encoding > %t
+// RUN: FileCheck < %t %s
+
+// CHECK: bl _printf @ encoding: [A,A,A,0xeb]
+// CHECK: @ fixup A - offset: 0, value: _printf, kind: fixup_arm_branch
+bl _printf
+        
\ No newline at end of file