[PATCH 1/2] ppc: extend opindex to 16 bits

Dmitry Selyutin ghostmansd@gmail.com
Thu May 12 07:41:24 GMT 2022


On Thu, May 12, 2022 at 3:13 AM Alan Modra <amodra@gmail.com> wrote:
> Huh?  What makes you say that?

That was my first impression, since the only negative value I found
was -1, and I initially thought that was just a placeholder value.
Thank you for noticing that! I changed the wording so that we only
stress that this is signed and (for now?) 16-bit.

> Also, your patch misses changing the following.  The existing 0xff
> mask was from a time when fx_pcrel_adjust was a signed char.
>
>       int opindex = fixP->fx_pcrel_adjust & 0xff;
>
> This could be any of
>       int opindex = fixP->fx_pcrel_adjust & 0xffff;
>       int opindex = (uint16_t) fixP->fx_pcrel_adjust;
>       uint16_t opindex = fixP->fx_pcrel_adjust;
> Which you choose is a matter of style.

Thank you! Since PPC code now has the typedef, I updated the patch to
use `(ppc_opindex_t)fixP->fx_pcrel_adjust` form.


More information about the Gdb-patches mailing list