aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-12-24 16:41:46 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-12-24 16:41:46 +0000
commit4010dd72b81b760daaa0361084de6dca8ed86fa1 (patch)
tree02631b28e7732e824af3ddce0d31e411b7cc7024 /lib/MC/MachObjectWriter.cpp
parenta75ce9f5d2236d93c117e861e60e6f3f748c9555 (diff)
MC/Mach-O/ARM: Start handling some Thumb branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MachObjectWriter.cpp')
-rw-r--r--lib/MC/MachObjectWriter.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp
index 5c4d6f2375..c8fe40e2f4 100644
--- a/lib/MC/MachObjectWriter.cpp
+++ b/lib/MC/MachObjectWriter.cpp
@@ -931,6 +931,20 @@ public:
// Report as 'long', even though that is not quite accurate.
Log2Size = llvm::Log2_32(4);
return true;
+
+ // Handle Thumb branches.
+ case ARM::fixup_arm_thumb_br:
+ Log2Size = llvm::Log2_32(2);
+ return true;
+
+ case ARM::fixup_arm_thumb_bl:
+ Log2Size = llvm::Log2_32(4);
+ return true;
+
+ case ARM::fixup_arm_thumb_blx:
+ // Report as 'long', even though that is not quite accurate.
+ Log2Size = llvm::Log2_32(4);
+ return true;
}
}
void RecordARMRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout,