diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-01-18 00:23:57 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-01-18 00:23:57 +0000 |
commit | 3b50c9ec7f87c07a8002eb442513c6114f4a141f (patch) | |
tree | 568b0c429c873bf8929f5a682b57f245f1eaf8d6 /llvm/lib/Target | |
parent | f43b599550333f05c6cff87d211c41215cb5716f (diff) | |
download | bcm5719-llvm-3b50c9ec7f87c07a8002eb442513c6114f4a141f.tar.gz bcm5719-llvm-3b50c9ec7f87c07a8002eb442513c6114f4a141f.zip |
Move some ARM specific MCAssmebler bits into the ARMAsmBackend.
llvm-svn: 148364
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp index 7b3f966ea82..88fea5745d8 100644 --- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp +++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp @@ -22,6 +22,7 @@ #include "llvm/MC/MCSectionMachO.h" #include "llvm/MC/MCAsmBackend.h" #include "llvm/MC/MCSubtargetInfo.h" +#include "llvm/MC/MCValue.h" #include "llvm/Object/MachOFormat.h" #include "llvm/Support/ELF.h" #include "llvm/Support/ErrorHandling.h" @@ -101,6 +102,20 @@ public: return Infos[Kind - FirstTargetFixupKind]; } + /// processFixupValue - Target hook to process the literal value of a fixup + /// if necessary. + void processFixupValue(const MCAssembler &Asm, const MCAsmLayout &Layout, + const MCFixup &Fixup, const MCFragment *DF, + MCValue &Target, uint64_t &Value) { + // Some fixups to thumb function symbols need the low bit (thumb bit) + // twiddled. + if (const MCSymbolRefExpr *A = Target.getSymA()) { + const MCSymbol &Sym = A->getSymbol().AliasedSymbol(); + if (Asm.isThumbFunc(&Sym)) + Value |= 1; + } + } + bool MayNeedRelaxation(const MCInst &Inst) const; bool fixupNeedsRelaxation(const MCFixup &Fixup, |