insn->prefixes might contain not only values from
'enum prefixes' but from 'enum reg_enum' as well so
make it generic 'int' instead.
This calms down the compiler about enum's mess and
eliminates a wrong assumption that we always have
values by particular type in this field.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
static enum ea_type process_ea(operand *, ea *, int, int, int, opflags_t);
-static int has_prefix(insn * ins, enum prefix_pos pos, enum prefixes prefix)
+static int has_prefix(insn * ins, enum prefix_pos pos, int prefix)
{
return ins->prefixes[pos] == prefix;
}
typedef struct insn { /* an instruction itself */
char *label; /* the label defined, or NULL */
- enum prefixes prefixes[MAXPREFIX]; /* instruction prefixes, if any */
+ int prefixes[MAXPREFIX]; /* instruction prefixes, if any */
enum opcode opcode; /* the opcode - not just the string */
enum ccode condition; /* the condition code, if Jcc/SETcc */
int operands; /* how many operands? 0-3 (more if db et al) */
location = locp;
}
-static int prefix_slot(enum prefixes prefix)
+static int prefix_slot(int prefix)
{
switch (prefix) {
case P_WAIT: