This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Patch to fix end-of-word check in tc-sh.c:parse_reg.
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: 30 Jan 2002 18:28:33 +0000
- Subject: 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;