Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

long long value decompile #2

Open
SquallATF opened this issue Nov 21, 2019 · 1 comment
Open

long long value decompile #2

SquallATF opened this issue Nov 21, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@SquallATF
Copy link

SquallATF commented Nov 21, 2019

as return value the register order is v1 v0 should modify allegrex.cspec line 58 like this

                <pentry minsize="5" maxsize="8">
                    <addr space="join" piece1="v1" piece2="v0"/>
                </pentry>

and as parameter like SceOff sceIoLseek(SceUID fd, SceOff offset, int whence) the parameter storage link this

fd a0
offset a3, a2
whence t0

but I don't known how to modify cspec, can use custom storage in edit function

@kotcrab
Copy link
Owner

kotcrab commented Aug 17, 2021

I tried to fix this but looks like Ghidra can't currently support this, see issue NationalSecurityAgency/ghidra#2762

Added joined registers to cspec like so:

                <pentry minsize="1" maxsize="4">
                    <register name="a0"/>
                </pentry>
                <pentry minsize="1" maxsize="4">
                    <register name="a1"/>
                </pentry>
                <pentry minsize="5" maxsize="8">
                    <addr space="join" piece1="a1" piece2="a0"/>
                </pentry>

And the result I'm getting:

image

For what's it worth you can handle such functions with Use custom storage option.

I fixed the endianness for long long return values.

@kotcrab kotcrab added the bug Something isn't working label Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants