Right now the writes to VFPU control registers are modelled without side-effects
This causes the following incorrect decompilation results:
Next, there are 2 very cruel Libc functions setjmp and longjmp.
The only issue I have with the decompilation of setjmp is the name register0x00000074 for sp.
The function longjmp breaks the calling convention by overwriting the preserved regs, but Ghidra silently swallows the error (generally speaking, Ghidra often leaves out the stack operations from the decompilation). I certainly don't wanna miss anything and I even have Eliminate unreachable code disabled by default, but here it doesn't help.
I hope fixing the VFPU and the sp name is easy. I really hope something can be done with longjump too, but I'm afraid the calling convention is to blame.
Quoting kotcrab:
This causes the following incorrect decompilation results:
Next, there are 2 very cruel Libc functions
setjmp
andlongjmp
.The only issue I have with the decompilation of
setjmp
is the nameregister0x00000074
forsp
.The function
longjmp
breaks the calling convention by overwriting the preserved regs, but Ghidra silently swallows the error (generally speaking, Ghidra often leaves out the stack operations from the decompilation). I certainly don't wanna miss anything and I even haveEliminate unreachable code
disabled by default, but here it doesn't help.I hope fixing the VFPU and the
sp
name is easy. I really hope something can be done withlongjump
too, but I'm afraid the calling convention is to blame.