From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>
Subject: [PULL 09/12] target/s390x: Replace ldtul_p() -> ldq_p()
Date: Mon, 7 Oct 2024 13:50:24 +0200 [thread overview]
Message-ID: <20241007115027.243425-10-thuth@redhat.com> (raw)
In-Reply-To: <20241007115027.243425-1-thuth@redhat.com>
From: Philippe Mathieu-Daudé <philmd@linaro.org>
The S390X target is only built for 64-bit.
Using ldtul_p() is pointless, replace by ldq_p().
Mechanical change doing:
$ sed -i -e 's/ldtul_p/ldq_p/' $(git grep -wl ldtul_p target/s390x/)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20241004163042.85922-5-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
target/s390x/gdbstub.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/target/s390x/gdbstub.c b/target/s390x/gdbstub.c
index a9f4eb92ad..9ffec0bccb 100644
--- a/target/s390x/gdbstub.c
+++ b/target/s390x/gdbstub.c
@@ -46,7 +46,7 @@ int s390_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
int s390_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
{
CPUS390XState *env = cpu_env(cs);
- target_ulong tmpl = ldtul_p(mem_buf);
+ target_ulong tmpl = ldq_p(mem_buf);
switch (n) {
case S390_PSWM_REGNUM:
@@ -126,7 +126,7 @@ static int cpu_write_fp_reg(CPUState *cs, uint8_t *mem_buf, int n)
env->fpc = ldl_p(mem_buf);
return 4;
case S390_F0_REGNUM ... S390_F15_REGNUM:
- *get_freg(env, n - S390_F0_REGNUM) = ldtul_p(mem_buf);
+ *get_freg(env, n - S390_F0_REGNUM) = ldq_p(mem_buf);
return 8;
default:
return 0;
@@ -167,11 +167,11 @@ static int cpu_write_vreg(CPUState *cs, uint8_t *mem_buf, int n)
switch (n) {
case S390_V0L_REGNUM ... S390_V15L_REGNUM:
- env->vregs[n][1] = ldtul_p(mem_buf + 8);
+ env->vregs[n][1] = ldq_p(mem_buf + 8);
return 8;
case S390_V16_REGNUM ... S390_V31_REGNUM:
- env->vregs[n][0] = ldtul_p(mem_buf);
- env->vregs[n][1] = ldtul_p(mem_buf + 8);
+ env->vregs[n][0] = ldq_p(mem_buf);
+ env->vregs[n][1] = ldq_p(mem_buf + 8);
return 16;
default:
return 0;
@@ -203,7 +203,7 @@ static int cpu_write_c_reg(CPUState *cs, uint8_t *mem_buf, int n)
switch (n) {
case S390_C0_REGNUM ... S390_C15_REGNUM:
- env->cregs[n] = ldtul_p(mem_buf);
+ env->cregs[n] = ldq_p(mem_buf);
if (tcg_enabled()) {
tlb_flush(env_cpu(env));
}
@@ -246,19 +246,19 @@ static int cpu_write_virt_reg(CPUState *cs, uint8_t *mem_buf, int n)
switch (n) {
case S390_VIRT_CKC_REGNUM:
- env->ckc = ldtul_p(mem_buf);
+ env->ckc = ldq_p(mem_buf);
cpu_synchronize_post_init(cs);
return 8;
case S390_VIRT_CPUTM_REGNUM:
- env->cputm = ldtul_p(mem_buf);
+ env->cputm = ldq_p(mem_buf);
cpu_synchronize_post_init(cs);
return 8;
case S390_VIRT_BEA_REGNUM:
- env->gbea = ldtul_p(mem_buf);
+ env->gbea = ldq_p(mem_buf);
cpu_synchronize_post_init(cs);
return 8;
case S390_VIRT_PREFIX_REGNUM:
- env->psa = ldtul_p(mem_buf);
+ env->psa = ldq_p(mem_buf);
cpu_synchronize_post_init(cs);
return 8;
default:
@@ -298,19 +298,19 @@ static int cpu_write_virt_kvm_reg(CPUState *cs, uint8_t *mem_buf, int n)
switch (n) {
case S390_VIRT_KVM_PP_REGNUM:
- env->pp = ldtul_p(mem_buf);
+ env->pp = ldq_p(mem_buf);
cpu_synchronize_post_init(env_cpu(env));
return 8;
case S390_VIRT_KVM_PFT_REGNUM:
- env->pfault_token = ldtul_p(mem_buf);
+ env->pfault_token = ldq_p(mem_buf);
cpu_synchronize_post_init(env_cpu(env));
return 8;
case S390_VIRT_KVM_PFS_REGNUM:
- env->pfault_select = ldtul_p(mem_buf);
+ env->pfault_select = ldq_p(mem_buf);
cpu_synchronize_post_init(env_cpu(env));
return 8;
case S390_VIRT_KVM_PFC_REGNUM:
- env->pfault_compare = ldtul_p(mem_buf);
+ env->pfault_compare = ldq_p(mem_buf);
cpu_synchronize_post_init(env_cpu(env));
return 8;
default:
@@ -338,7 +338,7 @@ static int cpu_write_gs_reg(CPUState *cs, uint8_t *mem_buf, int n)
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
- env->gscb[n] = ldtul_p(mem_buf);
+ env->gscb[n] = ldq_p(mem_buf);
cpu_synchronize_post_init(env_cpu(env));
return 8;
}
--
2.46.1
next prev parent reply other threads:[~2024-10-07 11:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 11:50 [PULL 00/12] CI fixes and various clean-ups Thomas Huth
2024-10-07 11:50 ` [PULL 01/12] docs: Mark "gluster" support in QEMU as deprecated Thomas Huth
2024-10-07 11:50 ` [PULL 02/12] .gitlab-ci.d/cirrus: Drop support for macOS 13 (Ventura) Thomas Huth
2024-10-07 11:50 ` [PULL 03/12] .gitlab-ci.d/cirrus: Add manual testing of macOS 15 (Sequoia) Thomas Huth
2024-10-07 11:50 ` [PULL 04/12] disas: Remove CRIS disassembler Thomas Huth
2024-10-07 11:50 ` [PULL 05/12] gitlab-ci/build-oss-fuzz: print FAILED marker in case the test failed and run all tests Thomas Huth
2024-10-07 11:50 ` [PULL 06/12] hw/m68k: Use explicit big-endian LD/ST API Thomas Huth
2024-10-07 11:50 ` [PULL 07/12] target/m68k: " Thomas Huth
2024-10-07 11:50 ` [PULL 08/12] hw/s390x: " Thomas Huth
2024-10-07 11:50 ` Thomas Huth [this message]
2024-10-07 11:50 ` [PULL 10/12] target/s390x: " Thomas Huth
2024-10-07 11:50 ` [PULL 11/12] tests/functional: Switch back to the gitlab URLs for the advent calendar tests Thomas Huth
2024-10-07 11:50 ` [PULL 12/12] tests/functional: Bump timeout of some tests Thomas Huth
2024-10-07 13:43 ` [PULL 00/12] CI fixes and various clean-ups Peter Maydell
2024-10-07 14:13 ` Peter Maydell
2024-10-07 16:41 ` Thomas Huth
2024-10-07 16:51 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241007115027.243425-10-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).