diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2025-05-04 09:50:08 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2025-05-28 08:08:48 +0100 |
commit | 353f703cf1959228affc23b5bba8a18738736cf4 (patch) | |
tree | e6efb324416b859747c45f209f8e079c61dcd434 | |
parent | 7174cd2eec67d9b7bf969cdc87e656b4c4c93465 (diff) | |
download | qemu-353f703cf1959228affc23b5bba8a18738736cf4.zip qemu-353f703cf1959228affc23b5bba8a18738736cf4.tar.gz qemu-353f703cf1959228affc23b5bba8a18738736cf4.tar.bz2 |
target/loongarch: Fill in TCGCPUOps.pointer_wrap
Check va32 state.
Reviewed-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r-- | target/loongarch/cpu.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index f7535d1..abad84c 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -334,6 +334,12 @@ static bool loongarch_cpu_exec_interrupt(CPUState *cs, int interrupt_request) } return false; } + +static vaddr loongarch_pointer_wrap(CPUState *cs, int mmu_idx, + vaddr result, vaddr base) +{ + return is_va32(cpu_env(cs)) ? (uint32_t)result : result; +} #endif static TCGTBCPUState loongarch_get_tb_cpu_state(CPUState *cs) @@ -889,6 +895,7 @@ static const TCGCPUOps loongarch_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = loongarch_cpu_tlb_fill, + .pointer_wrap = loongarch_pointer_wrap, .cpu_exec_interrupt = loongarch_cpu_exec_interrupt, .cpu_exec_halt = loongarch_cpu_has_work, .cpu_exec_reset = cpu_reset, |