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.
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.