[llvm-commits] [PATCH]: patch for .cfi register parsing

Roman Divacky rdivacky at freebsd.org
Wed Jan 26 11:31:02 PST 2011


On Wed, Jan 26, 2011 at 11:48:34AM -0500, Rafael ?vila de Esp?ndola wrote:
> On 11-01-24 12:55 PM, Roman Divacky wrote:
> > Hi,
> >
> > some .cfi directives take register as an argument, ie:
> >
> > .cfi_def_cfa_register %ebp
> >
> > The attached patch implements that. The patch makes ParseRegister
> > method in TargetAsmParser public. I made that change only in
> > X86 in that patch as I want some comment on whether this is the
> > correct thing to do.
> 
> It is probably on the right direction, but are you sure this is giving 
> you the correct numbers? You should use the dwarf numbers, not the 
> internal numbers used by llvm.
 
I am actually doing that, by calling:

Register = getContext().getTargetAsmInfo().getDwarfRegNum(RegNo, true);

> It is probably also a good idea to factor out a 
> ParseRegisterOrRegisterNumber method.
 
done

> Last but not least, include tests :-)

done

I also converted ARM/MBlaze. Please check the next patch!

roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-cfi-register.patch
Type: text/x-diff
Size: 7231 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110126/becbafaf/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110126/becbafaf/attachment.sig>


More information about the llvm-commits mailing list