diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-05-21 15:09:31 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-05-21 15:09:31 -0700 |
commit | a69ce1d19df4df273c6178c19dc9dbe3df2d4928 (patch) | |
tree | 39c157a5b04fb60afd43eb8b97a018fbcad42593 /disasm.c | |
parent | 895f56b611949d7e7dee94990c142797d3d9a2f3 (diff) | |
download | nasm-a69ce1d19df4df273c6178c19dc9dbe3df2d4928.tar.gz |
insnsn.c: cleaner to *not* separate out conditional instructions
The disassembler code gets cleaner if we do *not* separate out the
conditional instructions; instead, rely on the fact that the
conditionals are always at the end and use FIRST_COND_OPCODE as a
barrier.
Diffstat (limited to 'disasm.c')
-rw-r--r-- | disasm.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1245,14 +1245,13 @@ int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize, } i = (*p)->opcode; - if (i >= FIRST_COND_OPCODE) { + if (i >= FIRST_COND_OPCODE) slen += snprintf(output + slen, outbufsize - slen, "%s%s", - nasm_cond_insn_names[i-FIRST_COND_OPCODE], - condition_name[ins.condition]); - } else { + nasm_insn_names[i], condition_name[ins.condition]); + else slen += snprintf(output + slen, outbufsize - slen, "%s", nasm_insn_names[i]); - } + colon = false; length += data - origdata; /* fix up for prefixes */ for (i = 0; i < (*p)->operands; i++) { |