summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-12-22 13:49:43 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-12-22 13:49:43 +0000
commit1e5be3653c417c660eb3389f88c9a3f5c0035bd9 (patch)
tree8101e8a8146031b2f8a317e7cf4544c9b2185143 /llvm/lib/MC
parentfbb9ac3cca0d3576d43211a6b3ec0cd5db6ac84d (diff)
downloadbcm5719-llvm-1e5be3653c417c660eb3389f88c9a3f5c0035bd9.tar.gz
bcm5719-llvm-1e5be3653c417c660eb3389f88c9a3f5c0035bd9.zip
MC/Mach-O: Split out RecordARMRelocation for now, it is weird enough it isn't
clear how to keep in the generic path (yet). - Will revisit when it actually works. llvm-svn: 122400
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MachObjectWriter.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp
index 386f4517b65..a4c612d0d69 100644
--- a/llvm/lib/MC/MachObjectWriter.cpp
+++ b/llvm/lib/MC/MachObjectWriter.cpp
@@ -235,6 +235,10 @@ public:
/// @{
bool is64Bit() const { return TargetObjectWriter->is64Bit(); }
+ bool isARM() const {
+ uint32_t CPUType = TargetObjectWriter->getCPUType() & mach::CTFM_ArchMask;
+ return CPUType == mach::CTM_ARM;
+ }
/// @}
@@ -839,9 +843,20 @@ public:
Relocations[Fragment->getParent()].push_back(MRE);
}
+ void RecordARMRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout,
+ const MCFragment *Fragment, const MCFixup &Fixup,
+ MCValue Target, uint64_t &FixedValue) {
+ // FIXME!
+ }
+
void RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout,
const MCFragment *Fragment, const MCFixup &Fixup,
MCValue Target, uint64_t &FixedValue) {
+ // FIXME: These needs to be factored into the target Mach-O writer.
+ if (isARM()) {
+ RecordARMRelocation(Asm, Layout, Fragment, Fixup, Target, FixedValue);
+ return;
+ }
if (is64Bit()) {
RecordX86_64Relocation(Asm, Layout, Fragment, Fixup, Target, FixedValue);
return;
OpenPOWER on IntegriCloud