Fix common ARM32 assembly discrepancies#166
Fix common ARM32 assembly discrepancies#166abaresk wants to merge 4 commits intosimonlindholm:mainfrom
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