mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
d644d17dd4
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
24 lines
779 B
C++
24 lines
779 B
C++
//===-- PPCMachineFunctionInfo.cpp - Private data used for PowerPC --------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#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");
|
|
}
|