[llvm-commits] [PATCH]: .cfi_register and .cfi_undefined

Anton Korobeynikov anton at korobeynikov.info
Wed Nov 14 15:59:42 PST 2012


Hi Roman

It seems that Simple is unused here:
+void MCStreamer::EmitCFIStartProc(bool Simple) {

It needs to be either handled or removed. I think the former.


On Wed, Nov 14, 2012 at 7:51 PM, Roman Divacky <rdivacky at freebsd.org> wrote:
> Hi,
>
> The attached patch implements .cfi_register and .cfi_undefined. It's based
> on a patch from PaX team.
>
> I am getting these test results with it:
>
> test case:
>
> .cfi_startproc
>
> .cfi_register %rdi, %rax
> nop
> .cfi_undefined %rdx
>
> .cfi_endproc
>
> gnu as:
>
>   # Section 4
>   (('sh_name', 0x00000031) # '.eh_frame'
>    ('sh_type', 0x00000001)
>    ('sh_flags', 0x0000000000000002)
>    ('sh_addr', 0x0000000000000000)
>    ('sh_offset', 0x0000000000000048)
>    ('sh_size', 0x0000000000000030)
>    ('sh_link', 0x00000000)
>    ('sh_info', 0x00000000)
>    ('sh_addralign', 0x0000000000000008)
>    ('sh_entsize', 0x0000000000000000)
>    ('_section_data', '18000000 00000000 017a5200 01781001 1b0c0708 90010905 00000000 10000000 20000000 00000000 01000000 00410701')
>   ),
>
>
> llvm as:
>
>   # Section 4
>   (('sh_name', 0x00000011) # '.eh_frame'
>    ('sh_type', 0x00000001)
>    ('sh_flags', 0x0000000000000002)
>    ('sh_addr', 0x0000000000000000)
>    ('sh_offset', 0x0000000000000048)
>    ('sh_size', 0x0000000000000030)
>    ('sh_link', 0x00000000)
>    ('sh_info', 0x00000000)
>    ('sh_addralign', 0x0000000000000008)
>    ('sh_entsize', 0x0000000000000000)
>    ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 01000000 00800141 07010000')
>
> The output for cfi_undefined is the same (0701), the cfi_register differs, but it's implemented
> using already existing code.
>
> What do you think?
>
> Roman
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-commits mailing list