On Tue, Feb 4, 2014 at 2:13 PM, Bill Schmidt
<wschm...@linux.vnet.ibm.com> wrote:

> Yet another -maltivec=be patch, this one for the vector pack/unpack
> builtins.  For the pack operations, we need to reverse the order of the
> inputs for little endian without -maltivec=be.  For the unpack
> operations, we need to replace unpackh with unpackl, and vice versa, for
> little endian without -maltivec=be.
>
> For both pack and unpack, there are some internal uses that should not
> have their semantics changed from the existing implementation.  For
> these, "_direct" forms of the insns are provided, as has been done in
> previous patches in this series.
>
> Four new test cases are added to test these builtins for all applicable
> vector types, with and without -maltivec=be.
>
> Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu with no
> regressions.  Is this ok for trunk?
>
> Thanks,
> Bill
>
>
> gcc:
>
> 2014-02-04  Bill Schmidt  <wschm...@linux.vnet.ibm.com>
>
>         * altivec.md (UNSPEC_VPACK_UNS_UNS_MOD_DIRECT): New unspec.
>         (UNSPEC_VUNPACK_HI_SIGN_DIRECT): Likewise.
>         (UNSPEC_VUNPACK_LO_SIGN_DIRECT): Likewise.
>         (mulv8hi3): Use gen_altivec_vpkuwum_direct instead of
>         gen_altivec_vpkuwum.
>         (altivec_vpkpx): Test for VECTOR_ELT_ORDER_BIG instead of for
>         BYTES_BIG_ENDIAN.
>         (altivec_vpks<VI_char>ss): Likewise.
>         (altivec_vpks<VI_char>us): Likewise.
>         (altivec_vpku<VI_char>us): Likewise.
>         (altivec_vpku<VI_char>um): Likewise.
>         (altivec_vpku<VI_char>um_direct): New (copy of
>         altivec_vpku<VI_char>um that still relies on BYTES_BIG_ENDIAN, for
>         internal use).
>         (altivec_vupkhs<VU_char>): Emit vupkls* instead of vupkhs* when
>         target is little endian and -maltivec=be is not specified.
>         (*altivec_vupkhs<VU_char>_direct): New (copy of
>         altivec_vupkhs<VU_char> that always emits vupkhs*, for internal
>         use).
>         (altivec_vupkls<VU_char>): Emit vupkhs* instead of vupkls* when
>         target is little endian and -maltivec=be is not specified.
>         (*altivec_vupkls<VU_char>_direct): New (copy of
>         altivec_vupkls<VU_char> that always emits vupkls*, for internal
>         use).
>         (altivec_vupkhpx): Emit vupklpx instead of vupkhpx when target is
>         little endian and -maltivec=be is not specified.
>         (altivec_vupklpx): Emit vupkhpx instead of vupklpx when target is
>         little endian and -maltivec=be is not specified.
>
> gcc/testsuite:
>
> 2014-02-04  Bill Schmidt  <wschm...@linux.vnet.ibm.com>
>
>         * gcc.dg/vmx/pack.c: New.
>         * gcc.dg/vmx/pack-be-order.c: New.
>         * gcc.dg/vmx/unpack.c: New.
>         * gcc.dg/vmx/unpack-be-order.c: New.

Okay.

Thanks, David

Reply via email to