[llvm-commits] new patches for compiling linux with integrated-as

Chandler Carruth chandlerc at google.com
Fri Nov 9 14:32:40 PST 2012


On Thu, Nov 8, 2012 at 6:05 AM, Roman Divacky <rdivacky at freebsd.org> wrote:
>> - more .cfi* support: linux makes use of 3 CFI directives not yet (fully) supported
>>   by llvm.
>>
>>   .cfi_startproc simple: i added the 'simple' keyword recognition but a review is needed.
>>
>>   .cfi_undefined: new directive, it's only recognized, someone else will have to provide
>>   a proper implementation in MCStreamer::EmitCFIUndefined.
>>
>>   .cfi_register: new directive, i think MCStreamer::EmitCFIRegister does what it
>>   should do, but review (and help with fixing it up :) is needed.
>
> I finished this I think, the patch attached.

Maybe send the patch to a fresh email thread?

Also, consider using Phabricator to simplify the review?
http://llvm.org/docs/Phabricator.html has instructions.

-Chandler

> This is the output I am getting:
>
> 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
>



More information about the llvm-commits mailing list