Hacker News new | ask | show | jobs
by WalterBright 1663 days ago
I originally underestimated the value of Open Source, which was definitely a mistake. Now I do everything in Open Source. The latest was releasing my disassembler, originally written in 1982, under a Boost License. (It may be old, but it disassembles the latest Intel instruction sets.)

It's now part of the dmd D compiler. Just throw the -vasm switch, and it'll display the generated code on the console.

I see many uses for a freely available disassembler. For example, you can add it to your favorite text editor! Admit it, you've always wanted to disassemble your text.

https://github.com/dlang/dmd/blob/master/src/dmd/backend/dis...

2 comments

> I originally underestimated the value of Open Source, which was definitely a mistake. Now I do everything in Open Source.

Humble comment. It is very good to hear this. Will guard this for future examples.

> latest Intel instruction sets.

I'm impressed with -vasm, but fo the record this isn't strictly true. It supports most everything you'll see day to day but AVX2 (for example) is emphatically not the latest and greatest.

AVX512 adds quite a lot of stuff for example. Entirely new set of mask registers for example.

Even with the VEX prefix Intel did new instructions just recently (VNNI).

As long as it doesn't blow up I think it's fine to not support these, just want to make it clear that if you use (say) TSX via inserting raw bytes in an AsmStatement (which I have done) then the disassembler will not pick it up.