summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86Subtarget.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2007-01-03 11:43:14 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2007-01-03 11:43:14 +0000
commit4efbbc963f94341cb24fee90d77cc9f7e0226898 (patch)
tree758bebf5876f7158e57b9bde87ce206b8f30dd0e /llvm/lib/Target/X86/X86Subtarget.cpp
parenta50e3919b150df88f66d45f9173a5bec1bd22d94 (diff)
downloadbcm5719-llvm-4efbbc963f94341cb24fee90d77cc9f7e0226898.tar.gz
bcm5719-llvm-4efbbc963f94341cb24fee90d77cc9f7e0226898.zip
Really big cleanup.
- New target type "mingw" was introduced - Same things for both mingw & cygwin are marked as "cygming" (as in gcc) - .lcomm is supported here, so allow LLVM to use it - Correctly use underscored versions of setjmp & _longjmp for both mingw & cygwin llvm-svn: 32833
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.cpp')
-rw-r--r--llvm/lib/Target/X86/X86Subtarget.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp
index 05965c24cdd..6feb0af4916 100644
--- a/llvm/lib/Target/X86/X86Subtarget.cpp
+++ b/llvm/lib/Target/X86/X86Subtarget.cpp
@@ -40,7 +40,7 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV,
return (!isDirectCall &&
(GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||
(GV->isExternal() && !GV->hasNotBeenReadFromBytecode())));
- } else if (isTargetCygwin() || isTargetWindows()) {
+ } else if (isTargetCygMing() || isTargetWindows()) {
return (GV->hasDLLImportLinkage());
}
@@ -248,16 +248,19 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit)
// if one cannot be determined, to true.
const std::string& TT = M.getTargetTriple();
if (TT.length() > 5) {
- if (TT.find("cygwin") != std::string::npos ||
- TT.find("mingw") != std::string::npos)
+ if (TT.find("cygwin") != std::string::npos)
TargetType = isCygwin;
+ else if (TT.find("mingw") != std::string::npos)
+ TargetType = isMingw;
else if (TT.find("darwin") != std::string::npos)
TargetType = isDarwin;
else if (TT.find("win32") != std::string::npos)
TargetType = isWindows;
} else if (TT.empty()) {
-#if defined(__CYGWIN__) || defined(__MINGW32__)
+#if defined(__CYGWIN__)
TargetType = isCygwin;
+#elif defined(__MINGW32__)
+ TargetType = isMingw;
#elif defined(__APPLE__)
TargetType = isDarwin;
#elif defined(_WIN32)
@@ -277,6 +280,7 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit)
if (TargetType == isDarwin ||
TargetType == isCygwin ||
+ TargetType == isMingw ||
(TargetType == isELF && Is64Bit))
stackAlignment = 16;
}
OpenPOWER on IntegriCloud