aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-03-22 21:18:22 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-03-22 21:18:22 +0000
commit62a51e434385d9758e994bcb649a226a9198829e (patch)
tree2f44250ac6f212d20da32bff92453c7e83c4069f /lib/Target
parentf0ce64b69f4e4f2e3cd3a52b72bc9ef19235cf5d (diff)
downloadexternal_llvm-62a51e434385d9758e994bcb649a226a9198829e.zip
external_llvm-62a51e434385d9758e994bcb649a226a9198829e.tar.gz
external_llvm-62a51e434385d9758e994bcb649a226a9198829e.tar.bz2
Honour built-in defines on win64 targets for automatically subtarget recognize.
Force stack alignment to 16 bytes on win targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/X86/X86Subtarget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp
index aff36a1..483b8a4 100644
--- a/lib/Target/X86/X86Subtarget.cpp
+++ b/lib/Target/X86/X86Subtarget.cpp
@@ -274,7 +274,7 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit)
} else if (TT.empty()) {
#if defined(__CYGWIN__)
TargetType = isCygwin;
-#elif defined(__MINGW32__)
+#elif defined(__MINGW32__) || defined(__MINGW64__)
TargetType = isMingw;
#elif defined(__APPLE__)
TargetType = isDarwin;
@@ -284,7 +284,7 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit)
DarwinVers = 8; // Minimum supported darwin is Tiger.
#endif
-#elif defined(_WIN32)
+#elif defined(_WIN32) || defined(_WIN64)
TargetType = isWindows;
#endif
}
@@ -299,6 +299,7 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit)
if (TargetType == isDarwin ||
TargetType == isCygwin ||
TargetType == isMingw ||
+ TargetType == isWindows ||
(TargetType == isELF && Is64Bit))
stackAlignment = 16;
}