2 ms·
> you've written an an ARM disassembler Here's my AArch64 disassembler work in progress: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/backend/arm
by WalterBright 2y ago
> you've written an an ARM disassembler
Here's my AArch64 disassembler work in progress:
https://github.com/dlang/dmd/blob/master/compiler/src/dmd/backend/arm/disasmarm.d https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ba...
I add to it in tandem with writing the code generator. It helps flush out bugs in both by doing this. I.e. generate the instruction, the disassemble it and compare with what I thought it should be.
It's quite a bit more complicated than the corresponding x86 disassembler:
https://github.com/dlang/dmd/blob/master/compiler/src/dmd/backend/x86/disasm86.d https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ba...