Instruction Annotations
See original GitHub issueThis is an excellent tool! Though it seems that godbolt is geared more towards experts, it would be really great if it were possible to enable something that would show little annotations with each instruction. The annotations would explain in a few words what each instruction does in the compiled output.
I know assembly and have written some of it before, but I don’t know every instruction and often need to look things up. If I’m just trying to figure out a simple problem or look for something, it would make my life much easier if I could just look click a button and be reminded what every instruction does. It can be nice to have it explained plainly that mov x, y
moves y
to x
. No need to remember which argument is the destination.
The explanations don’t have to be detailed, just a simple description of the instruction:
add ecx, eax ; add eax to ecx and store the result in ecx
alternatively:
add ecx, eax ; ecx = ecx + eax
This is a simple example, but imagine having this on all the instructions including the ones you don’t know off hand. In a larger program, this can be very beneficial. With this, there is no need to remember which register is the destination and what the order of the operands will be.
There are so many variations on instructions as well. Having this would save a lot of time looking up what each different one means.
Both experienced users and novices alike can benefit from this. It’ll make reading the generated asm a lot easier.
It can be something turned on/off with a button just like the other options already available.
Edit: The instruction descriptions do not need to be written by hand either. There are resources online that can be scraped and used to generate each one.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Ey @sunjay ! While this is not exactly what you describe, we’re in the process of implementing asm documentation, and while it’s not perfect yet (We don’t support every opcode yet, some descriptions could be parsed better… etc), you can try it now on the site. Simply place the mouse over the opcode and it will show you its basic description. Right clicking the opcode and pressing
Show asm documentation
will give you even more data, along with a link for even more!While we’re going to bring more features to it over the course of the next weeks, you’re more than welcomed to give us your feedback after testing its current implementation.
Might be able to do something in conjuction with e.g. https://github.com/StanfordPL/x64asm/blob/develop/src/x86.csv