[SH]: prepending $ to register names

Khem Raj kraj@mvista.com
Tue Oct 4 09:37:00 GMT 2005


Hi Nick

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?

Thanks

Khem

gas/ChangeLog

2005-10-04  Khem Raj  <kraj@mvista.com>
                            NIIBE Yutaka  <gniibe@m17n.org>

        * config/tc-sh.c (use_dollar_register_prefix): New variable.
        (parse_reg_without_prefix):New function.
        (parse_reg): Check for '$' register prefix if -enable-reg-prefix 
is set.
        (option md_longopts): Add enable-reg-prefix option.
        * doc/c-sh.texi: Document -enable-reg-prefix option.
        * testsuite/gas/sh/basic.exp:  Run reg-prefix test.
        * testsuite/gas/sh/reg-prefix.s: New
        * testsuite/gas/sh/reg-prefix.d: New
   

Nick Clifton wrote:
> Hi Khem,
>
>> I have a question regrading SH assembly. Is it required to have '$' 
>> prepended to register names?.
>
> At the moment: "No".
>
>> There was some discussion about it in the following URL.
>> http://sourceforge.net/mailarchive/forum.php?forum_id=5348&max_rows=25&style=nested&viewmonth=200011 
>> but the patch posted there is not applied in binutils
>
> I would be prepared to accept a variant of that patch whereby 
> requiring a "$" register prefix was controlled by a GAS command line 
> switch, (which defaults to off).  That way the current behaviour can 
> be preserved, but the more useful behaviour (of requiring the prefix) 
> can be enabled if the user so desires.
>
> Cheers
>   Nick
>
>

-- 
Khem Raj <kraj@mvista.com>
MontaVista Software, Inc.
www.mvista.com

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff
URL: <https://sourceware.org/pipermail/binutils/attachments/20051004/1d5cc8bc/attachment.ksh>


More information about the Binutils mailing list