mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
wire up 64-bit MCCodeEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95438 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
be1778fea7
commit
00cb3fe786
@ -50,7 +50,8 @@ FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
|
||||
JITCodeEmitter &JCE);
|
||||
|
||||
MCCodeEmitter *createHeinousX86MCCodeEmitter(const Target &, TargetMachine &TM);
|
||||
MCCodeEmitter *createX86MCCodeEmitter(const Target &, TargetMachine &TM);
|
||||
MCCodeEmitter *createX86_32MCCodeEmitter(const Target &, TargetMachine &TM);
|
||||
MCCodeEmitter *createX86_64MCCodeEmitter(const Target &, TargetMachine &TM);
|
||||
|
||||
/// createX86EmitCodeToMemory - Returns a pass that converts a register
|
||||
/// allocated function into raw machine code in a dynamically
|
||||
|
@ -1117,8 +1117,11 @@ MCCodeEmitter *llvm::createHeinousX86MCCodeEmitter(const Target &T,
|
||||
TargetMachine &TM) {
|
||||
|
||||
// FIXME: Remove the heinous one when the new one works.
|
||||
if (EnableNewEncoder)
|
||||
return createX86MCCodeEmitter(T, TM);
|
||||
if (EnableNewEncoder) {
|
||||
if (TM.getTargetData()->getPointerSize() == 4)
|
||||
return createX86_32MCCodeEmitter(T, TM);
|
||||
return createX86_64MCCodeEmitter(T, TM);
|
||||
}
|
||||
|
||||
return new X86MCCodeEmitter(static_cast<X86TargetMachine&>(TM));
|
||||
}
|
||||
|
@ -27,10 +27,9 @@ class X86MCCodeEmitter : public MCCodeEmitter {
|
||||
const TargetInstrInfo &TII;
|
||||
bool Is64BitMode;
|
||||
public:
|
||||
X86MCCodeEmitter(TargetMachine &tm)
|
||||
X86MCCodeEmitter(TargetMachine &tm, bool is64Bit)
|
||||
: TM(tm), TII(*TM.getInstrInfo()) {
|
||||
// FIXME: Get this from the right place.
|
||||
Is64BitMode = false;
|
||||
Is64BitMode = is64Bit;
|
||||
}
|
||||
|
||||
~X86MCCodeEmitter() {}
|
||||
@ -83,9 +82,14 @@ public:
|
||||
} // end anonymous namespace
|
||||
|
||||
|
||||
MCCodeEmitter *llvm::createX86MCCodeEmitter(const Target &,
|
||||
TargetMachine &TM) {
|
||||
return new X86MCCodeEmitter(TM);
|
||||
MCCodeEmitter *llvm::createX86_32MCCodeEmitter(const Target &,
|
||||
TargetMachine &TM) {
|
||||
return new X86MCCodeEmitter(TM, false);
|
||||
}
|
||||
|
||||
MCCodeEmitter *llvm::createX86_64MCCodeEmitter(const Target &,
|
||||
TargetMachine &TM) {
|
||||
return new X86MCCodeEmitter(TM, true);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user