[RL78] Fix encoding of divwu insn
nick clifton
nickc@redhat.com
Fri Feb 22 15:39:00 GMT 2013
Hi Kaushik,
> This is quite odd indeed. I too have the same document(R01US0015EJ0100 Rev.1.00)
> which is dated Jan 31 2011.
Hmm, it appears that Renesas revised the document, but did not later the
release date or revision number. Naughty Renesas.
> The software manual currently available on their website also has
> a [0xCE 0xFB 0x0B] encoded for the DIVWU instruction and has no mention of
> a DIVH instruction.
> http://documentation.renesas.com/doc/products/mpumcu/doc/rl78/r01us0015ej_rl78.pdf
Agreed.
> We came across this issue while testing some code on the G14 target which
> supports this instruction and the hardware seemed to behave inconsistently.
> The updated toolchain with this patch seemed to resolve our problems.
Fair enough, hardware trumps paper.
> gas/Changelog
> * rl78-parse.y: Fix encoding of divwu insn.
This part of the patch is approved, but before you apply it, please
could you add a comment mentioning the change of opcode encoding and the
fact that different versions of the Software Manual exist with the same
revision number.
> opcodes/Changelog
> * rl78-decode.c: Fix encoding of divwu insn.
> * rl78-decode.opc: Ditto.
I think that it would be better to leave the "case 0x04:" statements in
place - but maybe have them decode to "divwu <old-encoding>" or
something like that. (0xce/0xfb/0x04 is not used for anything else, yes
?)
Adding the new case values is approved.
Cheers
Nick
More information about the Binutils
mailing list