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 4562a097fa..78e8f7a212 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -4879,6 +4879,24 @@ INSNOP_FINALIZE(vex_v) { } +/* + * Immediate operand + */ +typedef uint8_t insnop_arg_t(Ib); +typedef struct {} insnop_ctxt_t(Ib); + +INSNOP_INIT(Ib) +{ + return 0; +} +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