This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH rs6000] (small C++ patch) Add intrinsics for the new vec_* specified by the C/C++ Language Extension for the CBEA


* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
Handle ALTIVEC_BUILTIN_VEC_SPLATS, ALTIVEC_BUILTIN_VEC_PROMOTE,
ALTIVEC_BUILTIN_VEC_EXTRACT, and ALTIVEC_BUILTIN_VEC_INSERT specially,
they translate to non builtins.
* config/rs6000/rs6000.c (altivec_init_builtins): Add new variable
opaque_ftype_opaque.  Define builtins __builtin_vec_splats,
__builtin_vec_promote, __builtin_vec_extract, and
__builtin_vec_insert.
* config/rs6000/rs6000.h (enum rs6000_builtins): Add
ALTIVEC_BUILTIN_VEC_EXTRACT, ALTIVEC_BUILTIN_VEC_PROMOTE,
ALTIVEC_BUILTIN_VEC_INSERT, and ALTIVEC_BUILTIN_VEC_SPLATS.
* config/rs6000/altivec.h (vec_extract): Define
(vec_insert): Define.
(vec_splats): Define.
(vec_promote): Define.

cp/ChangeLog:
* tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.

testsuite/ChangeLog:
* gcc.target/powerpc/altivec-cell-1.c: New test.
* gcc.target/powerpc/altivec-cell-2.c: New test.
* gcc.target/powerpc/altivec-cell-3.c: New test.
* gcc.target/powerpc/altivec-cell-4.c: New test.
* g++.dg/ext/altivec-cell-1.C: New test.
* g++.dg/ext/altivec-cell-2.C: New test.
* g++.dg/ext/altivec-cell-3.C: New test.
* g++.dg/ext/altivec-cell-4.C: New test.

Okay.

Index: config/rs6000/rs6000-c.c
===================================================================
--- config/rs6000/rs6000-c.c	(revision 140763)
+++ config/rs6000/rs6000-c.c	(working copy)
@@ -2685,6 +2685,200 @@ altivec_resolve_overloaded_builtin (tree
       || fcode > ALTIVEC_BUILTIN_OVERLOADED_LAST)
     return NULL_TREE;

+  /* For no treat vec_splats and vec_promote as the same.  */

Spelling: "For now"?

Thanks, David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]