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

Issue decompiling from PowerPC ASM generated by IDA Pro #264

Open
kernaltrap8 opened this issue Aug 28, 2023 · 7 comments
Open

Issue decompiling from PowerPC ASM generated by IDA Pro #264

kernaltrap8 opened this issue Aug 28, 2023 · 7 comments

Comments

@kernaltrap8
Copy link

Hello,
I disassembled a ELF from a Playstation 3 and exported it as ASM, however when running it through m2c it gives me this error:

PS C:\cygwin\home\693982\m2c> python3 m2c.py ..\WoRmod\binary\src\EBOOT.asm --target ppc-mwcc-c
/*
Decompilation failure:

unsupported non-nop instruction outside of function (OPDEntry struc)
*/

I don't know why this isn't working. Does m2c not support AltiVec PowerPC?

@SeekyCt
Copy link
Contributor

SeekyCt commented Aug 28, 2023

Yeah, it's just the gc/wii instruction set currently, no altivec

@kernaltrap8
Copy link
Author

kernaltrap8 commented Aug 28, 2023 via email

@simonlindholm
Copy link
Collaborator

Can you post the asm you're trying? The issue you're hitting isn't about altivec, it looks like a formatting thing. I imagine altivec instructions won't occur very commonly so m2c might work alright most of the time (although probably not as well as ghidra; we haven't put too much effort into ppc support).

@kernaltrap8
Copy link
Author

kernaltrap8 commented Aug 30, 2023

Can you post the asm you're trying? The issue you're hitting isn't about altivec, it looks like a formatting thing. I imagine altivec instructions won't occur very commonly so m2c might work alright most of the time (although probably not as well as ghidra; we haven't put too much effort into ppc support).

its a whole program, about 250MB of assembly. i can upload it and send it here, if you like. its just the direct dump from the ELF in IDA Pro.

@simonlindholm
Copy link
Collaborator

can you try to run m2c on just the first function of it, and post that here if it doesn't work?

@kernaltrap8
Copy link
Author

can you try to run m2c on just the first function of it, and post that here if it doesn't work?

how do i specify just a function? sorta like this?
python3 m2c.py EBOOT.asm [function]

@simonlindholm
Copy link
Collaborator

simonlindholm commented Sep 1, 2023

Yes, that works. But I was thinking you could modify the .asm file to include just a single function, to have something to post here that's easier to work with and less infringing on copyright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants