[LLVMdev] Exception Tables in latest LLVM
Yiannis Tsiouris
yiannis.tsiouris at gmail.com
Fri Sep 2 08:34:08 PDT 2011
On 09/02/2011 05:58 PM, Duncan Sands wrote:
> Hi Yiannis,
>
>> I have been using llvm 2.8 (i know ancient history!) for a backend that i was
>> implementing. I have been trying to port my patches to latest llvm (svn build)
>> lately but i have one problem as far as the Exception Handling mechanism is
>> concerned. It seems that there are no Exception Tables generated any more such
>> as the one below:
>
> got some example bitcode for which you see this (or, rather, don't see this
> since the problem is that you are not seeing exception tables)?
>
> Ciao, Duncan.
>
>>
>> .section .gcc_except_table,"a", at progbits
>> .align 4
>> GCC_except_table0:
>> .Lexception0:
>> .byte 255 # @LPStart Encoding = omit
>> .byte 3 # @TType Encoding = udata4
>> .uleb128 41 # @TType base offset
>> .byte 3 # Call site Encoding = udata4
>> .uleb128 39 # Call site table length
>> .Lset0 = .Leh_func_begin0-.Leh_func_begin0 # Region start
>> .long .Lset0
>> .Lset1 = .Ltmp0-.Leh_func_begin0 # Region length
>> .long .Lset1
>> .long 0 # Landing pad
>> .uleb128 0 # Action
>> .Lset2 = .Ltmp0-.Leh_func_begin0 # Region start
>> .long .Lset2
>> .Lset3 = .Ltmp1-.Ltmp0 # Region length
>> .long .Lset3
>> .Lset4 = .Ltmp2-.Leh_func_begin0 # Landing pad
>> .long .Lset4
>> .uleb128 0 # Action
>> .Lset5 = .Ltmp1-.Leh_func_begin0 # Region start
>> .long .Lset5
>> .Lset6 = .Leh_func_end0-.Ltmp1 # Region length
>> .long .Lset6
>> .long 0 # Landing pad
>> .uleb128 0 # Action
>> .align 4
>>
>>
>> I've searched for this but i couldn't find some documentation about the changes
>> in the EH staff and the documentation on the website is not complete... Is there
>> any way i can force the generation of these tables in current LLVM?
>>
>> Thanks in advance,
>> Yiannis
>>
Hi Duncan,
Sorry for my omission! I attach an example (test_0.ll). I do:
llvm-as < test_0.ll | llc
and i get output-llvm28.txt with the 2.8 versions of the tools and i
repeat with the latest versions from the svn repo and i get
output-llvm30.txt.
As you can see there is a:
.section .gcc_except_table,"a", at progbits
....
in the 2.8 output just below the code segment while there is no such
section in the 3.0 case!
Thanks again,
Yiannis
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_0.ll
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110902/0538c8c5/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: output-llvm30.txt
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110902/0538c8c5/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: output-llvm28.txt
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110902/0538c8c5/attachment-0001.txt>
More information about the llvm-dev
mailing list