mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 00:45:40 +00:00
target/riscv: Fix implementation of HLVX.WU instruction
The HLVX.WU instruction is supposed to read a machine word, but prior to this change it read a byte instead. Fixes: 8c5362acb57 ("target/riscv: Allow generating hlv/hlvx/hsv instructions") Backports 1da46012eaaeb2feb3aa6a5a8fc0a03200b673aa
This commit is contained in:
parent
7351f09919
commit
d2cea344f0
|
@ -335,12 +335,12 @@ target_ulong helper_hyp_x_load(CPURISCVState *env, target_ulong address,
|
||||||
riscv_cpu_set_two_stage_lookup(env, true);
|
riscv_cpu_set_two_stage_lookup(env, true);
|
||||||
|
|
||||||
switch (memop) {
|
switch (memop) {
|
||||||
case MO_TEUL:
|
|
||||||
pte = cpu_ldl_mmuidx_ra(env, address, cpu_mmu_index(env, true), GETPC());
|
|
||||||
break;
|
|
||||||
case MO_TEUW:
|
case MO_TEUW:
|
||||||
pte = cpu_lduw_mmuidx_ra(env, address, cpu_mmu_index(env, true), GETPC());
|
pte = cpu_lduw_mmuidx_ra(env, address, cpu_mmu_index(env, true), GETPC());
|
||||||
break;
|
break;
|
||||||
|
case MO_TEUL:
|
||||||
|
pte = cpu_ldl_mmuidx_ra(env, address, cpu_mmu_index(env, true), GETPC());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached();
|
g_assert_not_reached();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue