mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
isTargetWindows() renamed to isTargetKnownWindowsMSVC()
to reflect its current functionality. Based on Takumi NAKAMURA suggestion. llvm-svn: 205338
This commit is contained in:
parent
0062eb7871
commit
0524cf3d81
@ -623,7 +623,7 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
|
||||
OutStreamer.EmitAssemblerFlag(MCAF_SubsectionsViaSymbols);
|
||||
}
|
||||
|
||||
if (Subtarget->isTargetWindows() && !Subtarget->isTargetCygMing() &&
|
||||
if (Subtarget->isTargetKnownWindowsMSVC() && !Subtarget->isTargetCygMing() &&
|
||||
MMI->usesVAFloatArgument()) {
|
||||
StringRef SymbolName = Subtarget->is64Bit() ? "_fltused" : "__fltused";
|
||||
MCSymbol *S = MMI->getContext().GetOrCreateSymbol(SymbolName);
|
||||
@ -681,12 +681,12 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
|
||||
OutStreamer.SwitchSection(TLOFCOFF.getDrectveSection());
|
||||
SmallString<128> name;
|
||||
for (unsigned i = 0, e = DLLExportedGlobals.size(); i != e; ++i) {
|
||||
if (Subtarget->isTargetWindows())
|
||||
if (Subtarget->isTargetKnownWindowsMSVC())
|
||||
name = " /EXPORT:";
|
||||
else
|
||||
name = " -export:";
|
||||
name += DLLExportedGlobals[i]->getName();
|
||||
if (Subtarget->isTargetWindows())
|
||||
if (Subtarget->isTargetKnownWindowsMSVC())
|
||||
name += ",DATA";
|
||||
else
|
||||
name += ",data";
|
||||
@ -694,7 +694,7 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
|
||||
}
|
||||
|
||||
for (unsigned i = 0, e = DLLExportedFns.size(); i != e; ++i) {
|
||||
if (Subtarget->isTargetWindows())
|
||||
if (Subtarget->isTargetKnownWindowsMSVC())
|
||||
name = " /EXPORT:";
|
||||
else
|
||||
name = " -export:";
|
||||
|
@ -876,7 +876,7 @@ bool X86FastISel::X86SelectRet(const Instruction *I) {
|
||||
// a virtual register in the entry block, so now we copy the value out
|
||||
// and into %rax. We also do the same with %eax for Win32.
|
||||
if (F.hasStructRetAttr() &&
|
||||
(Subtarget->is64Bit() || Subtarget->isTargetWindows())) {
|
||||
(Subtarget->is64Bit() || Subtarget->isTargetKnownWindowsMSVC())) {
|
||||
unsigned Reg = X86MFInfo->getSRetReturnReg();
|
||||
assert(Reg &&
|
||||
"SRetReturnReg should have been set in LowerFormalArguments()!");
|
||||
|
@ -189,7 +189,7 @@ static TargetLoweringObjectFile *createTLOF(X86TargetMachine &TM) {
|
||||
return new X86LinuxTargetObjectFile();
|
||||
if (Subtarget->isTargetELF())
|
||||
return new TargetLoweringObjectFileELF();
|
||||
if (Subtarget->isTargetWindows())
|
||||
if (Subtarget->isTargetKnownWindowsMSVC())
|
||||
return new X86WindowsTargetObjectFile();
|
||||
if (Subtarget->isTargetCOFF())
|
||||
return new TargetLoweringObjectFileCOFF();
|
||||
@ -250,7 +250,7 @@ void X86TargetLowering::resetOperationActions() {
|
||||
addBypassSlowDiv(64, 16);
|
||||
}
|
||||
|
||||
if (Subtarget->isTargetWindows() && !Subtarget->isTargetCygMing()) {
|
||||
if (Subtarget->isTargetKnownWindowsMSVC() && !Subtarget->isTargetCygMing()) {
|
||||
// Setup Windows compiler runtime calls.
|
||||
setLibcallName(RTLIB::SDIV_I64, "_alldiv");
|
||||
setLibcallName(RTLIB::UDIV_I64, "_aulldiv");
|
||||
@ -1906,7 +1906,7 @@ X86TargetLowering::LowerReturn(SDValue Chain,
|
||||
// We saved the argument into a virtual register in the entry block,
|
||||
// so now we copy the value out and into %rax/%eax.
|
||||
if (DAG.getMachineFunction().getFunction()->hasStructRetAttr() &&
|
||||
(Subtarget->is64Bit() || Subtarget->isTargetWindows())) {
|
||||
(Subtarget->is64Bit() || Subtarget->isTargetKnownWindowsMSVC())) {
|
||||
MachineFunction &MF = DAG.getMachineFunction();
|
||||
X86MachineFunctionInfo *FuncInfo = MF.getInfo<X86MachineFunctionInfo>();
|
||||
unsigned Reg = FuncInfo->getSRetReturnReg();
|
||||
@ -2291,7 +2291,7 @@ X86TargetLowering::LowerFormalArguments(SDValue Chain,
|
||||
// Save the argument into a virtual register so that we can access it
|
||||
// from the return points.
|
||||
if (MF.getFunction()->hasStructRetAttr() &&
|
||||
(Subtarget->is64Bit() || Subtarget->isTargetWindows())) {
|
||||
(Subtarget->is64Bit() || Subtarget->isTargetKnownWindowsMSVC())) {
|
||||
X86MachineFunctionInfo *FuncInfo = MF.getInfo<X86MachineFunctionInfo>();
|
||||
unsigned Reg = FuncInfo->getSRetReturnReg();
|
||||
if (!Reg) {
|
||||
@ -8494,7 +8494,7 @@ X86TargetLowering::LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const {
|
||||
Chain.getValue(1));
|
||||
}
|
||||
|
||||
if (Subtarget->isTargetWindows() || Subtarget->isTargetMingw()) {
|
||||
if (Subtarget->isTargetKnownWindowsMSVC() || Subtarget->isTargetMingw()) {
|
||||
// Just use the implicit TLS architecture
|
||||
// Need to generate someting similar to:
|
||||
// mov rdx, qword [gs:abs 58H]; Load pointer to ThreadLocalStorage
|
||||
@ -15882,7 +15882,7 @@ X86TargetLowering::EmitLoweredWinAlloca(MachineInstr *MI,
|
||||
}
|
||||
} else {
|
||||
const char *StackProbeSymbol =
|
||||
Subtarget->isTargetWindows() ? "_chkstk" : "_alloca";
|
||||
Subtarget->isTargetKnownWindowsMSVC() ? "_chkstk" : "_alloca";
|
||||
|
||||
BuildMI(*BB, MI, DL, TII->get(X86::CALLpcrel32))
|
||||
.addExternalSymbol(StackProbeSymbol)
|
||||
|
@ -756,7 +756,7 @@ namespace llvm {
|
||||
/// isTargetFTOL - Return true if the target uses the MSVC _ftol2 routine
|
||||
/// for fptoui.
|
||||
bool isTargetFTOL() const {
|
||||
return Subtarget->isTargetWindows() && !Subtarget->is64Bit();
|
||||
return Subtarget->isTargetKnownWindowsMSVC() && !Subtarget->is64Bit();
|
||||
}
|
||||
|
||||
/// isIntegerTypeFTOL - Return true if the MSVC _ftol2 routine should be
|
||||
|
@ -343,7 +343,7 @@ public:
|
||||
bool isTargetNaCl() const { return TargetTriple.isOSNaCl(); }
|
||||
bool isTargetNaCl32() const { return isTargetNaCl() && !is64Bit(); }
|
||||
bool isTargetNaCl64() const { return isTargetNaCl() && is64Bit(); }
|
||||
bool isTargetWindows() const {
|
||||
bool isTargetKnownWindowsMSVC() const {
|
||||
return TargetTriple.isKnownWindowsMSVCEnvironment();
|
||||
}
|
||||
bool isTargetMingw() const { return TargetTriple.isWindowsGNUEnvironment(); }
|
||||
@ -359,7 +359,7 @@ public:
|
||||
}
|
||||
|
||||
bool isTargetWin32() const {
|
||||
return !In64BitMode && (isTargetCygMing() || isTargetWindows());
|
||||
return !In64BitMode && (isTargetCygMing() || isTargetKnownWindowsMSVC());
|
||||
}
|
||||
|
||||
bool isPICStyleSet() const { return PICStyle != PICStyles::None; }
|
||||
|
@ -39,7 +39,7 @@ static std::string computeDataLayout(const X86Subtarget &ST) {
|
||||
Ret += "-p:32:32";
|
||||
|
||||
// Some ABIs align 64 bit integers and doubles to 64 bits, others to 32.
|
||||
if (ST.is64Bit() || ST.isTargetCygMing() || ST.isTargetWindows() ||
|
||||
if (ST.is64Bit() || ST.isTargetCygMing() || ST.isTargetKnownWindowsMSVC() ||
|
||||
ST.isTargetNaCl())
|
||||
Ret += "-i64:64";
|
||||
else
|
||||
@ -60,7 +60,7 @@ static std::string computeDataLayout(const X86Subtarget &ST) {
|
||||
Ret += "-n8:16:32";
|
||||
|
||||
// The stack is aligned to 32 bits on some ABIs and 128 bits on others.
|
||||
if (!ST.is64Bit() && (ST.isTargetCygMing() || ST.isTargetWindows()))
|
||||
if (!ST.is64Bit() && (ST.isTargetCygMing() || ST.isTargetKnownWindowsMSVC()))
|
||||
Ret += "-S32";
|
||||
else
|
||||
Ret += "-S128";
|
||||
|
Loading…
Reference in New Issue
Block a user