This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] enhance register parsing in .cfi_* handling (v2)


On Tue, Feb 12, 2008 at 08:38:56AM +0000, Jan Beulich wrote:
> Allow using register names requiring special parsing as well as
> register equates in .cfi_* directives, if the target can support these
> (i.e. specifically, if all ways to specify registers are unambiguous).
> This requires a new hook, tc_x86_parse_to_dw2regnum(), superceding
> tc_x86_regname_to_dw2regnum() and allowing the target to do more
> sophisticated parsing of the respective (register) expressions. Use
> this on i?86 and x86-64.
> 
> Built and tested on i686-pc-linux-gnu and x86_64-unknown-linux-gnu.
> 
> gas/
> 2008-02-12  Jan Beulich  <jbeulich@novell.com>

You need a blank line here.

> 	* config/tc-i386.c (allow_pseudo_reg): New.
> 	(parse_real_register): Check for NULL just once. Allow all
> 	register table entries when allow_pseudo_reg is non-zero.
> 	Don't allow any registers without type when allow_pseudo_reg
> 	is zero.
> 	(tc_x86_regname_to_dw2regnum): Replace with ...
> 	(tc_x86_parse_to_dw2regnum): ... this.
> 	(tc_x86_frame_initial_instructions): Adjust for above change.
> 	* config/tc-i386.h (tc_regname_to_dw2regnum): Remove.
> 	(tc_parse_to_dw2regnum): New.
> 	(tc_x86_regname_to_dw2regnum): Replace with ...
> 	(tc_x86_parse_to_dw2regnum): ... this.
> 	* dw2gencfi.c (tc_parse_to_dw2regnum): New, broken out of ...
> 	(cfi_parse_reg): ... this. Use tc_parse_to_dw2regnum. Adjust
> 	error handling.
> 
> gas/testsuite/
> 2008-02-12  Jan Beulich  <jbeulich@novell.com>

You need a blank line here.

> 	* gas/cfi/cfi-i386.s: Add code testing use of all registers.
> 	Fix a few comments.
> 	* gas/cfi/cfi-x86_64.s: Likewise.
> 	* gas/cfi/cfi-i386.d, gas/cfi/cfi-x86_64.d: Adjust.
> 
> opcodes/
> 2008-02-12  Jan Beulich  <jbeulich@novell.com>

You need a blank line here.

> 	* i386-gen.c (process_i386_registers): Process new fields.
> 	* i386-opc.h (reg_entry): Shrink reg_flags and reg_num to
> 	unsigned char. Add dw2_regnum and Dw2Inval.
> 	* i386-reg.tbl: Provide initializers for dw2_regnum. Add pseudo
> 	register names.
> 	* i386-tbl.h: Re-generate.
> 

The old assembler uses the same register syntax in .cfi_* directives
as in normal instructions. The new one allows naked registers
unconditionally.  I think .cfi_* directives should be consistent
with instructions.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]