[llvm-commits] [PATCH]: .cfi_register and .cfi_undefined
Roman Divacky
rdivacky at freebsd.org
Fri Nov 23 01:04:22 PST 2012
The "simple" variant of cfi_startproc is what llvm does now by default.
We do not implement the target specific initialization now, ie:
on x86:
cfi_add_CFA_def_cfa (sp_regno, -x86_cie_data_alignment);
cfi_add_CFA_offset (x86_dwarf2_return_column, x86_cie_data_alignment);
I suppose if we are ok with not doing that MD part now, we can safely
ignore the Simple argument. Would adding // TODO: be enough as a solution
to this?
Roman
On Thu, Nov 15, 2012 at 03:59:42AM +0400, Anton Korobeynikov wrote:
> 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