From c026766b15a9324baeb2068e3b07658aae0b177b Mon Sep 17 00:00:00 2001 From: aurel32 Date: Thu, 8 Jan 2009 18:54:57 +0000 Subject: Add vspltis{b,h,w} instructions Signed-off-by: Nathan Froyd Signed-off-by: Aurelien Jarno git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6238 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-ppc/op_helper.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'target-ppc/op_helper.c') diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 55c9c56538..302832474e 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -2570,6 +2570,20 @@ VSPLT(w, u32) #undef SPLAT_ELEMENT #undef _SPLAT_MASKED +#define VSPLTI(suffix, element, splat_type) \ + void helper_vspltis##suffix (ppc_avr_t *r, uint32_t splat) \ + { \ + splat_type x = (int8_t)(splat << 3) >> 3; \ + int i; \ + for (i = 0; i < ARRAY_SIZE(r->element); i++) { \ + r->element[i] = x; \ + } \ + } +VSPLTI(b, s8, int8_t) +VSPLTI(h, s16, int16_t) +VSPLTI(w, s32, int32_t) +#undef VSPLTI + #define VSR(suffix, element) \ void helper_vsr##suffix (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ { \ -- cgit v1.2.3