target-ppc: Altivec 2.07: Change VMUL_DO to Support 64-bit Integers
commitaa9e930c8870d06a20b356785d3ec7d9a942a29f
authorTom Musta <tommusta@gmail.com>
Wed, 12 Feb 2014 21:23:00 +0000 (12 15:23 -0600)
committerAlexander Graf <agraf@suse.de>
Wed, 5 Mar 2014 02:06:54 +0000 (5 03:06 +0100)
tree2bb553f66befa7e3d5809386847b53baf994d967
parent56eabc750862b985a6ddfc3905b534576eeee33e
target-ppc: Altivec 2.07: Change VMUL_DO to Support 64-bit Integers

This VMUL_DO macro provides support for the various vmule* and vmulo*
instructions.  These instructions multiply vector elements, producing
products that are one size larger; e.g. vmuleub multiplies unsigned 8-bit
elements and produces a 16 bit unsigned element.

The existing macro works correctly for the existing instructions (8-bit,
and 16-bit source elements) but does not work correctly for 32-bit
source elements.

This patch adds an explicit cast to the multiplicands, forcing them to be
of the target element type.  This is required for the forthcoming patches
that add the vmul[eo][us]w instructions.

Signed-off-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/int_helper.c