diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-04 22:13:00 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-04 22:13:00 +0000 |
commit | bcd2ee23ea2ade96427cada5f2967b769b43f373 (patch) | |
tree | c1fb2e640168a459223cb09338dfd2a211ff5390 /target-ppc/op_helper.c | |
parent | eae07261c7620231ae347878284fa36e3dc0d1c0 (diff) |
Add vmladduhm instruction.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6187 c046a42c-6fe2-441c-8c8c-71466251a162
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) \ { \ |