mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
make sure to safe LR8 in the right stack slot for PPC64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31839 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
566c1b1a04
commit
ff790894bd
@ -26,8 +26,13 @@ class PPCFrameInfo: public TargetFrameInfo {
|
|||||||
public:
|
public:
|
||||||
PPCFrameInfo(const TargetMachine &tm, bool LP64)
|
PPCFrameInfo(const TargetMachine &tm, bool LP64)
|
||||||
: TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) {
|
: TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) {
|
||||||
|
if (LP64) {
|
||||||
|
LR[0].first = PPC::LR8;
|
||||||
|
LR[0].second = 16;
|
||||||
|
} else {
|
||||||
LR[0].first = PPC::LR;
|
LR[0].first = PPC::LR;
|
||||||
LR[0].second = LP64 ? 16 : 8;
|
LR[0].second = 8;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::pair<unsigned, int> *
|
const std::pair<unsigned, int> *
|
||||||
|
@ -83,7 +83,7 @@ PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS,
|
|||||||
bool is64Bit)
|
bool is64Bit)
|
||||||
: Subtarget(M, FS, is64Bit),
|
: Subtarget(M, FS, is64Bit),
|
||||||
DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this),
|
DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this),
|
||||||
FrameInfo(*this, false), JITInfo(*this, is64Bit), TLInfo(*this),
|
FrameInfo(*this, is64Bit), JITInfo(*this, is64Bit), TLInfo(*this),
|
||||||
InstrItins(Subtarget.getInstrItineraryData()) {
|
InstrItins(Subtarget.getInstrItineraryData()) {
|
||||||
|
|
||||||
if (getRelocationModel() == Reloc::Default)
|
if (getRelocationModel() == Reloc::Default)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user