This is the mail archive of the binutils@sources.redhat.com 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] MIPS gas: use $zero as alias for $0


On Sat, Jun 01, 2002 at 04:00:20AM +0200, Thiemo Seufer wrote:
> Hi All,
> 
> this adds '$zero' as an alias name for the hardware special register $0.
> It also allows the use of $kt0, $kt1 aliases, this is compatible to native
> mips tools.

> @@ -8231,6 +8219,11 @@ mips_ip (str, ip)
>  			  s += 4;
>  			  regno = KT1;
>  			}
> +		      else if (s[1] == 'z' && s[2] == 'e' && s[3] == 'r' && s[4] == '0')
> +			{
> +			  s += 5;
> +			  regno = ZERO;
> +			}
>  		      else if (itbl_have_entries)
>  			{
>  			  char *p, *n;

Surely you meant 's[4] == 'o''?

> @@ -12230,6 +12203,12 @@ tc_get_register (frame)
>  	reg = GP;
>        else if (strncmp (input_line_pointer, "at", 2) == 0)
>  	reg = AT;
> +      else if (strncmp (input_line_pointer, "kt0", 3) == 0)
> +	reg = KT0;
> +      else if (strncmp (input_line_pointer, "kt1", 3) == 0)
> +	reg = KT1;
> +      else if (strncmp (input_line_pointer, "zero", 4) == 0)
> +	reg = ZERO;
>        else
>  	{
>  	  as_warn (_("Unrecognized register name"));

This isn't introduced by your patch, but - what will this code do with
"$at1" or "$kt12"?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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