Skip to content

Improving the VFPU decompilation #40

@Nemoumbra

Description

@Nemoumbra

Quoting kotcrab:

Right now the writes to VFPU control registers are modelled without side-effects

This causes the following incorrect decompilation results:
image

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.

image

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.

image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions