-
Notifications
You must be signed in to change notification settings - Fork 56
Fix common ARM32 assembly discrepancies #166
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
base: main
Are you sure you want to change the base?
Conversation
645a716 to
ef2fb96
Compare
Surprising to hear of this sources of mismatches. Is it different in the binary, e.g. some arm vs thumb thing? Or what causes objdump to either one or the other? |
|
The issue is with the assembler used by decomp.me. Objdump is correct in disambiguating these 2 cases, as the instructions have different encodings: Unfortunately the assembler used by decomp.me |
|
Can we change the assembler? I worry that this could hide real mismatches from wrong assembler choices, and make them hard to debug when you notice that your build doesn't match. If it's impractical or never comes up in practice outside decomp.me then I guess we could merge this. (We have a similar case to this in MIPS where |
|
That makes sense, I'll report back after investigating the effort on adding proprietary assemblers to decomp.me. I did some spelunking into modern binutils to see if there's any flags to disable this behavior. Unfortunately, there did not seem to be any -- from what I can tell, this is baked into the relocation-processing stage of the assembler ( |
This change normalizes the assembly output to remove 2 common sources of diff scoring penalties:
Before: https://pastebin.com/raw/CybxVDe2
After: https://pastebin.com/raw/BMXyfD5s
arm32-discrepancies.zip