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]

Patch to fix end-of-word check in tc-sh.c:parse_reg.



sh parse_reg() was sometimes checking the wrong character for the end of
a register name.  Tested on sh-elf, committed as obvious.

Richard


	* config/tc-sh.c (parse_reg): Fix end-of-word check for is, ix, iy
	and mod.

Index: gas/config/tc-sh.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sh.c,v
retrieving revision 1.52
diff -u -p -d -r1.52 tc-sh.c
--- gas/config/tc-sh.c	2002/01/24 02:59:16	1.52
+++ gas/config/tc-sh.c	2002/01/30 18:01:31
@@ -598,7 +598,7 @@ parse_reg (src, mode, reg)
 	}
     }
 
-  if (l0 == 'i' && l1 && ! IDENT_CHAR ((unsigned char) src[3]))
+  if (l0 == 'i' && l1 && ! IDENT_CHAR ((unsigned char) src[2]))
     {
       if (l1 == 's')
 	{
@@ -733,7 +733,7 @@ parse_reg (src, mode, reg)
 	}
     }
   if (l0 == 'm' && l1 == 'o' && TOLOWER (src[2]) == 'd'
-      && ! IDENT_CHAR ((unsigned char) src[4]))
+      && ! IDENT_CHAR ((unsigned char) src[3]))
     {
       *mode = A_MOD;
       return 3;


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