target/s390x: Replace ldtul_p() -> ldq_p()

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>
This commit is contained in:
Philippe Mathieu-Daudé 2024-10-04 13:30:20 -03:00 committed by Thomas Huth
parent c76c86fba5
commit a0bc3cefe2

View File

@ -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;
}