aboutsummaryrefslogtreecommitdiff
path: root/target/riscv/insn_trans/trans_rvzacas.c.inc
diff options
context:
space:
mode:
authorDeepak Gupta <debug@rivosinc.com>2024-10-08 15:50:05 -0700
committerAlistair Francis <alistair.francis@wdc.com>2024-10-30 11:22:08 +1000
commitf21b36a022bb23a696058133bc938e4d91b4d4b8 (patch)
tree60d326135247a04d838cf0f282edf8a03cfa5d08 /target/riscv/insn_trans/trans_rvzacas.c.inc
parent98f21c30f5beffc45232721ae79c019df58ae9f1 (diff)
downloadqemu-f21b36a022bb23a696058133bc938e4d91b4d4b8.zip
qemu-f21b36a022bb23a696058133bc938e4d91b4d4b8.tar.gz
qemu-f21b36a022bb23a696058133bc938e4d91b4d4b8.tar.bz2
target/riscv: update `decode_save_opc` to store extra word2
Extra word 2 is stored during tcg compile and `decode_save_opc` needs additional argument in order to pass the value. This will be used during unwind to get extra information about instruction like how to massage exceptions. Updated all callsites as well. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/594 Signed-off-by: Deepak Gupta <debug@rivosinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20241008225010.1861630-16-debug@rivosinc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/insn_trans/trans_rvzacas.c.inc')
-rw-r--r--target/riscv/insn_trans/trans_rvzacas.c.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/riscv/insn_trans/trans_rvzacas.c.inc b/target/riscv/insn_trans/trans_rvzacas.c.inc
index fcced99..15e688a 100644
--- a/target/riscv/insn_trans/trans_rvzacas.c.inc
+++ b/target/riscv/insn_trans/trans_rvzacas.c.inc
@@ -76,7 +76,7 @@ static bool gen_cmpxchg64(DisasContext *ctx, arg_atomic *a, MemOp mop)
TCGv src1 = get_address(ctx, a->rs1, 0);
TCGv_i64 src2 = get_gpr_pair(ctx, a->rs2);
- decode_save_opc(ctx);
+ decode_save_opc(ctx, RISCV_UW2_ALWAYS_STORE_AMO);
tcg_gen_atomic_cmpxchg_i64(dest, src1, dest, src2, ctx->mem_idx, mop);
gen_set_gpr_pair(ctx, a->rd, dest);
@@ -121,7 +121,7 @@ static bool trans_amocas_q(DisasContext *ctx, arg_amocas_q *a)
tcg_gen_concat_i64_i128(src2, src2l, src2h);
tcg_gen_concat_i64_i128(dest, destl, desth);
- decode_save_opc(ctx);
+ decode_save_opc(ctx, RISCV_UW2_ALWAYS_STORE_AMO);
tcg_gen_atomic_cmpxchg_i128(dest, src1, dest, src2, ctx->mem_idx,
(MO_ALIGN | MO_TEUO));