mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
target/ppc: add vmulh{su}w instructions
vmulhsw: Vector Multiply High Signed Word vmulhuw: Vector Multiply High Unsigned Word Signed-off-by: Lijun Pan <ljp@linux.ibm.com> Message-Id: <20200724045845.89976-4-ljp@linux.ibm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
73ebe95e8e
commit
f3e0d864ab
4 changed files with 29 additions and 2 deletions
|
@ -1086,6 +1086,25 @@ VMUL(uw, u32, VsrW, VsrD, uint64_t)
|
|||
#undef VMUL_DO_ODD
|
||||
#undef VMUL
|
||||
|
||||
void helper_vmulhsw(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
r->s32[i] = (int32_t)(((int64_t)a->s32[i] * (int64_t)b->s32[i]) >> 32);
|
||||
}
|
||||
}
|
||||
|
||||
void helper_vmulhuw(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
r->u32[i] = (uint32_t)(((uint64_t)a->u32[i] *
|
||||
(uint64_t)b->u32[i]) >> 32);
|
||||
}
|
||||
}
|
||||
|
||||
void helper_vperm(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b,
|
||||
ppc_avr_t *c)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue