In the RX toolchain, the 'opcode' generated for register relative addressing with '0' displacement value is incorrect.

Nick Clifton nickc@redhat.com
Tue Sep 8 11:23:00 GMT 2015


Hi Vinay,

> The RX toolchain does not generate correct 'opcode' for register relative addressing mode using '0' displacement value.
>
> The below example is for "mov.b [Rs],dsp:5[Rd]" and "mov.b dsp:5[Rs],[Rd]" instructions.
> The same issue is also observed with "mov.w" and "mov.l" instructions.

The patch is good, but I do not think that it goes far enough.  There 
are other versions of the MOV instruction that have alternative 
zero-displacement formats.  For example:

   mov.b #0xff, [r0]     => encodes as;       3c 00 00
   mov.b #0xff, 0[r0]    => should encode as: f9 04 00 ff

Could you look into these as well please ?

Cheers
   Nick



More information about the Binutils mailing list