@@ -2434,7 +2434,7 @@ x86_decode_insn(struct x86_emulate_ctxt *ctxt)
break;
#endif
default:
- return -1;
+ return X86EMUL_UNHANDLEABLE;
}
c->op_bytes = def_op_bytes;
@@ -2531,7 +2531,7 @@ done_prefixes:
/* Unrecognised? */
if (c->d == 0 || (c->d & Undefined)) {
DPRINTF("Cannot emulate %02x\n", c->b);
- return -1;
+ return X86EMUL_UNHANDLEABLE;
}
if (mode == X86EMUL_MODE_PROT64 && (c->d & Stack))
@@ -2720,11 +2720,11 @@ done_prefixes:
/* Special instructions do their own operand decoding. */
default:
c->dst.type = OP_NONE; /* Disable writeback. */
- return 0;
+ return X86EMUL_CONTINUE;
}
done:
- return (rc == X86EMUL_UNHANDLEABLE) ? -1 : 0;
+ return rc;
}
int
@@ -3256,7 +3256,7 @@ writeback:
ctxt->eip = c->eip;
done:
- return (rc == X86EMUL_UNHANDLEABLE) ? -1 : 0;
+ return rc;
twobyte_insn:
switch (c->b) {
@@ -3558,5 +3558,5 @@ twobyte_insn:
cannot_emulate:
DPRINTF("Cannot emulate %02x\n", c->b);
- return -1;
+ return X86EMUL_UNHANDLEABLE;
}