[PATCH] RX: Incorrect output for displacement of subtruct expression
Oleg Endo
olegendo1024@gmail.com
Sat Dec 28 00:40:57 GMT 2024
On Fri, 2024-12-27 at 23:11 +0900, Yoshinori Sato wrote:
>
> I am trying to get FDPIC support in RX.
> gcc, which supports this FDPIC, generated the following code for a switch
> statement:
>
> 1: mvfc pc, r3
> shll #2, r14
> add r3, r14
> mov.L .L282 - 1b[r14], r14
>
> 1: bra r14
> .balign 4
> .L282:
> .long .L284 - 1b
> .long .L280 - 1b
> .long .L280 - 1b
>
> I investigated why this code wasn't working as expected and discovered that it
> was due to this bug.
> This kind of code is not output by the release version of gcc, and even when
> written in assembler, it is not written in this way, so I don't think anyone
> noticed the bug.
Very nice detective work. Thanks!
Best regards,
Oleg Endo
More information about the Binutils
mailing list