[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/30] ppc/translate: Rewrite gen_lxvdsx to use gvec primitives
From: |
David Gibson |
Subject: |
[PULL 14/30] ppc/translate: Rewrite gen_lxvdsx to use gvec primitives |
Date: |
Fri, 11 Dec 2020 15:14:51 +1100 |
From: LemonBoy <thatlemon@gmail.com>
Make the implementation match the lxvwsx one.
The code is now shorter smaller and potentially faster as the
translation will use the host SIMD capabilities if available.
No functional change.
Signed-off-by: Giuseppe Musacchio <thatlemon@gmail.com>
Message-Id:
<a463dea379da4cb3a22de49c678932f74fb15dd7.1604912739.git.thatlemon@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
target/ppc/translate/vsx-impl.c.inc | 46 ++++++++++++++---------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/target/ppc/translate/vsx-impl.c.inc
b/target/ppc/translate/vsx-impl.c.inc
index 075f063e98..b817d31260 100644
--- a/target/ppc/translate/vsx-impl.c.inc
+++ b/target/ppc/translate/vsx-impl.c.inc
@@ -75,29 +75,6 @@ static void gen_lxvd2x(DisasContext *ctx)
tcg_temp_free_i64(t0);
}
-static void gen_lxvdsx(DisasContext *ctx)
-{
- TCGv EA;
- TCGv_i64 t0;
- TCGv_i64 t1;
- if (unlikely(!ctx->vsx_enabled)) {
- gen_exception(ctx, POWERPC_EXCP_VSXU);
- return;
- }
- t0 = tcg_temp_new_i64();
- t1 = tcg_temp_new_i64();
- gen_set_access_type(ctx, ACCESS_INT);
- EA = tcg_temp_new();
- gen_addr_reg_index(ctx, EA);
- gen_qemu_ld64_i64(ctx, t0, EA);
- set_cpu_vsrh(xT(ctx->opcode), t0);
- tcg_gen_mov_i64(t1, t0);
- set_cpu_vsrl(xT(ctx->opcode), t1);
- tcg_temp_free(EA);
- tcg_temp_free_i64(t0);
- tcg_temp_free_i64(t1);
-}
-
static void gen_lxvw4x(DisasContext *ctx)
{
TCGv EA;
@@ -169,6 +146,29 @@ static void gen_lxvwsx(DisasContext *ctx)
tcg_temp_free_i32(data);
}
+static void gen_lxvdsx(DisasContext *ctx)
+{
+ TCGv EA;
+ TCGv_i64 data;
+
+ if (unlikely(!ctx->vsx_enabled)) {
+ gen_exception(ctx, POWERPC_EXCP_VSXU);
+ return;
+ }
+
+ gen_set_access_type(ctx, ACCESS_INT);
+ EA = tcg_temp_new();
+
+ gen_addr_reg_index(ctx, EA);
+
+ data = tcg_temp_new_i64();
+ tcg_gen_qemu_ld_i64(data, EA, ctx->mem_idx, MO_TEQ);
+ tcg_gen_gvec_dup_i64(MO_Q, vsr_full_offset(xT(ctx->opcode)), 16, 16, data);
+
+ tcg_temp_free(EA);
+ tcg_temp_free_i64(data);
+}
+
static void gen_bswap16x8(TCGv_i64 outh, TCGv_i64 outl,
TCGv_i64 inh, TCGv_i64 inl)
{
--
2.29.2
- [PULL 01/30] spapr/xive: Turn some sanity checks into assertions, (continued)
- [PULL 01/30] spapr/xive: Turn some sanity checks into assertions, David Gibson, 2020/12/10
- [PULL 02/30] spapr/xics: Drop unused argument to xics_kvm_has_broken_disconnect(), David Gibson, 2020/12/10
- [PULL 03/30] spapr: Do PCI device hotplug sanity checks at pre-plug only, David Gibson, 2020/12/10
- [PULL 04/30] spapr: Do NVDIMM/PC-DIMM device hotplug sanity checks at pre-plug only, David Gibson, 2020/12/10
- [PULL 05/30] spapr: Make PHB placement functions and spapr_pre_plug_phb() return status, David Gibson, 2020/12/10
- [PULL 07/30] spapr: Do TPM proxy hotplug sanity checks at pre-plug, David Gibson, 2020/12/10
- [PULL 09/30] ppc: Add a missing break for PPC6xx_INPUT_TBEN, David Gibson, 2020/12/10
- [PULL 11/30] ppc/translate: Turn the helper macros into functions, David Gibson, 2020/12/10
- [PULL 08/30] target/ppc: replaced the TODO with LOG_UNIMP and add break for silence warnings, David Gibson, 2020/12/10
- [PULL 06/30] spapr: Do PHB hoplug sanity check at pre-plug, David Gibson, 2020/12/10
- [PULL 14/30] ppc/translate: Rewrite gen_lxvdsx to use gvec primitives,
David Gibson <=
- [PULL 10/30] ppc/translate: Fix unordered f64/f128 comparisons, David Gibson, 2020/12/10
- [PULL 13/30] ppc/translate: Raise exceptions after setting the cc, David Gibson, 2020/12/10
- [PULL 12/30] ppc/translate: Delay NaN checking after comparison, David Gibson, 2020/12/10
- [PULL 23/30] MAINTAINERS: Add Greg Kurz as co-maintainer for ppc, David Gibson, 2020/12/10
- [PULL 15/30] hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier, David Gibson, 2020/12/10
- [PULL 16/30] xive: Add trace events, David Gibson, 2020/12/10
- [PULL 19/30] spapr: Simplify error path of spapr_core_plug(), David Gibson, 2020/12/10
- [PULL 18/30] spapr: Abort if ppc_set_compat() fails for hot-plugged CPUs, David Gibson, 2020/12/10
- [PULL 26/30] target/ppc: Introduce an mmu_is_64bit() helper, David Gibson, 2020/12/10
- [PULL 30/30] spapr.c: set a 'kvm-type' default value instead of relying on NULL, David Gibson, 2020/12/10