[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/49] target/ppc: remove getVSR()/putVSR() from mem_
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 13/49] target/ppc: remove getVSR()/putVSR() from mem_helper.c |
Date: |
Tue, 2 Jul 2019 16:08:21 +1000 |
From: Mark Cave-Ayland <address@hidden>
Since commit 8a14d31b00 "target/ppc: switch fpr/vsrl registers so all VSX
registers are in host endian order" functions getVSR() and putVSR() which used
to convert the VSR registers into host endian order are no longer required.
Signed-off-by: Mark Cave-Ayland <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target/ppc/mem_helper.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/target/ppc/mem_helper.c b/target/ppc/mem_helper.c
index 5b0f9ee50d..87632ccf53 100644
--- a/target/ppc/mem_helper.c
+++ b/target/ppc/mem_helper.c
@@ -417,26 +417,27 @@ STVE(stvewx, cpu_stl_data_ra, bswap32, u32)
void helper_##name(CPUPPCState *env, target_ulong addr, \
target_ulong xt_num, target_ulong rb) \
{ \
- int i; \
- ppc_vsr_t xt; \
+ ppc_vsr_t *xt = &env->vsr[xt_num]; \
+ ppc_vsr_t t; \
uint64_t nb = GET_NB(rb); \
+ int i; \
\
- xt.s128 = int128_zero(); \
+ t.s128 = int128_zero(); \
if (nb) { \
nb = (nb >= 16) ? 16 : nb; \
if (msr_le && !lj) { \
for (i = 16; i > 16 - nb; i--) { \
- xt.VsrB(i - 1) = cpu_ldub_data_ra(env, addr, GETPC()); \
+ t.VsrB(i - 1) = cpu_ldub_data_ra(env, addr, GETPC()); \
addr = addr_add(env, addr, 1); \
} \
} else { \
for (i = 0; i < nb; i++) { \
- xt.VsrB(i) = cpu_ldub_data_ra(env, addr, GETPC()); \
+ t.VsrB(i) = cpu_ldub_data_ra(env, addr, GETPC()); \
addr = addr_add(env, addr, 1); \
} \
} \
} \
- putVSR(xt_num, &xt, env); \
+ *xt = t; \
}
VSX_LXVL(lxvl, 0)
@@ -447,23 +448,23 @@ VSX_LXVL(lxvll, 1)
void helper_##name(CPUPPCState *env, target_ulong addr, \
target_ulong xt_num, target_ulong rb) \
{ \
- int i; \
- ppc_vsr_t xt; \
+ ppc_vsr_t *xt = &env->vsr[xt_num]; \
target_ulong nb = GET_NB(rb); \
+ int i; \
\
if (!nb) { \
return; \
} \
- getVSR(xt_num, &xt, env); \
+ \
nb = (nb >= 16) ? 16 : nb; \
if (msr_le && !lj) { \
for (i = 16; i > 16 - nb; i--) { \
- cpu_stb_data_ra(env, addr, xt.VsrB(i - 1), GETPC()); \
+ cpu_stb_data_ra(env, addr, xt->VsrB(i - 1), GETPC()); \
addr = addr_add(env, addr, 1); \
} \
} else { \
for (i = 0; i < nb; i++) { \
- cpu_stb_data_ra(env, addr, xt.VsrB(i), GETPC()); \
+ cpu_stb_data_ra(env, addr, xt->VsrB(i), GETPC()); \
addr = addr_add(env, addr, 1); \
} \
} \
--
2.21.0
- [Qemu-devel] [PULL 02/49] docs: updates on the POWER9 XIVE interrupt controller documentation, (continued)
- [Qemu-devel] [PULL 02/49] docs: updates on the POWER9 XIVE interrupt controller documentation, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 07/49] xics/spapr: Prevent RTAS/hypercalls emulation to be used by in-kernel XICS, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 09/49] xics/spapr: Detect old KVM XICS on POWER9 hosts, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 05/49] ppc/pnv: remove xscom_base field from PnvChip, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 04/49] ppc/pnv: fix XSCOM MMIO base address for P9 machines with multiple chips, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 10/49] target/ppc: fix compile error in kvmppc_define_rtas_kernel_token(), David Gibson, 2019/07/02
- [Qemu-devel] [PULL 14/49] spapr_pci: Fix DRC owner in spapr_dt_pci_bus(), David Gibson, 2019/07/02
- [Qemu-devel] [PULL 18/49] hw/ppc/mac_newworld: Drop useless CONFIG_KVM ifdefery, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 16/49] spapr_pci: Drop useless CONFIG_KVM ifdefery, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 06/49] spapr_pci: Fix potential NULL pointer dereference in spapr_dt_pci_bus(), David Gibson, 2019/07/02
- [Qemu-devel] [PULL 13/49] target/ppc: remove getVSR()/putVSR() from mem_helper.c,
David Gibson <=
- [Qemu-devel] [PULL 08/49] xics/spapr: Register RTAS/hypercalls once at machine init, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 17/49] hw/ppc/mac_oldworld: Drop useless CONFIG_KVM ifdefery, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 15/49] xics/spapr: Only emulated XICS should use RTAS/hypercalls emulation, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 29/49] target/ppc: remove getVSR()/putVSR() from int_helper.c, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 25/49] xics/kvm: Add error propagation to ic*_set_kvm_state() functions, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 22/49] xics/spapr: Rename xics_kvm_init(), David Gibson, 2019/07/02
- [Qemu-devel] [PULL 11/49] xics: Add comment about CPU hotplug, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 12/49] target/ppc: remove getVSR()/putVSR() from fpu_helper.c, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 20/49] hw/ppc: Drop useless CONFIG_KVM ifdefery, David Gibson, 2019/07/02
- [Qemu-devel] [PULL 38/49] target/ppc: introduce GEN_VSX_HELPER_R2_AB macro to fpu_helper.c, David Gibson, 2019/07/02