This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] : Missing 'else' causes incorrect opcode generation for SH target
- From: "Arati Dikey" <AratiD at kpit dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Tue, 4 Dec 2001 18:08:50 +0530
- Subject: [PATCH] : Missing 'else' causes incorrect opcode generation for SH target
hi !
The assembler generates opcode 'F496' for instruction 'MOVS.W X1,
@R4+R8'
while the correct opcode is 'F49D'.
After going through tc-sh.c, I found a missing 'else' statement
in function parse_at(). This is causing incorrect opcode generation
for several DSP instructions.
Regards,
Arati Dikey.
Changelog
2001-12-04 Arati Dikey <aratid@kpit.com>
* tc-sh.c (parse_at): corrected incorrect op->type selection due
to missing 'else' .
--- tc-sh.c.orig Mon Dec 3 09:54:00 2001
+++ tc-sh.c Mon Dec 3 10:03:55 2001
@@ -987,7 +987,7 @@
src += 2;
op->type = A_PMOD_N;
}
- if ((l0 == 'r' && l1 == '9')
+ else if ((l0 == 'r' && l1 == '9')
|| (l0 == 'i' && l1 == 'y'))
{
src += 2;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download and free European support of GNU tool
chain (GNUSH v0101) for Hitachi's SH Series
Read more at http://www.kpit.com/products/support.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~