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] 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;


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