Fix #96: Make x86 disassem produce code usable by gcc/clang
We make the x86 disassembler produce code that can (almost) be directly used by gcc or clang to produce the same code as produced by the compiler.
This means:
- Make the disassembler print the radix indicator ("#x") by default.
- Add ".intel_syntax noprefix" to tell gcc/clang the syntax being used. This is added only for x86.
- Use
/* ... */
for comments instead of;
. This is done for all archs. We also set*print-right-margin*
to 100 so that we're less likely to wrap long things, or truncate the output. - Increase
*note-column*
for x86 because some instructions can be rather long; this makes the note columns more likely to line up neatly without having some instructions pushing the note column farther right so that they don't line up neatly.
This doesn't solve everything; we still have an issue with printing call
in a way that's accepted by both clang and gcc and so that both clang and gcc produce the same code.
Edited by Raymond Toy