mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
[PowerPC] 32-bit ELF PIC support
This adds initial support for PPC32 ELF PIC (Position Independent Code; the -fPIC variety), thus rectifying a long-standing deficiency in the PowerPC backend. Patch by Justin Hibbits! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213427 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -8,8 +8,16 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "PPCMachineFunctionInfo.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
void PPCFunctionInfo::anchor() { }
|
||||
|
||||
MCSymbol *PPCFunctionInfo::getPICOffsetSymbol() const {
|
||||
const DataLayout *DL = MF.getTarget().getDataLayout();
|
||||
return MF.getContext().GetOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix())+
|
||||
Twine(MF.getFunctionNumber())+"$poff");
|
||||
}
|
||||
|
Reference in New Issue
Block a user