[PATCH, MIPS] Check the source register for bltzal and others

Chao-Ying Fu Chao-Ying.Fu@imgtec.com
Fri Sep 13 06:23:00 GMT 2013


Richard Sandiford wrote:
> Chao-Ying Fu <Chao-Ying.Fu@imgtec.com> writes:
> > Index: gas/config/tc-mips.c
> > ===================================================================
> > RCS file: /cvs/src/src/gas/config/tc-mips.c,v
> > retrieving revision 1.591
> > diff -u -p -r1.591 tc-mips.c
> > --- gas/config/tc-mips.c	19 Aug 2013 20:07:09 -0000	1.591
> > +++ gas/config/tc-mips.c	11 Sep 2013 23:12:28 -0000
> > @@ -7091,6 +7091,10 @@ match_insn (struct mips_cl_insn *insn, c
> >  		set_insn_error
> >  		  (0, _("a destination register must be supplied"));
> >  	    }
> > +	  else if (arg.last_regno == 31
> > +		   && (strncmp (insn->insn_mo->name, "bltzal", 6) == 0
> > +		       || strncmp (insn->insn_mo->name, 
> "bgezal", 6) == 0))
> > +	    set_insn_error (0, _("a source register must not be $31"));
> 
> "the source register" sounds better than "a source register".
> 
> OK with that change, thanks.

  Yes.  Done.  Thanks a lot!

Regards,
Chao-ying



More information about the Binutils mailing list