[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 18/34] target/ppc: convert vaddu[b, h, w, d] and v
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH 18/34] target/ppc: convert vaddu[b, h, w, d] and vsubu[b, h, w, d] over to use vector operations |
Date: |
Wed, 19 Dec 2018 17:29:57 +1100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Mon, Dec 17, 2018 at 10:38:55PM -0800, Richard Henderson wrote:
> From: Mark Cave-Ayland <address@hidden>
>
> Signed-off-by: Mark Cave-Ayland <address@hidden>
> Reviewed-by: Richard Henderson <address@hidden>
Acked-by: David Gibson <address@hidden>
> Message-Id: <address@hidden>
> ---
> target/ppc/helper.h | 8 --------
> target/ppc/int_helper.c | 7 -------
> target/ppc/translate/vmx-impl.inc.c | 16 ++++++++--------
> 3 files changed, 8 insertions(+), 23 deletions(-)
>
> diff --git a/target/ppc/helper.h b/target/ppc/helper.h
> index c7de04e068..553ff500c8 100644
> --- a/target/ppc/helper.h
> +++ b/target/ppc/helper.h
> @@ -108,14 +108,6 @@ DEF_HELPER_FLAGS_1(ftsqrt, TCG_CALL_NO_RWG_SE, i32, i64)
> #define dh_ctype_avr ppc_avr_t *
> #define dh_is_signed_avr dh_is_signed_ptr
>
> -DEF_HELPER_3(vaddubm, void, avr, avr, avr)
> -DEF_HELPER_3(vadduhm, void, avr, avr, avr)
> -DEF_HELPER_3(vadduwm, void, avr, avr, avr)
> -DEF_HELPER_3(vaddudm, void, avr, avr, avr)
> -DEF_HELPER_3(vsububm, void, avr, avr, avr)
> -DEF_HELPER_3(vsubuhm, void, avr, avr, avr)
> -DEF_HELPER_3(vsubuwm, void, avr, avr, avr)
> -DEF_HELPER_3(vsubudm, void, avr, avr, avr)
> DEF_HELPER_3(vavgub, void, avr, avr, avr)
> DEF_HELPER_3(vavguh, void, avr, avr, avr)
> DEF_HELPER_3(vavguw, void, avr, avr, avr)
> diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
> index 9d715be25c..4547453ef1 100644
> --- a/target/ppc/int_helper.c
> +++ b/target/ppc/int_helper.c
> @@ -531,13 +531,6 @@ void helper_vprtybq(ppc_avr_t *r, ppc_avr_t *b)
> r->element[i] = a->element[i] op b->element[i]; \
> } \
> }
> -#define VARITH(suffix, element) \
> - VARITH_DO(add##suffix, +, element) \
> - VARITH_DO(sub##suffix, -, element)
> -VARITH(ubm, u8)
> -VARITH(uhm, u16)
> -VARITH(uwm, u32)
> -VARITH(udm, u64)
> VARITH_DO(muluwm, *, u32)
> #undef VARITH_DO
> #undef VARITH
> diff --git a/target/ppc/translate/vmx-impl.inc.c
> b/target/ppc/translate/vmx-impl.inc.c
> index c13828a09d..e353d3f174 100644
> --- a/target/ppc/translate/vmx-impl.inc.c
> +++ b/target/ppc/translate/vmx-impl.inc.c
> @@ -411,18 +411,18 @@ static void glue(gen_, name)(DisasContext *ctx)
> \
> tcg_temp_free_ptr(rb); \
> }
>
> -GEN_VXFORM(vaddubm, 0, 0);
> +GEN_VXFORM_V(vaddubm, MO_8, tcg_gen_gvec_add, 0, 0);
> GEN_VXFORM_DUAL_EXT(vaddubm, PPC_ALTIVEC, PPC_NONE, 0, \
> vmul10cuq, PPC_NONE, PPC2_ISA300, 0x0000F800)
> -GEN_VXFORM(vadduhm, 0, 1);
> +GEN_VXFORM_V(vadduhm, MO_16, tcg_gen_gvec_add, 0, 1);
> GEN_VXFORM_DUAL(vadduhm, PPC_ALTIVEC, PPC_NONE, \
> vmul10ecuq, PPC_NONE, PPC2_ISA300)
> -GEN_VXFORM(vadduwm, 0, 2);
> -GEN_VXFORM(vaddudm, 0, 3);
> -GEN_VXFORM(vsububm, 0, 16);
> -GEN_VXFORM(vsubuhm, 0, 17);
> -GEN_VXFORM(vsubuwm, 0, 18);
> -GEN_VXFORM(vsubudm, 0, 19);
> +GEN_VXFORM_V(vadduwm, MO_32, tcg_gen_gvec_add, 0, 2);
> +GEN_VXFORM_V(vaddudm, MO_64, tcg_gen_gvec_add, 0, 3);
> +GEN_VXFORM_V(vsububm, MO_8, tcg_gen_gvec_sub, 0, 16);
> +GEN_VXFORM_V(vsubuhm, MO_16, tcg_gen_gvec_sub, 0, 17);
> +GEN_VXFORM_V(vsubuwm, MO_32, tcg_gen_gvec_sub, 0, 18);
> +GEN_VXFORM_V(vsubudm, MO_64, tcg_gen_gvec_sub, 0, 19);
> GEN_VXFORM(vmaxub, 1, 0);
> GEN_VXFORM(vmaxuh, 1, 1);
> GEN_VXFORM(vmaxuw, 1, 2);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-ppc] [PATCH 16/34] target/ppc: move FP and VMX registers into aligned vsr register array, (continued)
- [Qemu-ppc] [PATCH 16/34] target/ppc: move FP and VMX registers into aligned vsr register array, Richard Henderson, 2018/12/18
- [Qemu-ppc] [PATCH 01/34] tcg: Add logical simplifications during gvec expand, Richard Henderson, 2018/12/18
- [Qemu-ppc] [PATCH 25/34] target/ppc: convert xxsel to vector operations, Richard Henderson, 2018/12/18
- [Qemu-ppc] [PATCH 15/34] target/ppc: merge ppc_vsr_t and ppc_avr_t union types, Richard Henderson, 2018/12/18
- [Qemu-ppc] [PATCH 06/34] tcg/i386: Implement vector saturating arithmetic, Richard Henderson, 2018/12/18
- [Qemu-ppc] [PATCH 18/34] target/ppc: convert vaddu[b, h, w, d] and vsubu[b, h, w, d] over to use vector operations, Richard Henderson, 2018/12/18
- Re: [Qemu-ppc] [PATCH 18/34] target/ppc: convert vaddu[b, h, w, d] and vsubu[b, h, w, d] over to use vector operations,
David Gibson <=
- [Qemu-ppc] [PATCH 30/34] target/ppc: Use mtvscr/mfvscr for vmstate, Richard Henderson, 2018/12/18
- [Qemu-ppc] [PATCH 14/34] target/ppc: switch FPR, VMX and VSX helpers to access data directly from cpu_env, Richard Henderson, 2018/12/18
- [Qemu-ppc] [PATCH 22/34] target/ppc: convert VSX logical operations to vector operations, Richard Henderson, 2018/12/18
- [Qemu-ppc] [PATCH 27/34] target/ppc: Use helper_mtvscr for reset and gdb, Richard Henderson, 2018/12/18
- [Qemu-ppc] [PATCH 31/34] target/ppc: Add set_vscr_sat, Richard Henderson, 2018/12/18