r235577 - in /trunk/gcc: ChangeLog config/rs600...

seurer@gcc.gnu.org seurer@gcc.gnu.org
Thu Apr 28 16:01:00 GMT 2016


Author: seurer
Date: Thu Apr 28 16:01:52 2016
New Revision: 235577

URL: https://gcc.gnu.org/viewcvs?rev=235577&root=gcc&view=rev
Log:
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 with a vec_and to ensure the
carry vector is comprised of only the values 0 or 1.

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-28  Bill Seurer  <seurer@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-28  Bill Seurer  <seurer@linux.vnet.ibm.com>

	* gcc.target/powerpc/vec-adde.c: New test.
	* gcc.target/powerpc/vec-adde-int128.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/powerpc/vec-adde-int128.c
    trunk/gcc/testsuite/gcc.target/powerpc/vec-adde.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000-builtin.def
    trunk/gcc/config/rs6000/rs6000-c.c
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list