aboutsummaryrefslogtreecommitdiff
path: root/target/riscv/insn_trans/trans_rvv.c.inc
diff options
context:
space:
mode:
authorLIU Zhiwei <zhiwei_liu@c-sky.com>2022-01-20 20:20:31 +0800
committerAlistair Francis <alistair.francis@wdc.com>2022-01-21 15:52:57 +1000
commit40f0c2046c490ef4b8bed4ca628620ab8a2bdf87 (patch)
tree325176fe757fb2e0b597ce75c0b02456b030ca65 /target/riscv/insn_trans/trans_rvv.c.inc
parenta14db52f7fa9f6843d1806e8d4cd56f3410bb59d (diff)
target/riscv: Sign extend pc for different XLEN
When pc is written, it is sign-extended to fill the widest supported XLEN. Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20220120122050.41546-5-zhiwei_liu@c-sky.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/insn_trans/trans_rvv.c.inc')
-rw-r--r--target/riscv/insn_trans/trans_rvv.c.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_trans/trans_rvv.c.inc
index 7a040b3089..e03959c46f 100644
--- a/target/riscv/insn_trans/trans_rvv.c.inc
+++ b/target/riscv/insn_trans/trans_rvv.c.inc
@@ -194,7 +194,7 @@ static bool do_vsetvl(DisasContext *s, int rd, int rs1, TCGv s2)
gen_set_gpr(s, rd, dst);
mark_vs_dirty(s);
- tcg_gen_movi_tl(cpu_pc, s->pc_succ_insn);
+ gen_set_pc_imm(s, s->pc_succ_insn);
tcg_gen_lookup_and_goto_ptr();
s->base.is_jmp = DISAS_NORETURN;
@@ -219,7 +219,7 @@ static bool do_vsetivli(DisasContext *s, int rd, TCGv s1, TCGv s2)
gen_helper_vsetvl(dst, cpu_env, s1, s2);
gen_set_gpr(s, rd, dst);
mark_vs_dirty(s);
- tcg_gen_movi_tl(cpu_pc, s->pc_succ_insn);
+ gen_set_pc_imm(s, s->pc_succ_insn);
tcg_gen_lookup_and_goto_ptr();
s->base.is_jmp = DISAS_NORETURN;