This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]