mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to repair broken LLVM-GCC build.
Will revert 75770 in the llvm-gcc trunk. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75799 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -28,12 +28,8 @@ extern "C" int MipsTargetMachineModule;
|
||||
int MipsTargetMachineModule = 0;
|
||||
|
||||
// Register the target.
|
||||
extern Target TheMipsTarget;
|
||||
static RegisterTarget<MipsTargetMachine> X(TheMipsTarget, "mips", "Mips");
|
||||
|
||||
extern Target TheMipselTarget;
|
||||
static RegisterTarget<MipselTargetMachine> Y(TheMipselTarget, "mipsel",
|
||||
"Mipsel");
|
||||
static RegisterTarget<MipsTargetMachine> X("mips", "Mips");
|
||||
static RegisterTarget<MipselTargetMachine> Y("mipsel", "Mipsel");
|
||||
|
||||
MipsTargetMachine::AsmPrinterCtorFn MipsTargetMachine::AsmPrinterCtor = 0;
|
||||
|
||||
@@ -55,9 +51,7 @@ createTargetAsmInfo() const
|
||||
// an easier handling.
|
||||
// Using CodeModel::Large enables different CALL behavior.
|
||||
MipsTargetMachine::
|
||||
MipsTargetMachine(const Target &T, const Module &M, const std::string &FS,
|
||||
bool isLittle=false):
|
||||
LLVMTargetMachine(T),
|
||||
MipsTargetMachine(const Module &M, const std::string &FS, bool isLittle=false):
|
||||
Subtarget(*this, M, FS, isLittle),
|
||||
DataLayout(isLittle ? std::string("e-p:32:32:32-i8:8:32-i16:16:32") :
|
||||
std::string("E-p:32:32:32-i8:8:32-i16:16:32")),
|
||||
@@ -76,8 +70,43 @@ MipsTargetMachine(const Target &T, const Module &M, const std::string &FS,
|
||||
}
|
||||
|
||||
MipselTargetMachine::
|
||||
MipselTargetMachine(const Target &T, const Module &M, const std::string &FS) :
|
||||
MipsTargetMachine(T, M, FS, true) {}
|
||||
MipselTargetMachine(const Module &M, const std::string &FS) :
|
||||
MipsTargetMachine(M, FS, true) {}
|
||||
|
||||
// return 0 and must specify -march to gen MIPS code.
|
||||
unsigned MipsTargetMachine::
|
||||
getModuleMatchQuality(const Module &M)
|
||||
{
|
||||
// We strongly match "mips*-*".
|
||||
std::string TT = M.getTargetTriple();
|
||||
if (TT.size() >= 5 && std::string(TT.begin(), TT.begin()+5) == "mips-")
|
||||
return 20;
|
||||
|
||||
if (TT.size() >= 13 && std::string(TT.begin(),
|
||||
TT.begin()+13) == "mipsallegrex-")
|
||||
return 20;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// return 0 and must specify -march to gen MIPSEL code.
|
||||
unsigned MipselTargetMachine::
|
||||
getModuleMatchQuality(const Module &M)
|
||||
{
|
||||
// We strongly match "mips*el-*".
|
||||
std::string TT = M.getTargetTriple();
|
||||
if (TT.size() >= 7 && std::string(TT.begin(), TT.begin()+7) == "mipsel-")
|
||||
return 20;
|
||||
|
||||
if (TT.size() >= 15 && std::string(TT.begin(),
|
||||
TT.begin()+15) == "mipsallegrexel-")
|
||||
return 20;
|
||||
|
||||
if (TT.size() == 3 && std::string(TT.begin(), TT.begin()+3) == "psp")
|
||||
return 20;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Install an instruction selector pass using
|
||||
// the ISelDag to gen Mips code.
|
||||
|
Reference in New Issue
Block a user