From: Chris Dewhurst Date: Wed, 4 May 2016 09:33:30 +0000 (+0000) Subject: [Sparc] Implement __builtin_setjmp, __builtin_longjmp back-end. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1cd57ede02811738529d9200de906cef0d08c738;p=clang [Sparc] Implement __builtin_setjmp, __builtin_longjmp back-end. This code implements builtin_setjmp and builtin_longjmp exception handling intrinsics for 32-bit Sparc back-ends. The code started as a mash-up of the PowerPC and X86 versions, although there are sufficient differences to both that had to be made for Sparc handling. Note: I have manual tests running. I'll work on a unit test and add that to the rest of this diff in the next day. Also, this implementation is only for 32-bit Sparc. I haven't focussed on a 64-bit version, although I have left the code in a prepared state for implementing this, including detecting pointer size and comments indicating where I suspect there may be differences. Differential Revision: http://reviews.llvm.org/D19798 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268483 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 1df35ab846..6b26d14dc5 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -6447,6 +6447,10 @@ public: } } } + + bool hasSjLjLowering() const override { + return true; + } }; // SPARCV8el is the 32-bit little-endian mode selected by Triple::sparcel.