I'm looking for a very minimalistic ARM64 instruction length disassembler, so I can traverse through some instructions of a function.
I need a standalone function without many dependencies, because I need it for a kernel driver.
For x64 I was using https://github.com/gh-nomad/length-disassembler/blob/master/ldisasm.cpp but I can't find something like it for AArch64. There's some full disassembly libraries, but they come with a ton of source code and user land dependencies.
I don't even need support for any of the extension instruction sets like SVE
Every AArch64 instruction is 4 bytes long, naturally aligned.
There isn't an equivalent of Thumb mode compressed instructions for it (yet?), so you don't even have to look at the machine-code bytes to find instruction boundaries.