diff options
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r-- | target-ppc/op_helper.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 6ff215675a..a8d3c8b707 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -2117,6 +2117,15 @@ VMINMAX(uw, u32) #undef VMINMAX_DO #undef VMINMAX +void helper_vmladduhm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) +{ + int i; + for (i = 0; i < ARRAY_SIZE(r->s16); i++) { + int32_t prod = a->s16[i] * b->s16[i]; + r->s16[i] = (int16_t) (prod + c->s16[i]); + } +} + #define VMRG_DO(name, element, highp) \ void helper_v##name (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ { \ |