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 SH Assembler: Generates error in case of instruction mov#Imm,rd


Hi Anil,

> 2004-02-26  Anil Paranjpe  <anilp1@kpitcummins.com>
> 	 * config/tc-sh.c (get_operand) :  In case of #Imm, check has been added for wrong syntax.
>
> --- binutils-040224/gas/config/tc-sh.c.old  Fri Dec  5 17:25:02 2003
> +++ binutils-040224/gas/config/tc-sh.c	    Thu Feb 26 17:00:07 2004
> @@ -1426,6 +1426,8 @@ get_operand (char **ptr, sh_operand_info
>  
>    if (src[0] == '#')
>      {
> +	  if( !isdigit(src[1]) )
> +	     as_bad (_("syntax error in #Imm"));
>        src++;
>        *ptr = parse_exp (src, op);
>        op->type = A_IMM;

Thank you very much for submitting this patch.  I have applied it with
one small change.  I replaced 'isdigit' with 'ISDIGIT' since tc-sh.c
uses the safe-ctype.h header file.

Cheers
        Nick
        


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