Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PowerPC:BE:64 LQ instruction to support signed offsets #6827

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

v-p-b
Copy link

@v-p-b v-p-b commented Aug 19, 2024

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 includes ppc_isa.sinc that defines LQ), but it correctly decompiles with this fix.

Based on the Power ISA manual sign extended DQ<<4 is added to RA to
get source EA.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants