[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.3 49/87] target/hppa: fix do_stdby_e()
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.3 49/87] target/hppa: fix do_stdby_e() |
Date: |
Wed, 10 Apr 2024 10:22:22 +0300 |
From: Sven Schnelle <svens@stackframe.org>
stdby,e,m was writing data from the wrong half of the register
into memory for cases 0-3.
Fixes: 25460fc5a71 ("target/hppa: Implement STDBY")
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240319161921.487080-7-svens@stackframe.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit 518d2f4300e5c50a3e6416fd46e58373781a5267)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c
index ce15469465..3d0bed9e44 100644
--- a/target/hppa/op_helper.c
+++ b/target/hppa/op_helper.c
@@ -281,17 +281,17 @@ static void do_stdby_e(CPUHPPAState *env, target_ulong
addr, uint64_t val,
case 3:
/* The 3 byte store must appear atomic. */
if (parallel) {
- atomic_store_mask32(env, addr - 3, val, 0xffffff00u, ra);
+ atomic_store_mask32(env, addr - 3, val >> 32, 0xffffff00u, ra);
} else {
- cpu_stw_data_ra(env, addr - 3, val >> 16, ra);
- cpu_stb_data_ra(env, addr - 1, val >> 8, ra);
+ cpu_stw_data_ra(env, addr - 3, val >> 48, ra);
+ cpu_stb_data_ra(env, addr - 1, val >> 40, ra);
}
break;
case 2:
- cpu_stw_data_ra(env, addr - 2, val >> 16, ra);
+ cpu_stw_data_ra(env, addr - 2, val >> 48, ra);
break;
case 1:
- cpu_stb_data_ra(env, addr - 1, val >> 24, ra);
+ cpu_stb_data_ra(env, addr - 1, val >> 56, ra);
break;
default:
/* Nothing is stored, but protection is checked and the
--
2.39.2
- [Stable-8.2.3 42/87] target/hppa: Fix assemble_11a insns for wide mode, (continued)
- [Stable-8.2.3 42/87] target/hppa: Fix assemble_11a insns for wide mode, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 41/87] target/hppa: Fix assemble_16 insns for wide mode, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 40/87] target/i386: Revert monitor_puts() in do_inject_x86_mce(), Michael Tokarev, 2024/04/10
- [Stable-8.2.3 44/87] target/hppa: ldcw,s uses static shift of 3, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 46/87] target/hppa: fix access_id check, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 45/87] target/hppa: fix shrp for wide mode, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 47/87] target/hppa: exit tb on flush cache instructions, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 43/87] target/hppa: Fix assemble_12a insns for wide mode, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 48/87] target/hppa: mask privilege bits in mfia, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 50/87] target/loongarch: Fix qemu-loongarch64 hang when executing 'll.d $t0, $t0, 0', Michael Tokarev, 2024/04/10
- [Stable-8.2.3 49/87] target/hppa: fix do_stdby_e(),
Michael Tokarev <=
- [Stable-8.2.3 51/87] docs/conf.py: Remove usage of distutils, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 52/87] target/loongarch: Fix qemu-system-loongarch64 assert failed with the option '-d int', Michael Tokarev, 2024/04/10
- [Stable-8.2.3 54/87] vdpa-dev: Fix initialisation order to restore VDUSE compatibility, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 53/87] target/s390x: Use mutable temporary value for op_ts, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 56/87] block-backend: fix edge case in bdrv_next() where BDS associated to BB changes, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 55/87] block/io: accept NULL qiov in bdrv_pad_request, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 57/87] block-backend: fix edge case in bdrv_next_cleanup() where BDS associated to BB changes, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 59/87] target/i386/tcg: Enable page walking from MMIO memory, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 61/87] monitor/hmp-cmds-target: Append a space in error message in gpa2hva(), Michael Tokarev, 2024/04/10
- [Stable-8.2.3 58/87] iotests: add test for stream job with an unaligned prefetch read, Michael Tokarev, 2024/04/10