From: Jim Grosbach
Date: Tue, 11 Aug 2009 00:09:57 +0000 (+0000)
Subject: SjLj based exception handling unwinding support. This patch is nasty, brutish
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1b747ad8a0694b86e8d98a8b9a05ddfe74ec0cd3;p=oota-llvm.git
SjLj based exception handling unwinding support. This patch is nasty, brutish
and short. Well, it's kinda short. Definitely nasty and brutish.
The front-end generates the register/unregister calls into the SjLj runtime,
call-site indices and landing pad dispatch. The back end fills in the LSDA
with the call-site information provided by the front end. Catch blocks are
not yet implemented.
Built on Darwin and verified no llvm-core "make check" regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78625 91177308-0d34-0410-b5e6-96231b3b80d8
---
diff --git a/docs/ExceptionHandling.html b/docs/ExceptionHandling.html
index 6ec6ab8233e..851ed1238be 100644
--- a/docs/ExceptionHandling.html
+++ b/docs/ExceptionHandling.html
@@ -33,6 +33,8 @@
llvm.eh.typeid.for
llvm.eh.sjlj.setjmp
llvm.eh.sjlj.longjmp
+ llvm.eh.sjlj.lsda
+ llvm.eh.sjlj.callsite
Asm Table Formats
@@ -414,7 +416,7 @@ a reference to a type info.
The SJLJ exception handling uses this intrinsic to force register saving
for the current function and to store the address of the following instruction
-for use as a destination address by
+for use as a destination address by
llvm.eh.sjlj.longjmp. The buffer format and the overall functioning
of this intrinsic is compatible with the GCC __builtin_setjmp
implementation, allowing code built with the two compilers to interoperate.
@@ -428,6 +430,41 @@ are available for use in a target-specific manner.
+
+
+
+
+
+ i8* %llvm.eh.sjlj.lsda( )
+
+
+
Used for SJLJ based exception handling, the
+ llvm.eh.sjlj.lsda intrinsic returns the address of the Language
+Specific Data Area (LSDA) for the current function. The SJLJ front-end code
+stores this address in the exception handling function context for use by
+the runtime.
+
+
+
+
+
+
+
+
+ void %llvm.eh.sjlj.callsite(i32)
+
+
+
The SJLJ front-end allocates call site indices for invoke instrucitons.
+These values are passed to the back-end via the
+llvm.eh.sjlj.callsite
+intrinsic, where they are used to build the LSDA call-site table.
+
+
+
Asm Table Formats
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 57c946c789a..f30cb821c1a 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -18,6 +18,7 @@
#ifndef LLVM_CODEGEN_MACHINEFUNCTION_H
#define LLVM_CODEGEN_MACHINEFUNCTION_H
+#include