[PATCH] RX: Incorrect output for displacement of subtruct expression

Oleg Endo olegendo1024@gmail.com
Thu Dec 26 07:53:59 GMT 2024


On Thu, 2024-12-26 at 12:53 +0900, Yoshinori Sato wrote:
> Assembling the following code results in incorrect displacement values:
> 1: mov.L 2f-1b[r0],r0
> 
> If you write a subtraction formula in the displacement field, the value
> will simply be the result of the subtraction, which will not be the
> expected value for word and longword sizes.
> 
> gas/
> 	* config/rx-parse.y (displacement): use BFD_RELOC_RX_GPREL in subtract expression.
> 	* testsuite/gas/rx/mov.sm: Add subtruct expression displacement.
> 	* testsuite/gas/rx/mov.d: Likewise.
> 

Hi!

Wow .. how did you find this bug?  I'm curious because I've been using an RX
system with GCC 8 and older binutils for several years.

Thanks for posting the patch!

Best regards,
Oleg Endo



More information about the Binutils mailing list