Open PJ-Zetier opened 2 months ago
isel
is an issue for several variants. Currently it's stuck in quicciii.sinc
but it should probably be moved to ppc_instructions.sinc
instead. For the mulhw
instructions they should be present - they're in ppc_instructions.sinc
so I'm not sure why they would be missing. Can you paste the bits for the mulhw
instructions here and which processor ID you're using?
In ppc_instructions.sinc The @include for mulhwInstructions.sinc is wrapped in an @ifndef guard for NoLegacyIntegerMultiplyAccumulate which is not defined in ppc_324xx*.slaspec which is why the instructions are not included.
In ppc_instructions.sinc The @include for mulhwInstructions.sinc is wrapped in an @ifndef guard for NoLegacyIntegerMultiplyAccumulate which is not defined in ppc_324xx*.slaspec which is why the instructions are not included.
The ifndef
guard implies that if it is not defined it will be included. Those instructions should be included. That's why I wanted the language ID and some bytes. I created a dummy 4xx test binary and was able to get some instructions to decompile, so I'd like to figure out exactly which ones are not decompiling.
I dont know why my brain saw ifndef as ifdef.. Like i even typed out ifndef.. sorry for that.. I think the issue on our end is primarily the isel, I believe I incorrectly added mulh* instructions in the ticket. I had assumed the file was still set to 4xx but someone had moved it over to quickIII for the isel instruction..
@GhidorahRex currently waiting for the engineer that had the mulh* issue to get in.. will update later today
Apologies, we couldn't reproduce the mulh* issue so disregard. However, the isel is still an issue.
Describe the bug The PowerPC 4xx processor module is missing support for key instructions, specifically the Multiply half word instructions (mulhw) and isel (Integer Select) instructions. This is affecting disassembly and decompilation for binaries that use these instructions, leading to incorrect or incomplete analysis.
To Reproduce Steps to reproduce the behavior:
Expected behavior Ghidra should recognize and handle mulhw and isel instructions during disassembly and decompilation, producing the correct instruction output without errors.
Screenshots N/A for now, but will add if needed.
Attachments N/A
Environment (please complete the following information):
Additional context This issue was identified during reverse engineering work on a both a PowerPC 405 and 440 binary.