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

Identical numeric values considered different in diff #121

Open
marijnvdwerf opened this issue Aug 16, 2023 · 5 comments
Open

Identical numeric values considered different in diff #121

marijnvdwerf opened this issue Aug 16, 2023 · 5 comments

Comments

@marijnvdwerf
Copy link

260849477-7ee25f4d-7ebb-4471-96db-9b2953721d4a

(Source: https://decomp.me/scratch/xtJVv)

The target has 0x1, but the current version of the assembly displays 1. I'd expect it to not count as an actual difference.

Originally reported as decompme/decomp.me#816

@AngheloAlf
Copy link
Contributor

This is not a bug, this is an actual difference. This is caused because of objdump's pseudo instructions.
You can see the actual difference in the scratch you posted by clicking on "Disable pseudo instructions".

@simonlindholm
Copy link
Owner

simonlindholm commented Aug 16, 2023

That said, it would be nice if we could convert hex li instructions into ori x, zero, imm to make this clearer, it's very confusing right now.

@AngheloAlf
Copy link
Contributor

iirc the asm produced by psx compilers needs to be post-processed so it can match. The toolchain is a bit yucky.
It would be cool if asm-differ had an option to treat cases like this as the same instruction, but I don't think this should be enabled by default because this can be a real real difference on other compilers (it has at least happened on IDO)

@ethteck
Copy link
Contributor

ethteck commented Aug 16, 2023

I think Simon just means we should convert the hex li instructions in the output of this tool, not actually editing the input. but yeah I agree after this convo we shouldn't consider these equal, probably ever really

or if we do want to, yeah, it could be an option

@ethteck
Copy link
Contributor

ethteck commented Aug 16, 2023

image

(with pseudos off)

It seems we are treating some as equal, so that feels inconsistent

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

4 participants