mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
target/loongarch: Truncate high 32 bits of address in VA32 mode
When running in VA32 mode(!LA64 or VA32L[1-3] matching PLV), virtual address is truncated to 32 bits before address mapping. Signed-off-by: Jiajie Chen <c@jia.je> Co-authored-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20230822032724.1353391-6-gaosong@loongson.cn> Message-Id: <20230822071405.35386-10-philmd@linaro.org>
This commit is contained in:
parent
2f6478ffad
commit
7033c0e6dd
2 changed files with 20 additions and 2 deletions
|
@ -445,7 +445,11 @@ static inline bool is_va32(CPULoongArchState *env)
|
|||
|
||||
static inline void set_pc(CPULoongArchState *env, uint64_t value)
|
||||
{
|
||||
env->pc = value;
|
||||
if (is_va32(env)) {
|
||||
env->pc = (uint32_t)value;
|
||||
} else {
|
||||
env->pc = value;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue