beardypig / ghidra-emotionengine

Ghidra Processor for the Play Station 2's Emotion Engine MIPS based CPU
Apache License 2.0
198 stars 35 forks source link

dsra32 Special Case #58

Open fuzzywalls opened 3 years ago

fuzzywalls commented 3 years ago

I ran across a problem (?) with the special case for dsra32. When the function in data/languages/mips.sinc (line 251) is left with empty brackets API functions such as getOperandRefType(x) will return None when it should return an appropriate value. I copied the implementation above it (the non-special case for dsra32) and functionality worked as expected, for me anyway. Also, right-clicking and selecting "Instruction Info..." shows missing Input Objects and Results Objects.

From this instruction:

Screen Shot 2021-05-03 at 12 29 34 PM

Before populating the function:

Screen Shot 2021-05-03 at 12 25 03 PM

After populating the function:

Screen Shot 2021-05-03 at 12 24 02 PM

This is the only change I made to achieve that result:

Screen Shot 2021-05-03 at 12 27 56 PM

I didn't want to make this a pull request because I don't know enough about Ghidra internals to know if this change will break something else.

beardypig commented 3 years ago

Hey, I think you should make a PR regardless as it will be easier to review the change you're suggesting.