This is the mail archive of the
mailing list for the binutils project.
Re: [RL78] Fix encoding of divwu insn
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.
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.
> * 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
> * 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.