]> Git Repo - qemu.git/commitdiff
target/riscv: Fix implementation of HLVX.WU instruction
authorGeorg Kotheimer <[email protected]>
Tue, 13 Oct 2020 17:22:23 +0000 (19:22 +0200)
committerAlistair Francis <[email protected]>
Thu, 22 Oct 2020 19:00:22 +0000 (12:00 -0700)
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 <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20201013172223[email protected]
Signed-off-by: Alistair Francis <[email protected]>
target/riscv/op_helper.c

index e987bd262fede6a4823ded802ac1afff9f735fbe..4ce73575a73b87b8e488ae0b8abca1b200c9f6b5 100644 (file)
@@ -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();
         }
This page took 0.026382 seconds and 4 git commands to generate.