mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
struct itemplate: add insns.xda line number to the structure
Add the line number from insns.xda to struct itemplate. NASM itself doesn't need this information, but it makes debugging matching *much* easier; it is worth a few more bytes. In theory it could be conditionalized on --enable-debug, but it is probably not worth it. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
99898edfc1
commit
fbacd59cce
2 changed files with 2 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ struct itemplate {
|
|||
decoflags_t deco[MAX_OPERANDS]; /* bit flags for operand decorators */
|
||||
const uint8_t *code; /* the code it assembles to */
|
||||
uint32_t iflag_idx; /* some flags referenced by index */
|
||||
unsigned int xdaline; /* line # in insns.xda (for debug) */
|
||||
};
|
||||
|
||||
/* Use this helper to test instruction template flags */
|
||||
|
|
|
|||
|
|
@ -888,7 +888,7 @@ sub format_insn($$$$) {
|
|||
$flagsindex = insns_flag_index(\%flags);
|
||||
die "$fname:$line: $opcode: error in flags $flags\n" unless (defined($flagsindex));
|
||||
|
||||
return ("{I_$opcode, $nops, {$operands}, $decorators, \@\@CODES-$codes\@\@, $flagsindex},", $nd);
|
||||
return ("{I_$opcode, $nops, {$operands}, $decorators, \@\@CODES-$codes\@\@, $flagsindex, $line},", $nd);
|
||||
}
|
||||
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue