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:
H. Peter Anvin 2007-09-10 23:32:05 +00:00
parent 6fa5c358b5
commit ea6bfb8107
2 changed files with 6 additions and 6 deletions

10
insns.h
View File

@ -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 */
};
/*

View File

@ -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) {