target/ppc: convert vaddu[b,h,w,d] and vsubu[b,h,w,d] over to use vector operations
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20190215100058.20015-3-mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
50d24aedb3
commit
3e942a1a80
@ -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)
|
||||
|
@ -515,13 +515,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
|
||||
|
@ -395,18 +395,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);
|
||||
|
Loading…
Reference in New Issue
Block a user