summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-27 22:13:36 +0000
committerChris Lattner <sabre@nondot.org>2005-09-27 22:13:36 +0000
commit5e93fbe68c8f0b08cf79fd3ec4d58e74aa760e15 (patch)
tree75872598f9cac891dce1c840f64e5e77b3c1eaaf
parent4531371960f3a36790c34c4fd85838907ff65a9c (diff)
downloadexternal_llvm-5e93fbe68c8f0b08cf79fd3ec4d58e74aa760e15.zip
external_llvm-5e93fbe68c8f0b08cf79fd3ec4d58e74aa760e15.tar.gz
external_llvm-5e93fbe68c8f0b08cf79fd3ec4d58e74aa760e15.tar.bz2
Add a new flag for targets where setjmp/longjmp saves/restores the signal mask,
and _setjmp/_longjmp should be used instead (for llvm.setjmp/llvm.longjmp). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23479 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Target/TargetLowering.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 7c28391..734c8dc 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -100,7 +100,7 @@ public:
assert(RC && "This value type is not natively supported!");
return RC;
}
-
+
/// isTypeLegal - Return true if the target has native support for the
/// specified value type. This means that it has a register that directly
/// holds it without promotions or expansions.
@@ -218,6 +218,12 @@ public:
/// @brief Determine if the target supports unaligned memory accesses.
bool allowsUnalignedMemoryAccesses() const
{ return allowUnalignedMemoryAccesses; }
+
+ /// usesUnderscoreSetJmpLongJmp - Determine if we should use _setjmp or setjmp
+ /// to implement llvm.setjmp.
+ bool usesUnderscoreSetJmpLongJmp() const {
+ return UseUnderscoreSetJmpLongJmp;
+ }
//===--------------------------------------------------------------------===//
// TargetLowering Configuration Methods - These methods should be invoked by
@@ -244,6 +250,13 @@ protected:
ShiftAmtHandling = OORSA;
}
+ /// setUseUnderscoreSetJmpLongJmp - Indicate whether this target prefers to
+ /// use _setjmp and _longjmp to or implement llvm.setjmp/llvm.longjmp or
+ /// the non _ versions. Defaults to false.
+ void setUseUnderscoreSetJmpLongJmp(bool Val) {
+ UseUnderscoreSetJmpLongJmp = Val;
+ }
+
/// setSetCCIxExpensive - This is a short term hack for targets that codegen
/// setcc as a conditional branch. This encourages the code generator to fold
/// setcc operations into other operations if possible.
@@ -379,6 +392,10 @@ private:
/// SetCCResultContents - Information about the contents of the high-bits in
/// the result of a setcc comparison operation.
SetCCResultValue SetCCResultContents;
+
+ /// UseUnderscoreSetJmpLongJmp - This target prefers to use _setjmp and
+ /// _longjmp to implement llvm.setjmp/llvm.longjmp. Defaults to false.
+ bool UseUnderscoreSetJmpLongJmp;
/// RegClassForVT - This indicates the default register class to use for
/// each ValueType the target supports natively.