リビジョン | 8c796f1a15d0fca41c4f3e985bfbd33a5afb9ddc (tree) |
---|---|
日時 | 2022-01-21 14:52:57 |
作者 | LIU Zhiwei <zhiwei_liu@c-sk...> |
コミッター | Alistair Francis |
target/riscv: Ignore the pc bits above XLEN
The read from PC for translation is in cpu_get_tb_cpu_state, before translation.
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-7-zhiwei_liu@c-sky.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
@@ -43,7 +43,7 @@ void cpu_get_tb_cpu_state(CPURISCVState *env, target_ulong *pc, | ||
43 | 43 | |
44 | 44 | uint32_t flags = 0; |
45 | 45 | |
46 | - *pc = env->pc; | |
46 | + *pc = env->xl == MXL_RV32 ? env->pc & UINT32_MAX : env->pc; | |
47 | 47 | *cs_base = 0; |
48 | 48 | |
49 | 49 | if (riscv_has_ext(env, RVV) || cpu->cfg.ext_zve32f || cpu->cfg.ext_zve64f) { |