diff options
author | Alistair Francis | 2021-12-20 07:49:14 +0100 |
---|---|---|
committer | Alistair Francis | 2022-01-08 06:46:10 +0100 |
commit | ea7b5d5af6c3f994b10caa80c7f41964678eb2bb (patch) | |
tree | 2cf84eed72682b101e83c2fd74061c27d709970f /target | |
parent | target/riscv: actual functions to realize crs 128-bit insns (diff) | |
download | qemu-ea7b5d5af6c3f994b10caa80c7f41964678eb2bb.tar.gz qemu-ea7b5d5af6c3f994b10caa80c7f41964678eb2bb.tar.xz qemu-ea7b5d5af6c3f994b10caa80c7f41964678eb2bb.zip |
target/riscv: Set the opcode in DisasContext
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Message-id: 20211220064916.107241-2-alistair.francis@opensource.wdc.com
Diffstat (limited to 'target')
-rw-r--r-- | target/riscv/translate.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 4ae4345691..9e4f9c3342 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -846,6 +846,7 @@ static void decode_opc(CPURISCVState *env, DisasContext *ctx, uint16_t opcode) if (!has_ext(ctx, RVC)) { gen_exception_illegal(ctx); } else { + ctx->opcode = opcode; ctx->pc_succ_insn = ctx->base.pc_next + 2; if (!decode_insn16(ctx, opcode)) { gen_exception_illegal(ctx); @@ -856,6 +857,7 @@ static void decode_opc(CPURISCVState *env, DisasContext *ctx, uint16_t opcode) opcode32 = deposit32(opcode32, 16, 16, translator_lduw(env, &ctx->base, ctx->base.pc_next + 2)); + ctx->opcode = opcode32; ctx->pc_succ_insn = ctx->base.pc_next + 4; if (!decode_insn32(ctx, opcode32)) { gen_exception_illegal(ctx); |