encounter / objdiff

A local diffing tool for decompilation projects
Apache License 2.0
98 stars 18 forks source link

Support for AARCH(64)-architecture #60

Open MonsterDruide1 opened 4 months ago

MonsterDruide1 commented 4 months ago

Well, not much else to say about it ... I'd want to try using this on a decomp project for Nintendo Switch, which uses AARCH64.

I'm currently happy with using asm-differ, so feel free to sort this to being a low-priority issue.

encounter commented 3 months ago

This would be great to add, but the current limiting factor is finding (or creating) a complete enough aarch64 disassembler in Rust. Existing options:

Hopefully this changes in the near future, or someone works on finishing SIMD support for one of the above. I guess another question is: Would it still be useful to add ARM64 without SIMD?

MonsterDruide1 commented 3 months ago

For automatically diffing the resulting decompiled functions, we're currently using a mix of bad64 and capstone, feel free to look into that: https://github.com/open-ead/nx-decomp-tools/blob/master/viking/Cargo.toml

I assume that SIMD would mean NEON on the Switch. It is used in some very specific functions, but not too heavily across entire games. The only occurence I came over that were not hidden deep within some math-heavy functions were matrix-multiplications, apart from those it always uses the standard floating point registers/functions. So, it would still be useful having the architecture supported without SIMD, although we couldn't use objdiff as full replacement for asm-differ then.

MonsterDruide1 commented 2 months ago

Here's something else I ran across today: https://github.com/emproof-com/nyxstone

This seems to provide rust bindings for disassembling any architecture supported by LLVM, which should also include AARCH64.