aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-04 22:13:00 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-04 22:13:00 +0000
commitbcd2ee23ea2ade96427cada5f2967b769b43f373 (patch)
treec1fb2e640168a459223cb09338dfd2a211ff5390 /target-ppc/op_helper.c
parentAdd vmsumsh{m,s} instructions. (diff)
downloadqemu-kvm-bcd2ee23ea2ade96427cada5f2967b769b43f373.tar.gz
qemu-kvm-bcd2ee23ea2ade96427cada5f2967b769b43f373.tar.bz2
qemu-kvm-bcd2ee23ea2ade96427cada5f2967b769b43f373.zip
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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index 6ff215675..a8d3c8b70 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) \
{ \