PATCH: Factor out reg location descriptor in dwarf2out.c

Ian Lance Taylor iant@google.com
Wed Aug 13 18:37:00 GMT 2008


"H.J. Lu" <hjl.tools@gmail.com> writes:

> 2008-08-13  H.J. Lu  <hongjiu.lu@intel.com>
>
> 	* dwarf2out.c (dwarf_stack_op_name): Remove prototype.
> 	(new_loc_descr): Likewise.
> 	(add_loc_descr): Likewise.
> 	(size_of_loc_descr): Likewise.
> 	(size_of_locs): Likewise.
> 	(output_loc_operands): Likewise.
> 	(output_loc_sequence): Likewise.
> 	(new_reg_loc_descr): New.
> 	(build_cfa_loc): Use it.
> 	(build_cfa_aligned_loc): Likewise.
> 	(one_reg_loc_descriptor): Likewise.
> 	(based_loc_descr): Likewise.

This is OK.


> -      if (dwarf_fp <= 31)
> -	head = new_loc_descr (DW_OP_breg0 + dwarf_fp, 0, 0);
> -      else
> -	head = new_loc_descr (DW_OP_bregx, dwarf_fp, 0);
> -
> +      head = new_reg_loc_descr (dwarf_fp, 0);

Note that this will change from DW_OP_breg to DW_OP_reg.  As far as I
can see, that should be fine.

Thanks.

Ian



More information about the Gcc-patches mailing list