mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-30 15:22:41 +00:00
Remove the use of TargetMachine from PPCJITInfo and replace with
the subtarget. Also remove unnecessary argument to the constructor at the same time, we already have access via the subtarget. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210844 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
01d3cb8167
commit
ad807370e9
@ -393,7 +393,7 @@ void *PPCJITInfo::emitFunctionStub(const Function* F, void *Fn,
|
||||
JCE.emitWordBE(0xf821ffb1); // stdu r1,-80(r1)
|
||||
JCE.emitWordBE(0x7d6802a6); // mflr r11
|
||||
JCE.emitWordBE(0xf9610060); // std r11, 96(r1)
|
||||
} else if (TM.getSubtargetImpl()->isDarwinABI()){
|
||||
} else if (Subtarget.isDarwinABI()){
|
||||
JCE.emitWordBE(0x9421ffe0); // stwu r1,-32(r1)
|
||||
JCE.emitWordBE(0x7d6802a6); // mflr r11
|
||||
JCE.emitWordBE(0x91610028); // stw r11, 40(r1)
|
||||
|
@ -14,20 +14,20 @@
|
||||
#ifndef POWERPC_JITINFO_H
|
||||
#define POWERPC_JITINFO_H
|
||||
|
||||
#include "PPCSubtarget.h"
|
||||
#include "llvm/CodeGen/JITCodeEmitter.h"
|
||||
#include "llvm/Target/TargetJITInfo.h"
|
||||
|
||||
namespace llvm {
|
||||
class PPCTargetMachine;
|
||||
|
||||
class PPCJITInfo : public TargetJITInfo {
|
||||
protected:
|
||||
PPCTargetMachine &TM;
|
||||
PPCSubtarget &Subtarget;
|
||||
bool is64Bit;
|
||||
public:
|
||||
PPCJITInfo(PPCTargetMachine &tm, bool tmIs64Bit) : TM(tm) {
|
||||
PPCJITInfo(PPCSubtarget &STI)
|
||||
: Subtarget(STI), is64Bit(STI.isPPC64()) {
|
||||
useGOT = 0;
|
||||
is64Bit = tmIs64Bit;
|
||||
}
|
||||
|
||||
StubLayout getStubLayout() override;
|
||||
|
@ -42,7 +42,7 @@ PPCTargetMachine::PPCTargetMachine(const Target &T, StringRef TT, StringRef CPU,
|
||||
Reloc::Model RM, CodeModel::Model CM,
|
||||
CodeGenOpt::Level OL, bool is64Bit)
|
||||
: LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
|
||||
Subtarget(TT, CPU, FS, is64Bit, OL), JITInfo(*this, is64Bit),
|
||||
Subtarget(TT, CPU, FS, is64Bit, OL), JITInfo(Subtarget),
|
||||
TLInfo(*this), TSInfo(*this) {
|
||||
initAsmInfo();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user