Author: lerochris
Date: Wed May  4 04:33:30 2016
New Revision: 268483

URL: http://llvm.org/viewvc/llvm-project?rev=268483&view=rev
Log:
[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

Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=268483&r1=268482&r2=268483&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Wed May  4 04:33:30 2016
@@ -6447,6 +6447,10 @@ public:
       }
     }
   }
+
+  bool hasSjLjLowering() const override {
+    return true;
+  }
 };
 
 // SPARCV8el is the 32-bit little-endian mode selected by Triple::sparcel.


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to