diff options
author | Lijun Pan | 2020-07-24 06:58:43 +0200 |
---|---|---|
committer | David Gibson | 2020-08-12 05:16:27 +0200 |
commit | c4b8b49d68856ffacacfd792b0ab0d4aa0982e8d (patch) | |
tree | 676e0a016a8b7f02ed0a83f0601cb6d7a928be2b /target/ppc/int_helper.c | |
parent | target/ppc: add vmulh{su}w instructions (diff) | |
download | qemu-c4b8b49d68856ffacacfd792b0ab0d4aa0982e8d.tar.gz qemu-c4b8b49d68856ffacacfd792b0ab0d4aa0982e8d.tar.xz qemu-c4b8b49d68856ffacacfd792b0ab0d4aa0982e8d.zip |
target/ppc: add vmulh{su}d instructions
vmulhsd: Vector Multiply High Signed Doubleword
vmulhud: Vector Multiply High Unsigned Doubleword
Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
Message-Id: <20200724045845.89976-5-ljp@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/int_helper.c')
-rw-r--r-- | target/ppc/int_helper.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 1e866b7d3b..57cda75ed1 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -1105,6 +1105,22 @@ void helper_vmulhuw(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) } } +void helper_vmulhsd(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +{ + uint64_t discard; + + muls64(&discard, &r->u64[0], a->s64[0], b->s64[0]); + muls64(&discard, &r->u64[1], a->s64[1], b->s64[1]); +} + +void helper_vmulhud(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +{ + uint64_t discard; + + mulu64(&discard, &r->u64[0], a->u64[0], b->u64[0]); + mulu64(&discard, &r->u64[1], a->u64[1], b->u64[1]); +} + void helper_vperm(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) { |