Skip to content
Snippets Groups Projects
Commit 1da46012 authored by Georg Kotheimer's avatar Georg Kotheimer Committed by Alistair Francis
Browse files

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: 8c5362ac ("target/riscv: Allow generating hlv/hlvx/hsv instructions")
Signed-off-by: default avatarGeorg Kotheimer <georg.kotheimer@kernkonzept.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
Message-id: 20201013172223.443645-1-georg.kotheimer@kernkonzept.com
Signed-off-by: default avatarAlistair Francis <alistair.francis@wdc.com>
parent 4aeb9e26
No related branches found
No related tags found
No related merge requests found
......@@ -333,12 +333,12 @@ target_ulong helper_hyp_x_load(CPURISCVState *env, target_ulong address,
riscv_cpu_set_two_stage_lookup(env, true);
switch (memop) {
case MO_TEUL:
pte = cpu_ldub_data_ra(env, address, GETPC());
break;
case MO_TEUW:
pte = cpu_lduw_data_ra(env, address, GETPC());
break;
case MO_TEUL:
pte = cpu_ldl_data_ra(env, address, GETPC());
break;
default:
g_assert_not_reached();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment