[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp
Anton Korobeynikov
asl at math.spbu.ru
Sun Dec 10 15:13:10 PST 2006
Changes in directory llvm/lib/Target/X86:
X86ISelLowering.cpp updated: 1.304 -> 1.305
---
Log message:
Cleaned setjmp/longjmp lowering interfaces. Now we're producing right
code (both asm & cbe) for Mingw32 target.
Removed autoconf checks for underscored versions of setjmp/longjmp.
---
Diffs of the changes: (+12 -3)
X86ISelLowering.cpp | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.304 llvm/lib/Target/X86/X86ISelLowering.cpp:1.305
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.304 Tue Dec 5 12:45:06 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Sun Dec 10 17:12:42 2006
@@ -54,10 +54,19 @@
setShiftAmountFlavor(Mask); // shl X, 32 == shl X, 0
setStackPointerRegisterToSaveRestore(X86StackPtr);
- if (!Subtarget->isTargetDarwin())
+ if (Subtarget->isTargetDarwin()) {
// Darwin should use _setjmp/_longjmp instead of setjmp/longjmp.
- setUseUnderscoreSetJmpLongJmp(true);
-
+ setUseUnderscoreSetJmp(false);
+ setUseUnderscoreLongJmp(false);
+ } else if (Subtarget->isTargetCygwin()) {
+ // MS runtime is weird: it exports _setjmp, but longjmp!
+ setUseUnderscoreSetJmp(true);
+ setUseUnderscoreLongJmp(false);
+ } else {
+ setUseUnderscoreSetJmp(true);
+ setUseUnderscoreLongJmp(true);
+ }
+
// Add legal addressing mode scale values.
addLegalAddressScale(8);
addLegalAddressScale(4);
More information about the llvm-commits
mailing list