]> granicus.if.org Git - clang/commitdiff
[Sparc] Implement __builtin_setjmp, __builtin_longjmp back-end.
authorChris Dewhurst <chris.dewhurst@lero.ie>
Wed, 4 May 2016 09:33:30 +0000 (09:33 +0000)
committerChris Dewhurst <chris.dewhurst@lero.ie>
Wed, 4 May 2016 09:33:30 +0000 (09:33 +0000)
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

lib/Basic/Targets.cpp

index 1df35ab846594e3f08a9b44e4802896788ae6428..6b26d14dc5a97c141d1db364ef9dedf891c95ac9 100644 (file)
@@ -6447,6 +6447,10 @@ public:
       }
     }
   }
+
+  bool hasSjLjLowering() const override {
+    return true;
+  }
 };
 
 // SPARCV8el is the 32-bit little-endian mode selected by Triple::sparcel.