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
This commit is contained in:
Daniel Dunbar
2010-12-24 16:41:46 +00:00
parent a75ce9f5d2
commit 4010dd72b8
2 changed files with 153 additions and 0 deletions

View File

@@ -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,