diff options
author | Georg Kotheimer <georg.kotheimer@kernkonzept.com> | 2020-10-13 19:22:23 +0200 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2020-10-22 12:00:22 -0700 |
commit | 1da46012eaaeb2feb3aa6a5a8fc0a03200b673aa (patch) | |
tree | 10470a252045e34f111eacae67b8d12095138024 /target | |
parent | 4aeb9e26c219a85f465eb2cc7ef6939a3c71944f (diff) | |
download | qemu-1da46012eaaeb2feb3aa6a5a8fc0a03200b673aa.zip qemu-1da46012eaaeb2feb3aa6a5a8fc0a03200b673aa.tar.gz qemu-1da46012eaaeb2feb3aa6a5a8fc0a03200b673aa.tar.bz2 |
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")
Signed-off-by: Georg Kotheimer <georg.kotheimer@kernkonzept.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20201013172223.443645-1-georg.kotheimer@kernkonzept.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/riscv/op_helper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target/riscv/op_helper.c b/target/riscv/op_helper.c index e987bd2..4ce7357 100644 --- a/target/riscv/op_helper.c +++ b/target/riscv/op_helper.c @@ -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(); } |