mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
a14db52f7f
commit
40f0c2046c
4 changed files with 27 additions and 9 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue