aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-10-10 22:04:34 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-10-10 22:04:34 +0000
commit1802a9f8fe657e270fe3fb2c9ca324fe3aec4591 (patch)
tree84780ea9726c3aa5e3eab9cfe89f8651e03a0b67 /lib
parentec38de2ca87d738aa3d4d5c36740f29f1a9f27de (diff)
downloadexternal_llvm-1802a9f8fe657e270fe3fb2c9ca324fe3aec4591.zip
external_llvm-1802a9f8fe657e270fe3fb2c9ca324fe3aec4591.tar.gz
external_llvm-1802a9f8fe657e270fe3fb2c9ca324fe3aec4591.tar.bz2
X86: Call _alldiv instead of __divdi3 on Windows (excluding cygwin).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116174 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 89ae4e8..74fe647 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -96,6 +96,12 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
setSchedulingPreference(Sched::RegPressure);
setStackPointerRegisterToSaveRestore(X86StackPtr);
+ if (Subtarget->isTargetWindows() && !Subtarget->isTargetCygwin()) {
+ // Setup Windows compiler runtime calls.
+ setLibcallName(RTLIB::SDIV_I64, "_alldiv");
+ setLibcallCallingConv(RTLIB::SDIV_I64, CallingConv::X86_StdCall);
+ }
+
if (Subtarget->isTargetDarwin()) {
// Darwin should use _setjmp/_longjmp instead of setjmp/longjmp.
setUseUnderscoreSetJmp(false);