[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/16] target/s390x: Use explicit big-endian LD/ST API
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 10/16] target/s390x: Use explicit big-endian LD/ST API |
Date: |
Fri, 4 Oct 2024 01:42:05 +0200 |
The S390 architecture uses big endianness. Directly use
the big-endian LD/ST API.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/s390x/gdbstub.c | 4 ++--
target/s390x/ioinst.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/s390x/gdbstub.c b/target/s390x/gdbstub.c
index a9f4eb92adf..f346208f79d 100644
--- a/target/s390x/gdbstub.c
+++ b/target/s390x/gdbstub.c
@@ -88,7 +88,7 @@ static int cpu_write_ac_reg(CPUState *cs, uint8_t *mem_buf,
int n)
switch (n) {
case S390_A0_REGNUM ... S390_A15_REGNUM:
- env->aregs[n] = ldl_p(mem_buf);
+ env->aregs[n] = ldl_be_p(mem_buf);
cpu_synchronize_post_init(env_cpu(env));
return 4;
default:
@@ -123,7 +123,7 @@ static int cpu_write_fp_reg(CPUState *cs, uint8_t *mem_buf,
int n)
switch (n) {
case S390_FPC_REGNUM:
- env->fpc = ldl_p(mem_buf);
+ env->fpc = ldl_be_p(mem_buf);
return 4;
case S390_F0_REGNUM ... S390_F15_REGNUM:
*get_freg(env, n - S390_F0_REGNUM) = ldtul_p(mem_buf);
diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c
index bbe45a497a8..a944f16c254 100644
--- a/target/s390x/ioinst.c
+++ b/target/s390x/ioinst.c
@@ -603,7 +603,7 @@ static int chsc_sei_nt2_have_event(void)
#define CHSC_SEI_NT2 (1ULL << 61)
static void ioinst_handle_chsc_sei(ChscReq *req, ChscResp *res)
{
- uint64_t selection_mask = ldq_p(&req->param1);
+ uint64_t selection_mask = ldq_be_p(&req->param1);
uint8_t *res_flags = (uint8_t *)res->data;
int have_event = 0;
int have_more = 0;
--
2.45.2
- [PATCH 04/16] hw/i386: Use explicit little-endian LD/ST API, (continued)
- [PATCH 04/16] hw/i386: Use explicit little-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/03
- [PATCH 05/16] target/i386: Use explicit little-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/03
- [PATCH 06/16] hw/m68k: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/03
- [PATCH 07/16] target/m68k: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/03
- [PATCH 08/16] hw/ppc/e500: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/03
- [PATCH 09/16] hw/s390x: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/03
- [PATCH 10/16] target/s390x: Use explicit big-endian LD/ST API,
Philippe Mathieu-Daudé <=
- [PATCH 11/16] hw/sparc: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/03
- [PATCH 12/16] target/sparc: Use explicit big-endian LD/ST API, Philippe Mathieu-Daudé, 2024/10/03