[PATCH v2 08/15] MIPS: Mask off lowest bit when disassembling compressed code.

Jovan Dmitrovic jovan.dmitrovic@htecgroup.com
Thu Oct 30 15:45:05 GMT 2025


Hello Maciej,
>   Please explain in the commit description why this change is needed.
> Also do you have a test case, does it happen in reality?  And does this
> change affect GDB?

Apologies, I thought that ChangeLog description was enough,
considering it is a change to a single file.
As stated in the patch itself, I didn't write it,
I only adapted it (this and other patches have been used
in the industry for a long time). Unfortunately, the exact
reasoning behind this patch was lost somewhere along the way,
so I don't have a test case at the moment.

 From what I gather, this patch only comes into play if something went
horrifically wrong while assembling - if we could reproduce
this via gas, it would make more sense to fix it in gas itself, rather
than introducing this as a workaround. My guess is that this change makes
the disassembler a bit more resilient when it comes to erroneous input.
I can't see how it could impact GDB in any other way.

>   Why a copy variable?  I can't see any other use of `memaddr_base', so it
> seems to me the adjustment can be done in place.  Likewise in the other
> part.

I will correct that, thanks.

Regards,
Jovan


More information about the Binutils mailing list