Fix PowerPC:BE:64 LQ instruction to support signed offsets #6827
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on the Power ISA manual sign extended DQ<<4 is added to RA to get source EA.
I'm working on adding support for AS/400 programs to Ghidra. While my code is available in a dedicated repository, I'd like to see at least the Processor module improvements upstreamed. This PR is my first attempt to contribute code to Ghidra, so this is just a minimal change, and I'd appreciate any further feedback on how to improve the rest of the Processor module and maybe even getting the Loader/Analyzer exts to the project!
This PR can be tested with the following instruction (also present in the DEREF2.pgm shared here):
e1 1f ff b1 lq r8,-50(r31),0x01
This instruction doesn't decompile with the existing
PowerPC:BE:64:A2-32addr
language variant (which includesppc_isa.sinc
that definesLQ
), but it correctly decompiles with this fix.