[SH]: prepending $ to register names

Nick Clifton nickc@redhat.com
Thu Oct 6 11:43:00 GMT 2005


Hi Khem,

> As you suggested. This patch adds a command line option 
> -enable-reg-prefix to SH target options and is disabled by default.
> 
> Is this patch acceptable?

Yes, but I have made a few changes before checking it in.  Specifically:

   * The code for the new parse_reg() function was broken, in that if
     prefixes were enabled and src[0] was '$' it would always return a
     non-zero value, even if parse_reg_without_prefix was unable to 
parse
     the rest of the register name.  I have fixed this.

   * I separated out the ChangeLog entries for the testsuite additions
     and moved them into the ChangeLog that resides inside the testsuite/
     directory.

   * I changed the name of the switch to --allow-reg-prefix since I think
     that this more accurately reflects the idea that the prefix is
     optional and not compulsory.

   * I added a mention of the new switch to the gas/NEWS file.

These are the ChangeLog entries that I checked in:

gas/ChangeLog
2005-10-06  Khem Raj  <kraj@mvista.com>
             NIIBE Yutaka  <gniibe@m17n.org>

	* config/tc-sh.c (allow_dollar_register_prefix): New variable.
	(parse_reg_without_prefix): New function.
	(parse_reg): Check for '$' register prefix if --allow-reg-prefix is
	set.
	(option md_longopts): Add allow-reg-prefix option.
	* doc/c-sh.texi: Document --allow-reg-prefix option.
	* NEWS: Mention the new switch.

gas/testsuite/ChangeLog
2005-10-06  Khem Raj  <kraj@mvista.com>
             NIIBE Yutaka  <gniibe@m17n.org>

	* gas/sh/basic.exp:  Run reg-prefix test.
	* gas/sh/reg-prefix.s: New
	* gas/sh/reg-prefix.d: New

Cheers
   Nick



More information about the Binutils mailing list