This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] For SH target,DSP index register instruction is case sensitive
- From: "Arati" <aratid at kpit dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Thu, 29 Nov 2001 14:56:51 +0530
- Subject: [PATCH] For SH target,DSP index register instruction is case sensitive
Hi !
The DSP instruction MOVX.W @R4+R8,X0 gives Assembler error "invalid operands
for opcode".
On analyzing the code, I found that in tc-sh.c, in function parse_at(), r8
and r9
were checked without fisrt calling tolower() function as is done in the
other parse functions.
This can be solved with the patch below.
Regards,
Arati Dikey
Changelog
2001-11-29 Arati Dikey <aratid@kpit.com>
* tc-sh.c (parse_at): Removed case-sensitivity of index register R8, R9 .
--- tc-sh.orig Fri Nov 23 11:21:43 2001
+++ tc-sh.c Thu Nov 29 10:57:25 2001
@@ -976,13 +976,13 @@
if (src[0] == '+')
{
src++;
- if ((src[0] == 'r' && src[1] == '8')
+ if ((tolower(src[0]) == 'r' && src[1] == '8')
|| (src[0] == 'i' && (src[1] == 'x' || src[1] == 's')))
{
src += 2;
op->type = A_PMOD_N;
}
- if ((src[0] == 'r' && src[1] == '9')
+ if ((tolower(src[0]) == 'r' && src[1] == '9')
|| (src[0] == 'i' && src[1] == 'y'))
{
src += 2;