On Wed, Apr 13, 2016 at 10:47 AM, Bill Seurer <seu...@linux.vnet.ibm.com> wrote: > Here is an updated patch: > > > This patch adds support for the signed and unsigned int versions of the > vec_adde altivec builtins from the Power Architecture 64-Bit ELF V2 ABI > OpenPOWER ABI for Linux Supplement (16 July 2015 Version 1.1). There are > many of the builtins that are missing and this is the first of a series > of patches to add them. > > There aren't instructions for the int versions of vec_adde so the > output code is built from other built-ins that do have instructions > which in this case is just two vec_adds. > > The new test cases are executable tests which verify that the generated > code produces expected values. C macros were used so that the same > test case could be used for both the signed and unsigned versions. An > extra executable test case is also included to ensure that the modified > support for the __int128 versions of vec_adde is not broken. The same > test case could not be used for both int and __int128 because of some > differences in loading and storing the vectors. > > Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no > regressions. Is this ok for trunk? > > [gcc] > > 2016-04-06 Bill Seurer <seu...@linux.vnet.ibm.com> > > * config/rs6000/rs6000-builtin.def (vec_adde): Change vec_adde to a > special case builtin. > * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove > ALTIVEC_BUILTIN_VEC_ADDE. > * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add > support for ALTIVEC_BUILTIN_VEC_ADDE. > * config/rs6000/rs6000.c (altivec_init_builtins): Add definition > for __builtin_vec_adde. > > [gcc/testsuite] > > 2016-04-06 Bill Seurer <seu...@linux.vnet.ibm.com> > > * gcc.target/powerpc/vec-adde.c: New test. > * gcc.target/powerpc/vec-adde-int128.c: New test.
The revised patch is okay for GCC 7, with the changes requested by Segher. Thanks, David