summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-09-10 23:32:05 +0000
committerH. Peter Anvin <hpa@zytor.com>2007-09-10 23:32:05 +0000
commitea6bfb8107f69b6807f77cca021c7925feead1e3 (patch)
tree2ad080c4c56d95c94ffea5305f33f4da4fc9d4c2
parent6fa5c358b5b5591874a4c2804956b06719ad8360 (diff)
downloadnasm-ea6bfb8107f69b6807f77cca021c7925feead1e3.tar.gz
nasm-ea6bfb8107f69b6807f77cca021c7925feead1e3.tar.bz2
nasm-ea6bfb8107f69b6807f77cca021c7925feead1e3.zip
Use an actual enum for the opcode
Use an actual named enum for the opcode, that way it shows up in cleartext while debugging.
-rw-r--r--insns.h10
-rw-r--r--insns.pl2
2 files changed, 6 insertions, 6 deletions
diff --git a/insns.h b/insns.h
index 21e2527..c81b9ed 100644
--- a/insns.h
+++ b/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 */
};
/*
diff --git a/insns.pl b/insns.pl
index 5adcc75..e6c2ea0 100644
--- a/insns.pl
+++ b/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) {