projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
457c360
)
target/riscv: Set the opcode in DisasContext
author
Alistair Francis
<alistair.francis@wdc.com>
Mon, 20 Dec 2021 06:49:14 +0000
(16:49 +1000)
committer
Alistair Francis
<alistair.francis@wdc.com>
Sat, 8 Jan 2022 05:46:10 +0000
(15:46 +1000)
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
target/riscv/translate.c
patch
|
blob
|
history
diff --git
a/target/riscv/translate.c
b/target/riscv/translate.c
index 4ae434569152a36003e911159f60e59aeb41219e..9e4f9c334207847961b0a7002f584ea7b2792b2b 100644
(file)
--- 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);