GNURX toolchain generates incorrect opcode for "mov.b #0xff, [r0]" instruction.
Vinay Kumar. G
Vinay.G@kpit.com
Tue Feb 2 13:03:00 GMT 2016
Hi Nick,
Thanks for giving an opportunity to work on the below posted
GNURX related bug.
https://sourceware.org/ml/binutils/2015-09/msg00095.html
The bug is also reported in the following link:
https://sourceware.org/bugzilla/show_bug.cgi?id=19556
I have verified the correct opcode generation for r0 register
using below patch.
{{{
Index: gas/config/rx-parse.y
===================================================================
--- gas/config/rx-parse.y (revision 2893)
+++ gas/config/rx-parse.y (working copy)
@@ -271,7 +271,15 @@
} }
/* ---------------------------------------------------------------------- */
+ | MOV DOT_B '#' EXPR ',' '[' REG ']'
+ { B2 (0xf8, 0x04); IMMB ($4, 12);}
+ | MOV DOT_W '#' EXPR ',' '[' REG ']'
+ { B2 (0xf8, 0x01); IMMW ($4, 12);}
+
+ | MOV DOT_L '#' EXPR ',' '[' REG ']'
+ { B2 (0xf8, 0x02); IMM ($4, 12);}
+
| MOV DOT_B '#' EXPR ',' disp '[' REG ']'
/* rx_disp5op changes the value if it succeeds, so keep it last. */
{ if ($8 <= 7 && rx_uintop ($4, 8) && rx_disp5op0 (&$6, BSIZE))
}}}
However I am still facing issue with registers other than r0 like r1-r15. Can you please give
some hints how to go about with this.
p.s. Kindly ignore any disclaimers at end of this e-mail as they are auto-inserted.
Regards,
Vinay
More information about the Binutils
mailing list