mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-24 19:00:23 +08:00
Use an actual enum for the opcode
Use an actual named enum for the opcode, that way it shows up in cleartext while debugging.
This commit is contained in:
parent
6fa5c358b5
commit
ea6bfb8107
10
insns.h
10
insns.h
@ -20,11 +20,11 @@
|
||||
#endif
|
||||
|
||||
struct itemplate {
|
||||
int opcode; /* the token, passed from "parser.c" */
|
||||
int operands; /* number of operands */
|
||||
int32_t opd[3]; /* bit flags for operand types */
|
||||
const char *code; /* the code it assembles to */
|
||||
uint32_t flags; /* some flags */
|
||||
enum opcode opcode; /* the token, passed from "parser.c" */
|
||||
int operands; /* number of operands */
|
||||
int32_t opd[3]; /* bit flags for operand types */
|
||||
const char *code; /* the code it assembles to */
|
||||
uint32_t flags; /* some flags */
|
||||
};
|
||||
|
||||
/*
|
||||
|
2
insns.pl
2
insns.pl
@ -136,7 +136,7 @@ if ( !defined($output) || $output eq 'i' ) {
|
||||
print I "/* This file in included by nasm.h */\n\n";
|
||||
|
||||
print I "/* Instruction names */\n";
|
||||
print I "enum {";
|
||||
print I "enum opcode {";
|
||||
$first = 1;
|
||||
$maxlen = 0;
|
||||
foreach $i (@opcodes, @opcodes_cc) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user