Displaying 7 results from an estimated 7 matches for "try_body".
2010 Jan 21
0
[LLVMdev] Exception handling question
...4 ; <i64*> [#uses=1]
> br label %4
>
> ; <label>:4 ; preds = %entry
> store %6* %0, %6** %this
> store %4* %1, %4** %err
> store i32 %2, i32* %count
> store %33* %3, %33** %e
> br label %.try_body
>
> .try_body: ; preds = %4
> %5 = load %33** %e ; <%33*> [#uses=1]
> %6 = getelementptr inbounds %33* %5, i32 0, i32 2, i32 0 ; <i64*> [#uses=1]
> %7 = invoke i8* (...)* bitcast (i32 (%struct._Unw...
2010 Jan 21
4
[LLVMdev] Exception handling question
...**> [#uses=0]
%.ex_type = alloca i64 ; <i64*> [#uses=1]
br label %4
; <label>:4 ; preds = %entry
store %6* %0, %6** %this
store %4* %1, %4** %err
store i32 %2, i32* %count
store %33* %3, %33** %e
br label %.try_body
.try_body: ; preds = %4
%5 = load %33** %e ; <%33*> [#uses=1]
%6 = getelementptr inbounds %33* %5, i32 0, i32 2, i32 0 ; <i64*>
[#uses=1]
%7 = invoke i8* (...)* bitcast (i32 (%struct._Unwind_Exception*)*
@_Unwind...
2014 Nov 10
2
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
...sample for safe_div at the end of my RFC would look like this
instead:
define i32 @safe_div(i32 %n, i32 %d) {
entry:
%d.addr = alloca i32, align 4
%n.addr = alloca i32, align 4
%r = alloca i32, align 4
store i32 %d, i32* %d.addr, align 4
store i32 %n, i32* %n.addr, align 4
invoke void @try_body(i32* %r, i32* %n.addr, i32* %d.addr)
to label %__try.cont unwind label %lpad
filter:
%eh_code = call i32 @llvm.eh.seh.exception_code() ; or similar
%cmp = icmp eq i32 %eh_code, 0xC0000094
%r = zext i1 %cmp to i32
call void @llvm.eh.seh.filter(i32 %r)
lpad:
%0 = landingpad { i8...
2014 Nov 13
2
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
...sample for safe_div at the end of my RFC would look like this instead:
define i32 @safe_div(i32 %n, i32 %d) {
entry:
%d.addr = alloca i32, align 4
%n.addr = alloca i32, align 4
%r = alloca i32, align 4
store i32 %d, i32* %d.addr, align 4
store i32 %n, i32* %n.addr, align 4
invoke void @try_body(i32* %r, i32* %n.addr, i32* %d.addr)
to label %__try.cont unwind label %lpad
filter:
%eh_code = call i32 @llvm.eh.seh.exception_code() ; or similar
%cmp = icmp eq i32 %eh_code, 0xC0000094
%r = zext i1 %cmp to i32
call void @llvm.eh.seh.filter(i32 %r)
lpad:
%0 = landingpad { i8...
2010 Jan 22
2
[LLVMdev] Exception handling question
...unc_begin153:
.LBB153_0: # %entry
subq $56, %rsp
.Llabel294:
.LBB153_1:
movq %rdi, 24(%rsp)
movq %rsi, 48(%rsp)
movl %edx, 44(%rsp)
movq %rcx, 32(%rsp)
.LBB153_2: # %.try_body
movq 32(%rsp), %rdi
.Llabel291:
addq $16, %rdi
xorb %al, %al
call _Unwind_RaiseException
.Llabel292:
jmp .LBB153_4
.LBB153_3: # %.finally_pad
.Llabel293:
movq %rax, 16(%rsp)
testq %rdx, %rdx
setne...
2010 Jan 22
0
[LLVMdev] Exception handling question
...# %entry
> subq $56, %rsp
> .Llabel294:
>
> .LBB153_1:
> movq %rdi, 24(%rsp)
> movq %rsi, 48(%rsp)
> movl %edx, 44(%rsp)
> movq %rcx, 32(%rsp)
> .LBB153_2: # %.try_body
> movq 32(%rsp), %rdi
> .Llabel291:
>
> addq $16, %rdi
> xorb %al, %al
> call _Unwind_RaiseException
> .Llabel292:
>
> jmp .LBB153_4
> .LBB153_3: # %.finally_pad
> .Llabel293:
>
&...
2010 Jan 22
0
[LLVMdev] Exception handling question
Hi James,
> I've been trying to get a minimal test function to work, which simply
> invokes _Unwind_RaiseException with a single clean-up landing pad.
> However. when I run it my personality function is not getting called -
> _Unwind_RaiseException simply returns apparently doing nothing. Looking
> at the x86-64 assembly output from llc, I can see this is happening
>