Introduce the immediate-byte operand, which loads a byte from the instruction stream and passes its value as the operand.
Signed-off-by: Jan Bobek <jan.bo...@gmail.com> --- target/i386/translate.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index 886f64a58f..9f02ea58d1 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -4890,6 +4890,24 @@ INSNOP_FINALIZE(modrm_rm_direct) insnop_finalize(modrm_rm)(&ctxt->rm, env, s, modrm, is_write, arg); } +/* + * Immediate operand + */ +typedef uint8_t insnop_arg_t(Ib); +typedef struct {} insnop_ctxt_t(Ib); + +INSNOP_INIT(Ib) +{ + return true; +} +INSNOP_PREPARE(Ib) +{ + return x86_ldub_code(env, s); +} +INSNOP_FINALIZE(Ib) +{ +} + static void gen_sse_ng(CPUX86State *env, DisasContext *s, int b) { enum { -- 2.20.1