diff --git a/target/i386/emulate/x86_decode.c b/target/i386/emulate/x86_decode.c index 97bd6f1a3b..d037ed1142 100644 --- a/target/i386/emulate/x86_decode.c +++ b/target/i386/emulate/x86_decode.c @@ -77,7 +77,11 @@ static inline uint64_t decode_bytes(CPUX86State *env, struct x86_decode *decode, memcpy(&val, decode->stream->bytes + decode->len, size); } else { target_ulong va = linear_rip(env_cpu(env), env->eip) + decode->len; - emul_ops->fetch_instruction(env_cpu(env), &val, va, size); + if (emul_ops->fetch_instruction) { + emul_ops->fetch_instruction(env_cpu(env), &val, va, size); + } else { + emul_ops->read_mem(env_cpu(env), &val, va, size); + } } decode->len += size;