This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [SH]: prepending $ to register names
- From: Nick Clifton <nickc at redhat dot com>
- To: kraj at mvista dot com
- Cc: binutils at sourceware dot org
- Date: Thu, 06 Oct 2005 12:52:36 +0100
- Subject: Re: [SH]: prepending $ to register names
- References: <43260922.2040707@mvista.com> <433D1FF9.7020007@redhat.com> <43424D4B.8080209@mvista.com>
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