new build_function_type_list()
Aldy Hernandez
aldyh@redhat.com
Fri Jun 28 13:55:00 GMT 2002
hi guys!
for those who have written more than 5 builtins, you can probably relate
to what a pain build_function_type() is. consider this:
tree v2si_ftype_4_v2si
= build_function_type
(V2SI_type_node,
tree_cons (NULL_TREE, V2SI_type_node,
tree_cons (NULL_TREE, V2SI_type_node,
tree_cons (NULL_TREE, V2SI_type_node,
tree_cons (NULL_TREE, V2SI_type_node,
endlink)))));
wouldn't it be nice to do...:
tree v2si_ftype_4_v2si
= build_function_type_list (V2SI_type_node, V2SI_type_node, V2SI_type_node,
V2SI_type_node, NULL_TREE);
well that's exactly what this patch does. i started with PPC, but got
carried away...
i686-pc-linux-gnu regtested
powerpc-unknown-linux-gnu regtested
alphaev6-unknown-linux-gnu regtesting (almost done)
powerpc-apple-darwin5.5 regtested
arm-elf arm doesn't build cc1 on my darwin,
but it was a very obvious one line
change.
ia64-elf built cc1 and made sure init_builtins
doesn't die. ...since i don't have
a sim (or box) for ia64.
the only port left over is c4x. someone else can do this. last i tried,
it didn't build.
net loss in lines:
i386: 154 lines
ppc: 226 lines
ia64: 12 lines
alpha: 6 lines
arm: 1 line
TOTAL: 499 lines
oh-kay?
2002-06-28 Aldy Hernandez <aldyh@redhat.com>
* config/i386/i386.c (ix86_init_mmx_sse_builtins): Use
build_function_type_list instead of build_function_type.
* config/ia64/ia64.c (ia64_init_builtins): Same.
* config/alpha/alpha.c (alpha_init_builtins): Same.
* config/rs6000/rs6000.c (altivec_init_builtins): Same.
* config/arm/arm.c (arm_init_builtins): Same.
* tree.h: Add build_function_type_list prototype.
* tree.c (build_function_type_list): New.
Index: tree.h
===================================================================
RCS file: /cvs/uberbaum/gcc/tree.h,v
retrieving revision 1.342
diff -c -p -r1.342 tree.h
*** tree.h 4 Jun 2002 07:08:15 -0000 1.342
--- tree.h 28 Jun 2002 20:16:40 -0000
*************** extern tree build_index_type PARAMS ((t
*** 2178,2183 ****
--- 2178,2184 ----
extern tree build_index_2_type PARAMS ((tree, tree));
extern tree build_array_type PARAMS ((tree, tree));
extern tree build_function_type PARAMS ((tree, tree));
+ extern tree build_function_type_list PARAMS ((tree, ...));
extern tree build_method_type PARAMS ((tree, tree));
extern tree build_offset_type PARAMS ((tree, tree));
extern tree build_complex_type PARAMS ((tree));
Index: tree.c
===================================================================
RCS file: /cvs/uberbaum/gcc/tree.c,v
retrieving revision 1.263
diff -c -p -r1.263 tree.c
*** tree.c 4 Jun 2002 07:08:13 -0000 1.263
--- tree.c 28 Jun 2002 20:16:49 -0000
*************** build_function_type (value_type, arg_typ
*** 3799,3804 ****
--- 3799,3855 ----
return t;
}
+ /* Like build_function_type, but take a vararg list of nodes. The
+ list of nodes should end with a NULL_TREE. This is typically used
+ for creating function types for builtins. */
+
+ tree
+ build_function_type_list VPARAMS ((tree first, ...))
+ {
+ static tree *tree_list;
+ static int tl_size;
+ tree t, *tp, args;
+ int i;
+
+ if (tree_list == 0)
+ {
+ /* This should be enough, but you never know. So let's realloc
+ as we go. */
+ tl_size = 20;
+ tree_list = (tree *) xmalloc (sizeof (tree) * tl_size);
+ }
+
+ VA_OPEN (p, first);
+ VA_FIXEDARG (p, tree, first);
+
+ /* Accumulate all trees. */
+ t = va_arg (p, tree);
+ tp = tree_list;
+ for (i = 0; t != NULL_TREE; t = va_arg (p, tree))
+ {
+ if (i >= tl_size)
+ {
+ tl_size += 20;
+ tree_list = (tree *) xrealloc (tree_list, sizeof (tree) * tl_size);
+ }
+
+ *tp++ = t;
+ ++i;
+ }
+
+ /* We need at least 2 args. */
+ if (i == 0)
+ abort ();
+
+ /* Cons 'em up. */
+ args = tree_cons (NULL_TREE, *--tp, void_list_node);
+ while (--i > 0)
+ args = tree_cons (NULL_TREE, *--tp, args);
+ VA_CLOSE (p);
+
+ return build_function_type (first, args);
+ }
+
/* Construct, lay out and return the type of methods belonging to class
BASETYPE and whose arguments and values are described by TYPE.
If that type exists already, reuse it.
Index: config/arm/arm.c
===================================================================
RCS file: /cvs/uberbaum/gcc/config/arm/arm.c,v
retrieving revision 1.212
diff -c -p -r1.212 arm.c
*** config/arm/arm.c 11 Jun 2002 12:22:26 -0000 1.212
--- config/arm/arm.c 28 Jun 2002 20:17:32 -0000
*************** arm_init_builtins ()
*** 9314,9323 ****
tree int_ftype_int, void_ftype_pchar;
! /* void func (void *) */
void_ftype_pchar
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pchar_type_node, endlink));
/* int func (int) */
int_ftype_int
--- 9314,9322 ----
tree int_ftype_int, void_ftype_pchar;
! /* void func (char *) */
void_ftype_pchar
! = build_function_type_list (void_type_node, pchar_type_node, NULL_TREE);
/* int func (int) */
int_ftype_int
Index: config/ia64/ia64.c
===================================================================
RCS file: /cvs/uberbaum/gcc/config/ia64/ia64.c,v
retrieving revision 1.176
diff -c -p -r1.176 ia64.c
*** config/ia64/ia64.c 11 Jun 2002 12:22:35 -0000 1.176
--- config/ia64/ia64.c 28 Jun 2002 20:17:48 -0000
*************** ia64_init_builtins ()
*** 7506,7557 ****
{
tree psi_type_node = build_pointer_type (integer_type_node);
tree pdi_type_node = build_pointer_type (long_integer_type_node);
- tree endlink = void_list_node;
/* __sync_val_compare_and_swap_si, __sync_bool_compare_and_swap_si */
tree si_ftype_psi_si_si
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, psi_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE,
! integer_type_node,
! endlink))));
/* __sync_val_compare_and_swap_di, __sync_bool_compare_and_swap_di */
tree di_ftype_pdi_di_di
! = build_function_type (long_integer_type_node,
! tree_cons (NULL_TREE, pdi_type_node,
! tree_cons (NULL_TREE,
! long_integer_type_node,
! tree_cons (NULL_TREE,
! long_integer_type_node,
! endlink))));
/* __sync_synchronize */
tree void_ftype_void
! = build_function_type (void_type_node, endlink);
/* __sync_lock_test_and_set_si */
tree si_ftype_psi_si
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, psi_type_node,
! tree_cons (NULL_TREE, integer_type_node, endlink)));
/* __sync_lock_test_and_set_di */
tree di_ftype_pdi_di
! = build_function_type (long_integer_type_node,
! tree_cons (NULL_TREE, pdi_type_node,
! tree_cons (NULL_TREE, long_integer_type_node,
! endlink)));
/* __sync_lock_release_si */
tree void_ftype_psi
! = build_function_type (void_type_node, tree_cons (NULL_TREE, psi_type_node,
! endlink));
/* __sync_lock_release_di */
tree void_ftype_pdi
! = build_function_type (void_type_node, tree_cons (NULL_TREE, pdi_type_node,
! endlink));
#define def_builtin(name, type, code) \
builtin_function ((name), (type), (code), BUILT_IN_MD, NULL)
--- 7506,7545 ----
{
tree psi_type_node = build_pointer_type (integer_type_node);
tree pdi_type_node = build_pointer_type (long_integer_type_node);
/* __sync_val_compare_and_swap_si, __sync_bool_compare_and_swap_si */
tree si_ftype_psi_si_si
! = build_function_type_list (integer_type_node,
! psi_type_node, integer_type_node,
! integer_type_node, NULL_TREE);
/* __sync_val_compare_and_swap_di, __sync_bool_compare_and_swap_di */
tree di_ftype_pdi_di_di
! = build_function_type_list (long_integer_type_node,
! pdi_type_node, long_integer_type_node,
! long_integer_type_node, NULL_TREE);
/* __sync_synchronize */
tree void_ftype_void
! = build_function_type (void_type_node, void_list_node);
/* __sync_lock_test_and_set_si */
tree si_ftype_psi_si
! = build_function_type_list (integer_type_node,
! psi_type_node, integer_type_node, NULL_TREE);
/* __sync_lock_test_and_set_di */
tree di_ftype_pdi_di
! = build_function_type_list (long_integer_type_node,
! pdi_type_node, long_integer_type_node,
! NULL_TREE);
/* __sync_lock_release_si */
tree void_ftype_psi
! = build_function_type_list (void_type_node, psi_type_node, NULL_TREE);
/* __sync_lock_release_di */
tree void_ftype_pdi
! = build_function_type_list (void_type_node, pdi_type_node, NULL_TREE);
#define def_builtin(name, type, code) \
builtin_function ((name), (type), (code), BUILT_IN_MD, NULL)
*************** ia64_init_builtins ()
*** 7578,7588 ****
IA64_BUILTIN_LOCK_RELEASE_DI);
def_builtin ("__builtin_ia64_bsp",
! build_function_type (ptr_type_node, endlink),
IA64_BUILTIN_BSP);
def_builtin ("__builtin_ia64_flushrs",
! build_function_type (void_type_node, endlink),
IA64_BUILTIN_FLUSHRS);
def_builtin ("__sync_fetch_and_add_si", si_ftype_psi_si,
--- 7566,7576 ----
IA64_BUILTIN_LOCK_RELEASE_DI);
def_builtin ("__builtin_ia64_bsp",
! build_function_type (ptr_type_node, void_list_node),
IA64_BUILTIN_BSP);
def_builtin ("__builtin_ia64_flushrs",
! build_function_type (void_type_node, void_list_node),
IA64_BUILTIN_FLUSHRS);
def_builtin ("__sync_fetch_and_add_si", si_ftype_psi_si,
Index: config/alpha/alpha.c
===================================================================
RCS file: /cvs/uberbaum/gcc/config/alpha/alpha.c,v
retrieving revision 1.263
diff -c -p -r1.263 alpha.c
*** config/alpha/alpha.c 12 Jun 2002 02:57:02 -0000 1.263
--- config/alpha/alpha.c 28 Jun 2002 20:18:47 -0000
*************** alpha_init_builtins ()
*** 6498,6519 ****
if ((target_flags & p->target_mask) == p->target_mask)
builtin_function (p->name, ftype, p->code, BUILT_IN_MD, NULL);
! ftype = build_function_type (long_integer_type_node,
! tree_cons (NULL_TREE,
! long_integer_type_node,
! void_list_node));
p = one_arg_builtins;
for (i = 0; i < ARRAY_SIZE (one_arg_builtins); ++i, ++p)
if ((target_flags & p->target_mask) == p->target_mask)
builtin_function (p->name, ftype, p->code, BUILT_IN_MD, NULL);
! ftype = build_function_type (long_integer_type_node,
! tree_cons (NULL_TREE,
! long_integer_type_node,
! tree_cons (NULL_TREE,
! long_integer_type_node,
! void_list_node)));
p = two_arg_builtins;
for (i = 0; i < ARRAY_SIZE (two_arg_builtins); ++i, ++p)
--- 6498,6515 ----
if ((target_flags & p->target_mask) == p->target_mask)
builtin_function (p->name, ftype, p->code, BUILT_IN_MD, NULL);
! ftype = build_function_type_list (long_integer_type_node,
! long_integer_type_node, NULL_TREE);
p = one_arg_builtins;
for (i = 0; i < ARRAY_SIZE (one_arg_builtins); ++i, ++p)
if ((target_flags & p->target_mask) == p->target_mask)
builtin_function (p->name, ftype, p->code, BUILT_IN_MD, NULL);
! ftype = build_function_type_list (long_integer_type_node,
! long_integer_type_node,
! long_integer_type_node,
! void_list_node, NULL_TREE);
p = two_arg_builtins;
for (i = 0; i < ARRAY_SIZE (two_arg_builtins); ++i, ++p)
*************** alpha_init_builtins ()
*** 6524,6532 ****
builtin_function ("__builtin_thread_pointer", ftype,
ALPHA_BUILTIN_THREAD_POINTER, BUILT_IN_MD, NULL);
! ftype = build_function_type (void_type_node, tree_cons (NULL_TREE,
! ptr_type_node,
! void_list_node));
builtin_function ("__builtin_set_thread_pointer", ftype,
ALPHA_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD, NULL);
}
--- 6520,6526 ----
builtin_function ("__builtin_thread_pointer", ftype,
ALPHA_BUILTIN_THREAD_POINTER, BUILT_IN_MD, NULL);
! ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
builtin_function ("__builtin_set_thread_pointer", ftype,
ALPHA_BUILTIN_SET_THREAD_POINTER, BUILT_IN_MD, NULL);
}
Index: config/i386/i386.c
===================================================================
RCS file: /cvs/uberbaum/gcc/config/i386/i386.c,v
retrieving revision 1.425
diff -c -p -r1.425 i386.c
*** config/i386/i386.c 16 Jun 2002 20:18:24 -0000 1.425
--- config/i386/i386.c 28 Jun 2002 20:19:13 -0000
*************** ix86_init_mmx_sse_builtins ()
*** 11823,11829 ****
{
const struct builtin_description * d;
size_t i;
- tree endlink = void_list_node;
tree pchar_type_node = build_pointer_type (char_type_node);
tree pfloat_type_node = build_pointer_type (float_type_node);
--- 11823,11828 ----
*************** ix86_init_mmx_sse_builtins ()
*** 11833,12237 ****
/* Comparisons. */
tree int_ftype_v4sf_v4sf
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE,
! V4SF_type_node,
! endlink)));
tree v4si_ftype_v4sf_v4sf
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE,
! V4SF_type_node,
! endlink)));
/* MMX/SSE/integer conversions. */
tree int_ftype_v4sf
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink));
tree int_ftype_v8qi
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V8QI_type_node,
! endlink));
tree v4sf_ftype_v4sf_int
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! endlink)));
tree v4sf_ftype_v4sf_v2si
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! endlink)));
tree int_ftype_v4hi_int
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V4HI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! endlink)));
tree v4hi_ftype_v4hi_int_int
! = build_function_type (V4HI_type_node,
! tree_cons (NULL_TREE, V4HI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE,
! integer_type_node,
! endlink))));
/* Miscellaneous. */
tree v8qi_ftype_v4hi_v4hi
! = build_function_type (V8QI_type_node,
! tree_cons (NULL_TREE, V4HI_type_node,
! tree_cons (NULL_TREE, V4HI_type_node,
! endlink)));
tree v4hi_ftype_v2si_v2si
! = build_function_type (V4HI_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! endlink)));
tree v4sf_ftype_v4sf_v4sf_int
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE,
! integer_type_node,
! endlink))));
tree v2si_ftype_v4hi_v4hi
! = build_function_type (V2SI_type_node,
! tree_cons (NULL_TREE, V4HI_type_node,
! tree_cons (NULL_TREE, V4HI_type_node,
! endlink)));
tree v4hi_ftype_v4hi_int
! = build_function_type (V4HI_type_node,
! tree_cons (NULL_TREE, V4HI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! endlink)));
tree v4hi_ftype_v4hi_di
! = build_function_type (V4HI_type_node,
! tree_cons (NULL_TREE, V4HI_type_node,
! tree_cons (NULL_TREE,
! long_long_integer_type_node,
! endlink)));
tree v2si_ftype_v2si_di
! = build_function_type (V2SI_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! tree_cons (NULL_TREE,
! long_long_integer_type_node,
! endlink)));
tree void_ftype_void
! = build_function_type (void_type_node, endlink);
tree void_ftype_unsigned
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, unsigned_type_node,
! endlink));
tree unsigned_ftype_void
! = build_function_type (unsigned_type_node, endlink);
tree di_ftype_void
! = build_function_type (long_long_unsigned_type_node, endlink);
tree v4sf_ftype_void
! = build_function_type (V4SF_type_node, endlink);
tree v2si_ftype_v4sf
! = build_function_type (V2SI_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink));
/* Loads/stores. */
- tree maskmovq_args = tree_cons (NULL_TREE, V8QI_type_node,
- tree_cons (NULL_TREE, V8QI_type_node,
- tree_cons (NULL_TREE,
- pchar_type_node,
- endlink)));
tree void_ftype_v8qi_v8qi_pchar
! = build_function_type (void_type_node, maskmovq_args);
tree v4sf_ftype_pfloat
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, pfloat_type_node,
! endlink));
/* @@@ the type is bogus */
tree v4sf_ftype_v4sf_pv2si
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, pv2si_type_node,
! endlink)));
tree void_ftype_pv2si_v4sf
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pv2si_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink)));
tree void_ftype_pfloat_v4sf
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pfloat_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink)));
tree void_ftype_pdi_di
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pdi_type_node,
! tree_cons (NULL_TREE,
! long_long_unsigned_type_node,
! endlink)));
tree void_ftype_pv2di_v2di
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pv2di_type_node,
! tree_cons (NULL_TREE,
! V2DI_type_node,
! endlink)));
/* Normal vector unops. */
tree v4sf_ftype_v4sf
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink));
/* Normal vector binops. */
tree v4sf_ftype_v4sf_v4sf
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink)));
tree v8qi_ftype_v8qi_v8qi
! = build_function_type (V8QI_type_node,
! tree_cons (NULL_TREE, V8QI_type_node,
! tree_cons (NULL_TREE, V8QI_type_node,
! endlink)));
tree v4hi_ftype_v4hi_v4hi
! = build_function_type (V4HI_type_node,
! tree_cons (NULL_TREE, V4HI_type_node,
! tree_cons (NULL_TREE, V4HI_type_node,
! endlink)));
tree v2si_ftype_v2si_v2si
! = build_function_type (V2SI_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! endlink)));
tree di_ftype_di_di
! = build_function_type (long_long_unsigned_type_node,
! tree_cons (NULL_TREE, long_long_unsigned_type_node,
! tree_cons (NULL_TREE,
! long_long_unsigned_type_node,
! endlink)));
tree v2si_ftype_v2sf
! = build_function_type (V2SI_type_node,
! tree_cons (NULL_TREE, V2SF_type_node,
! endlink));
tree v2sf_ftype_v2si
! = build_function_type (V2SF_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! endlink));
tree v2si_ftype_v2si
! = build_function_type (V2SI_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! endlink));
tree v2sf_ftype_v2sf
! = build_function_type (V2SF_type_node,
! tree_cons (NULL_TREE, V2SF_type_node,
! endlink));
tree v2sf_ftype_v2sf_v2sf
! = build_function_type (V2SF_type_node,
! tree_cons (NULL_TREE, V2SF_type_node,
! tree_cons (NULL_TREE,
! V2SF_type_node,
! endlink)));
tree v2si_ftype_v2sf_v2sf
! = build_function_type (V2SI_type_node,
! tree_cons (NULL_TREE, V2SF_type_node,
! tree_cons (NULL_TREE,
! V2SF_type_node,
! endlink)));
tree pint_type_node = build_pointer_type (integer_type_node);
tree pdouble_type_node = build_pointer_type (double_type_node);
tree int_ftype_v2df_v2df
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node, endlink)));
tree ti_ftype_void
! = build_function_type (intTI_type_node, endlink);
tree ti_ftype_ti_ti
! = build_function_type (intTI_type_node,
! tree_cons (NULL_TREE, intTI_type_node,
! tree_cons (NULL_TREE, intTI_type_node,
! endlink)));
tree void_ftype_pvoid
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, ptr_type_node, endlink));
tree v2di_ftype_di
! = build_function_type (V2DI_type_node,
! tree_cons (NULL_TREE, long_long_unsigned_type_node,
! endlink));
tree v4sf_ftype_v4si
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SI_type_node, endlink));
tree v4si_ftype_v4sf
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SF_type_node, endlink));
tree v2df_ftype_v4si
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, V4SI_type_node, endlink));
tree v4si_ftype_v2df
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V2DF_type_node, endlink));
tree v2si_ftype_v2df
! = build_function_type (V2SI_type_node,
! tree_cons (NULL_TREE, V2DF_type_node, endlink));
tree v4sf_ftype_v2df
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node, endlink));
tree v2df_ftype_v2si
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, V2SI_type_node, endlink));
tree v2df_ftype_v4sf
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node, endlink));
tree int_ftype_v2df
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V2DF_type_node, endlink));
tree v2df_ftype_v2df_int
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! endlink)));
tree v4sf_ftype_v4sf_v2df
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! endlink)));
tree v2df_ftype_v2df_v4sf
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink)));
tree v2df_ftype_v2df_v2df_int
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! tree_cons (NULL_TREE,
! integer_type_node,
! endlink))));
tree v2df_ftype_v2df_pv2si
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! tree_cons (NULL_TREE, pv2si_type_node,
! endlink)));
tree void_ftype_pv2si_v2df
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pv2si_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! endlink)));
tree void_ftype_pdouble_v2df
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pdouble_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! endlink)));
tree void_ftype_pint_int
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pint_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! endlink)));
! tree maskmovdqu_args = tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE,
! pchar_type_node,
! endlink)));
tree void_ftype_v16qi_v16qi_pchar
! = build_function_type (void_type_node, maskmovdqu_args);
tree v2df_ftype_pdouble
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, pdouble_type_node,
! endlink));
tree v2df_ftype_v2df_v2df
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! endlink)));
tree v16qi_ftype_v16qi_v16qi
! = build_function_type (V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! endlink)));
tree v8hi_ftype_v8hi_v8hi
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! endlink)));
tree v4si_ftype_v4si_v4si
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! endlink)));
tree v2di_ftype_v2di_v2di
! = build_function_type (V2DI_type_node,
! tree_cons (NULL_TREE, V2DI_type_node,
! tree_cons (NULL_TREE, V2DI_type_node,
! endlink)));
tree v2di_ftype_v2df_v2df
! = build_function_type (V2DI_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! endlink)));
tree v2df_ftype_v2df
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, V2DF_type_node,
! endlink));
tree v2df_ftype_double
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, double_type_node,
! endlink));
tree v2df_ftype_double_double
! = build_function_type (V2DF_type_node,
! tree_cons (NULL_TREE, double_type_node,
! tree_cons (NULL_TREE, double_type_node,
! endlink)));
tree int_ftype_v8hi_int
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! endlink)));
tree v8hi_ftype_v8hi_int_int
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE,
! integer_type_node,
! endlink))));
tree v2di_ftype_v2di_int
! = build_function_type (V2DI_type_node,
! tree_cons (NULL_TREE, V2DI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! endlink)));
tree v4si_ftype_v4si_int
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! endlink)));
tree v8hi_ftype_v8hi_int
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! endlink)));
tree v8hi_ftype_v8hi_v2di
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V2DI_type_node,
! endlink)));
tree v4si_ftype_v4si_v2di
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, V2DI_type_node,
! endlink)));
tree v4si_ftype_v8hi_v8hi
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! endlink)));
tree di_ftype_v8qi_v8qi
! = build_function_type (long_long_unsigned_type_node,
! tree_cons (NULL_TREE, V8QI_type_node,
! tree_cons (NULL_TREE, V8QI_type_node,
! endlink)));
tree v2di_ftype_v16qi_v16qi
! = build_function_type (V2DI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! endlink)));
tree int_ftype_v16qi
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V16QI_type_node, endlink));
/* Add all builtins that are more or less simple operations on two
operands. */
--- 11832,12083 ----
/* Comparisons. */
tree int_ftype_v4sf_v4sf
! = build_function_type_list (integer_type_node,
! V4SF_type_node, V4SF_type_node, NULL_TREE);
tree v4si_ftype_v4sf_v4sf
! = build_function_type_list (V4SI_type_node,
! V4SF_type_node, V4SF_type_node, NULL_TREE);
/* MMX/SSE/integer conversions. */
tree int_ftype_v4sf
! = build_function_type_list (integer_type_node,
! V4SF_type_node, NULL_TREE);
tree int_ftype_v8qi
! = build_function_type_list (integer_type_node, V8QI_type_node, NULL_TREE);
tree v4sf_ftype_v4sf_int
! = build_function_type_list (V4SF_type_node,
! V4SF_type_node, integer_type_node, NULL_TREE);
tree v4sf_ftype_v4sf_v2si
! = build_function_type_list (V4SF_type_node,
! V4SF_type_node, V2SI_type_node, NULL_TREE);
tree int_ftype_v4hi_int
! = build_function_type_list (integer_type_node,
! V4HI_type_node, integer_type_node, NULL_TREE);
tree v4hi_ftype_v4hi_int_int
! = build_function_type_list (V4HI_type_node,
! integer_type_node, integer_type_node,
! NULL_TREE);
/* Miscellaneous. */
tree v8qi_ftype_v4hi_v4hi
! = build_function_type_list (V8QI_type_node,
! V4HI_type_node, V4HI_type_node, NULL_TREE);
tree v4hi_ftype_v2si_v2si
! = build_function_type_list (V4HI_type_node,
! V2SI_type_node, V2SI_type_node, NULL_TREE);
tree v4sf_ftype_v4sf_v4sf_int
! = build_function_type_list (V4SF_type_node,
! V4SF_type_node, V4SF_type_node,
! integer_type_node, NULL_TREE);
tree v2si_ftype_v4hi_v4hi
! = build_function_type_list (V2SI_type_node,
! V4HI_type_node, V4HI_type_node, NULL_TREE);
tree v4hi_ftype_v4hi_int
! = build_function_type_list (V4HI_type_node,
! V4HI_type_node, V4HI_type_node,
! integer_type_node, NULL_TREE);
tree v4hi_ftype_v4hi_di
! = build_function_type_list (V4HI_type_node,
! V4HI_type_node, long_long_unsigned_type_node,
! NULL_TREE);
tree v2si_ftype_v2si_di
! = build_function_type_list (V2SI_type_node,
! V2SI_type_node, long_long_unsigned_type_node,
! NULL_TREE);
tree void_ftype_void
! = build_function_type (void_type_node, void_list_node);
tree void_ftype_unsigned
! = build_function_type_list (void_type_node, unsigned_type_node, NULL_TREE);
tree unsigned_ftype_void
! = build_function_type (unsigned_type_node, void_list_node);
tree di_ftype_void
! = build_function_type (long_long_unsigned_type_node, void_list_node);
tree v4sf_ftype_void
! = build_function_type (V4SF_type_node, void_list_node);
tree v2si_ftype_v4sf
! = build_function_type_list (V2SI_type_node, V4SF_type_node, NULL_TREE);
/* Loads/stores. */
tree void_ftype_v8qi_v8qi_pchar
! = build_function_type_list (void_type_node,
! V8QI_type_node, V8QI_type_node,
! pchar_type_node, NULL_TREE);
tree v4sf_ftype_pfloat
! = build_function_type_list (V4SF_type_node, pfloat_type_node, NULL_TREE);
/* @@@ the type is bogus */
tree v4sf_ftype_v4sf_pv2si
! = build_function_type_list (V4SF_type_node,
! V4SF_type_node, pv2di_type_node, NULL_TREE);
tree void_ftype_pv2si_v4sf
! = build_function_type_list (void_type_node,
! pv2di_type_node, V4SF_type_node, NULL_TREE);
tree void_ftype_pfloat_v4sf
! = build_function_type_list (void_type_node,
! pfloat_type_node, V4SF_type_node, NULL_TREE);
tree void_ftype_pdi_di
! = build_function_type_list (void_type_node,
! pdi_type_node, long_long_unsigned_type_node,
! NULL_TREE);
tree void_ftype_pv2di_v2di
! = build_function_type_list (void_type_node,
! pv2di_type_node, V2DI_type_node, NULL_TREE);
/* Normal vector unops. */
tree v4sf_ftype_v4sf
! = build_function_type_list (V4SF_type_node, V4SF_type_node, NULL_TREE);
/* Normal vector binops. */
tree v4sf_ftype_v4sf_v4sf
! = build_function_type_list (V4SF_type_node,
! V4SF_type_node, V4SF_type_node, NULL_TREE);
tree v8qi_ftype_v8qi_v8qi
! = build_function_type_list (V8QI_type_node,
! V8QI_type_node, V8QI_type_node, NULL_TREE);
tree v4hi_ftype_v4hi_v4hi
! = build_function_type_list (V4HI_type_node,
! V4HI_type_node, V4HI_type_node, NULL_TREE);
tree v2si_ftype_v2si_v2si
! = build_function_type_list (V2SI_type_node,
! V2SI_type_node, V2SI_type_node, NULL_TREE);
tree di_ftype_di_di
! = build_function_type_list (long_long_unsigned_type_node,
! long_long_unsigned_type_node,
! long_long_unsigned_type_node, NULL_TREE);
tree v2si_ftype_v2sf
! = build_function_type_list (V2SI_type_node, V2SFmode, NULL_TREE);
tree v2sf_ftype_v2si
! = build_function_type_list (V2SF_type_node, V2SI_type_node, NULL_TREE);
tree v2si_ftype_v2si
! = build_function_type_list (V2SI_type_node, V2SI_type_node, NULL_TREE);
tree v2sf_ftype_v2sf
! = build_function_type_list (V2SF_type_node, V2SF_type_node, NULL_TREE);
tree v2sf_ftype_v2sf_v2sf
! = build_function_type_list (V2SF_type_node,
! V2SF_type_node, V2SF_type_node, NULL_TREE);
tree v2si_ftype_v2sf_v2sf
! = build_function_type_list (V2SI_type_node,
! V2SF_type_node, V2SF_type_node, NULL_TREE);
tree pint_type_node = build_pointer_type (integer_type_node);
tree pdouble_type_node = build_pointer_type (double_type_node);
tree int_ftype_v2df_v2df
! = build_function_type_list (integer_type_node,
! V2DF_type_node, V2DF_type_node, NULL_TREE);
tree ti_ftype_void
! = build_function_type (intTI_type_node, void_list_node);
tree ti_ftype_ti_ti
! = build_function_type_list (intTI_type_node,
! intTI_type_node, intTI_type_node, NULL_TREE);
tree void_ftype_pvoid
! = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
tree v2di_ftype_di
! = build_function_type_list (V2DI_type_node,
! long_long_unsigned_type_node, NULL_TREE);
tree v4sf_ftype_v4si
! = build_function_type_list (V4SF_type_node, V4SI_type_node, NULL_TREE);
tree v4si_ftype_v4sf
! = build_function_type_list (V4SI_type_node, V4SF_type_node, NULL_TREE);
tree v2df_ftype_v4si
! = build_function_type_list (V2DF_type_node, V4SI_type_node, NULL_TREE);
tree v4si_ftype_v2df
! = build_function_type_list (V4SI_type_node, V2DF_type_node, NULL_TREE);
tree v2si_ftype_v2df
! = build_function_type_list (V2SI_type_node, V2DF_type_node, NULL_TREE);
tree v4sf_ftype_v2df
! = build_function_type_list (V4SF_type_node, V2DF_type_node, NULL_TREE);
tree v2df_ftype_v2si
! = build_function_type_list (V2DF_type_node, V2SI_type_node, NULL_TREE);
tree v2df_ftype_v4sf
! = build_function_type_list (V2DF_type_node, V4SF_type_node, NULL_TREE);
tree int_ftype_v2df
! = build_function_type_list (integer_type_node, V2DF_type_node, NULL_TREE);
tree v2df_ftype_v2df_int
! = build_function_type_list (V2DF_type_node,
! V2DF_type_node, integer_type_node, NULL_TREE);
tree v4sf_ftype_v4sf_v2df
! = build_function_type_list (V4SF_type_node,
! V4SF_type_node, V2DF_type_node, NULL_TREE);
tree v2df_ftype_v2df_v4sf
! = build_function_type_list (V2DF_type_node,
! V2DF_type_node, V4SF_type_node, NULL_TREE);
tree v2df_ftype_v2df_v2df_int
! = build_function_type_list (V2DF_type_node,
! V2DF_type_node, V2DF_type_node,
! integer_type_node,
! NULL_TREE);
tree v2df_ftype_v2df_pv2si
! = build_function_type_list (V2DF_type_node,
! V2DF_type_node, pv2si_type_node, NULL_TREE);
tree void_ftype_pv2si_v2df
! = build_function_type_list (void_type_node,
! pv2si_type_node, V2DF_type_node, NULL_TREE);
tree void_ftype_pdouble_v2df
! = build_function_type_list (void_type_node,
! pdouble_type_node, V2DF_type_node, NULL_TREE);
tree void_ftype_pint_int
! = build_function_type_list (void_type_node,
! pint_type_node, integer_type_node, NULL_TREE);
tree void_ftype_v16qi_v16qi_pchar
! = build_function_type_list (void_type_node,
! V16QI_type_node, V16QI_type_node,
! pchar_type_node, NULL_TREE);
tree v2df_ftype_pdouble
! = build_function_type_list (V2DF_type_node, pdouble_type_node, NULL_TREE);
tree v2df_ftype_v2df_v2df
! = build_function_type_list (V2DF_type_node,
! V2DF_type_node, V2DF_type_node, NULL_TREE);
tree v16qi_ftype_v16qi_v16qi
! = build_function_type_list (V16QI_type_node,
! V16QI_type_node, V16QI_type_node, NULL_TREE);
tree v8hi_ftype_v8hi_v8hi
! = build_function_type_list (V8HI_type_node,
! V8HI_type_node, V8HI_type_node, NULL_TREE);
tree v4si_ftype_v4si_v4si
! = build_function_type_list (V4SI_type_node,
! V4SI_type_node, V4SI_type_node, NULL_TREE);
tree v2di_ftype_v2di_v2di
! = build_function_type_list (V2DI_type_node,
! V2DI_type_node, V2DI_type_node, NULL_TREE);
tree v2di_ftype_v2df_v2df
! = build_function_type_list (V2DI_type_node,
! V2DF_type_node, V2DF_type_node, NULL_TREE);
tree v2df_ftype_v2df
! = build_function_type_list (V2DF_type_node, V2DF_type_node, NULL_TREE);
tree v2df_ftype_double
! = build_function_type_list (V2DF_type_node, double_type_node, NULL_TREE);
tree v2df_ftype_double_double
! = build_function_type_list (V2DF_type_node,
! double_type_node, double_type_node, NULL_TREE);
tree int_ftype_v8hi_int
! = build_function_type_list (integer_type_node,
! V8HI_type_node, integer_type_node, NULL_TREE);
tree v8hi_ftype_v8hi_int_int
! = build_function_type_list (V8HI_type_node,
! V8HI_type_node, integer_type_node,
! integer_type_node, NULL_TREE);
tree v2di_ftype_v2di_int
! = build_function_type_list (V2DI_type_node,
! V2DI_type_node, integer_type_node, NULL_TREE);
tree v4si_ftype_v4si_int
! = build_function_type_list (V4SI_type_node,
! V4SI_type_node, integer_type_node, NULL_TREE);
tree v8hi_ftype_v8hi_int
! = build_function_type_list (V8HI_type_node,
! V8HI_type_node, integer_type_node, NULL_TREE);
tree v8hi_ftype_v8hi_v2di
! = build_function_type_list (V8HI_type_node,
! V8HI_type_node, V2DI_type_node, NULL_TREE);
tree v4si_ftype_v4si_v2di
! = build_function_type_list (V4SI_type_node,
! V4SI_type_node, V2DI_type_node, NULL_TREE);
tree v4si_ftype_v8hi_v8hi
! = build_function_type_list (V4SI_type_node,
! V8HI_type_node, V8HI_type_node, NULL_TREE);
tree di_ftype_v8qi_v8qi
! = build_function_type_list (long_long_unsigned_type_node,
! V8QI_type_node, V8QI_type_node, NULL_TREE);
tree v2di_ftype_v16qi_v16qi
! = build_function_type_list (V2DI_type_node,
! V16QI_type_node, V16QI_type_node, NULL_TREE);
tree int_ftype_v16qi
! = build_function_type_list (integer_type_node, V16QI_type_node, NULL_TREE);
/* Add all builtins that are more or less simple operations on two
operands. */
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.338
diff -c -p -r1.338 rs6000.c
*** config/rs6000/rs6000.c 28 Jun 2002 19:13:15 -0000 1.338
--- config/rs6000/rs6000.c 28 Jun 2002 20:19:34 -0000
*************** altivec_init_builtins (void)
*** 4281,4288 ****
struct builtin_description_predicates *dp;
size_t i;
- tree endlink = void_list_node;
-
tree pint_type_node = build_pointer_type (integer_type_node);
tree pvoid_type_node = build_pointer_type (void_type_node);
tree pshort_type_node = build_pointer_type (short_integer_type_node);
--- 4281,4286 ----
*************** altivec_init_builtins (void)
*** 4290,4712 ****
tree pfloat_type_node = build_pointer_type (float_type_node);
tree v4sf_ftype_v4sf_v4sf_v16qi
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE,
! V16QI_type_node,
! endlink))));
tree v4si_ftype_v4si_v4si_v16qi
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE,
! V16QI_type_node,
! endlink))));
tree v8hi_ftype_v8hi_v8hi_v16qi
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE,
! V16QI_type_node,
! endlink))));
tree v16qi_ftype_v16qi_v16qi_v16qi
! = build_function_type (V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE,
! V16QI_type_node,
! endlink))));
!
! /* V4SI foo (char). */
tree v4si_ftype_char
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, char_type_node, endlink));
!
! /* V8HI foo (char). */
tree v8hi_ftype_char
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, char_type_node, endlink));
!
! /* V16QI foo (char). */
tree v16qi_ftype_char
! = build_function_type (V16QI_type_node,
! tree_cons (NULL_TREE, char_type_node, endlink));
! /* V4SF foo (V4SF). */
tree v4sf_ftype_v4sf
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node, endlink));
!
! /* V4SI foo (int *). */
tree v4si_ftype_pint
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, pint_type_node, endlink));
! /* V8HI foo (short *). */
tree v8hi_ftype_pshort
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, pshort_type_node, endlink));
! /* V16QI foo (char *). */
tree v16qi_ftype_pchar
! = build_function_type (V16QI_type_node,
! tree_cons (NULL_TREE, pchar_type_node, endlink));
! /* V4SF foo (float *). */
tree v4sf_ftype_pfloat
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, pfloat_type_node, endlink));
!
! /* V8HI foo (V16QI). */
tree v8hi_ftype_v16qi
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node, endlink));
!
! /* void foo (void *, int, char/literal). */
tree void_ftype_pvoid_int_char
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pvoid_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE,
! char_type_node,
! endlink))));
!
! /* void foo (int *, V4SI). */
tree void_ftype_pint_v4si
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pint_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! endlink)));
! /* void foo (short *, V8HI). */
tree void_ftype_pshort_v8hi
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pshort_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! endlink)));
! /* void foo (char *, V16QI). */
tree void_ftype_pchar_v16qi
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pchar_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! endlink)));
! /* void foo (float *, V4SF). */
tree void_ftype_pfloat_v4sf
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, pfloat_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink)));
!
! /* void foo (V4SI). */
tree void_ftype_v4si
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! endlink));
!
! /* void foo (vint, int, void *). */
tree void_ftype_v4si_int_pvoid
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE,
! pvoid_type_node,
! endlink))));
- /* void foo (vchar, int, void *). */
tree void_ftype_v16qi_int_pvoid
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE,
! pvoid_type_node,
! endlink))));
!
! /* void foo (vshort, int, void *). */
tree void_ftype_v8hi_int_pvoid
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE,
! pvoid_type_node,
! endlink))));
!
! /* void foo (char). */
tree void_ftype_qi
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, char_type_node,
! endlink));
!
! /* void foo (void). */
tree void_ftype_void
= build_function_type (void_type_node, void_list_node);
-
- /* vshort foo (void). */
tree v8hi_ftype_void
= build_function_type (V8HI_type_node, void_list_node);
tree v4si_ftype_v4si_v4si
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! endlink)));
!
! /* These are for the unsigned 5 bit literals. */
!
tree v4sf_ftype_v4si_char
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, char_type_node,
! endlink)));
tree v4si_ftype_v4sf_char
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, char_type_node,
! endlink)));
tree v4si_ftype_v4si_char
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, char_type_node,
! endlink)));
tree v8hi_ftype_v8hi_char
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, char_type_node,
! endlink)));
tree v16qi_ftype_v16qi_char
! = build_function_type (V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, char_type_node,
! endlink)));
!
! /* These are for the unsigned 4 bit literals. */
!
tree v16qi_ftype_v16qi_v16qi_char
! = build_function_type (V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE,
! char_type_node,
! endlink))));
!
tree v8hi_ftype_v8hi_v8hi_char
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE,
! char_type_node,
! endlink))));
!
tree v4si_ftype_v4si_v4si_char
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE,
! char_type_node,
! endlink))));
!
tree v4sf_ftype_v4sf_v4sf_char
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE,
! char_type_node,
! endlink))));
!
! /* End of 4 bit literals. */
!
tree v4sf_ftype_v4sf_v4sf
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink)));
tree v4sf_ftype_v4sf_v4sf_v4si
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE,
! V4SI_type_node,
! endlink))));
tree v4sf_ftype_v4sf_v4sf_v4sf
! = build_function_type (V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE,
! V4SF_type_node,
! endlink))));
tree v4si_ftype_v4si_v4si_v4si
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE,
! V4SI_type_node,
! endlink))));
!
tree v8hi_ftype_v8hi_v8hi
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! endlink)));
tree v8hi_ftype_v8hi_v8hi_v8hi
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE,
! V8HI_type_node,
! endlink))));
tree v4si_ftype_v8hi_v8hi_v4si
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE,
! V4SI_type_node,
! endlink))));
tree v4si_ftype_v16qi_v16qi_v4si
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE,
! V4SI_type_node,
! endlink))));
!
tree v16qi_ftype_v16qi_v16qi
! = build_function_type (V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! endlink)));
!
tree v4si_ftype_v4sf_v4sf
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink)));
!
tree v4si_ftype_v4si
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node, endlink));
!
tree v8hi_ftype_v8hi
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node, endlink));
!
tree v16qi_ftype_v16qi
! = build_function_type (V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node, endlink));
!
tree v8hi_ftype_v16qi_v16qi
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! endlink)));
!
tree v4si_ftype_v8hi_v8hi
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! endlink)));
!
tree v8hi_ftype_v4si_v4si
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! endlink)));
!
tree v16qi_ftype_v8hi_v8hi
! = build_function_type (V16QI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! endlink)));
!
tree v4si_ftype_v16qi_v4si
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! endlink)));
!
tree v4si_ftype_v16qi_v16qi
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! endlink)));
!
tree v4si_ftype_v8hi_v4si
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! endlink)));
!
tree v4si_ftype_v8hi
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node, endlink));
!
tree int_ftype_v4si_v4si
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! endlink)));
!
tree int_ftype_v4sf_v4sf
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink)));
!
tree int_ftype_v16qi_v16qi
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! endlink)));
!
tree int_ftype_int_v4si_v4si
! = build_function_type
! (integer_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! tree_cons (NULL_TREE, V4SI_type_node,
! endlink))));
!
tree int_ftype_int_v4sf_v4sf
! = build_function_type
! (integer_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! tree_cons (NULL_TREE, V4SF_type_node,
! endlink))));
!
tree int_ftype_int_v8hi_v8hi
! = build_function_type
! (integer_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! endlink))));
!
tree int_ftype_int_v16qi_v16qi
! = build_function_type
! (integer_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! tree_cons (NULL_TREE, V16QI_type_node,
! endlink))));
!
tree v16qi_ftype_int_pvoid
! = build_function_type (V16QI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, pvoid_type_node,
! endlink)));
!
tree v4si_ftype_int_pvoid
! = build_function_type (V4SI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, pvoid_type_node,
! endlink)));
!
tree v8hi_ftype_int_pvoid
! = build_function_type (V8HI_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, pvoid_type_node,
! endlink)));
!
tree int_ftype_v8hi_v8hi
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! tree_cons (NULL_TREE, V8HI_type_node,
! endlink)));
def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_4sf", v4sf_ftype_pfloat, ALTIVEC_BUILTIN_LD_INTERNAL_4sf);
def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_4sf", void_ftype_pfloat_v4sf, ALTIVEC_BUILTIN_ST_INTERNAL_4sf);
--- 4288,4500 ----
tree pfloat_type_node = build_pointer_type (float_type_node);
tree v4sf_ftype_v4sf_v4sf_v16qi
! = build_function_type_list (V4SF_type_node,
! V4SF_type_node, V4SF_type_node,
! V16QI_type_node, NULL_TREE);
tree v4si_ftype_v4si_v4si_v16qi
! = build_function_type_list (V4SI_type_node,
! V4SI_type_node, V4SI_type_node,
! V16QI_type_node, NULL_TREE);
tree v8hi_ftype_v8hi_v8hi_v16qi
! = build_function_type_list (V8HI_type_node,
! V8HI_type_node, V8HI_type_node,
! V16QI_type_node, NULL_TREE);
tree v16qi_ftype_v16qi_v16qi_v16qi
! = build_function_type_list (V16QI_type_node,
! V16QI_type_node, V16QI_type_node,
! V16QI_type_node, NULL_TREE);
tree v4si_ftype_char
! = build_function_type_list (V4SI_type_node, char_type_node, NULL_TREE);
tree v8hi_ftype_char
! = build_function_type_list (V8HI_type_node, char_type_node, NULL_TREE);
tree v16qi_ftype_char
! = build_function_type_list (V16QI_type_node, char_type_node, NULL_TREE);
tree v4sf_ftype_v4sf
! = build_function_type_list (V4SF_type_node, V4SF_type_node, NULL_TREE);
tree v4si_ftype_pint
! = build_function_type_list (V4SI_type_node, pint_type_node, NULL_TREE);
tree v8hi_ftype_pshort
! = build_function_type_list (V8HI_type_node, pshort_type_node, NULL_TREE);
tree v16qi_ftype_pchar
! = build_function_type_list (V16QI_type_node, pchar_type_node, NULL_TREE);
tree v4sf_ftype_pfloat
! = build_function_type_list (V4SF_type_node, pfloat_type_node, NULL_TREE);
tree v8hi_ftype_v16qi
! = build_function_type_list (V8HI_type_node, V16QI_type_node, NULL_TREE);
tree void_ftype_pvoid_int_char
! = build_function_type_list (void_type_node,
! pvoid_type_node, integer_type_node,
! char_type_node, NULL_TREE);
tree void_ftype_pint_v4si
! = build_function_type_list (void_type_node,
! pint_type_node, V4SI_type_node, NULL_TREE);
tree void_ftype_pshort_v8hi
! = build_function_type_list (void_type_node,
! pshort_type_node, V8HI_type_node, NULL_TREE);
tree void_ftype_pchar_v16qi
! = build_function_type_list (void_type_node,
! pchar_type_node, V16QI_type_node, NULL_TREE);
tree void_ftype_pfloat_v4sf
! = build_function_type_list (void_type_node,
! pfloat_type_node, V4SF_type_node, NULL_TREE);
tree void_ftype_v4si
! = build_function_type_list (void_type_node, V4SI_type_node, NULL_TREE);
tree void_ftype_v4si_int_pvoid
! = build_function_type_list (void_type_node,
! V4SI_type_node, integer_type_node,
! pvoid_type_node, NULL_TREE);
tree void_ftype_v16qi_int_pvoid
! = build_function_type_list (void_type_node,
! V16QI_type_node, integer_type_node,
! pvoid_type_node, NULL_TREE);
tree void_ftype_v8hi_int_pvoid
! = build_function_type_list (void_type_node,
! V8HI_type_node, integer_type_node,
! pvoid_type_node, NULL_TREE);
tree void_ftype_qi
! = build_function_type_list (void_type_node, char_type_node, NULL_TREE);
tree void_ftype_void
= build_function_type (void_type_node, void_list_node);
tree v8hi_ftype_void
= build_function_type (V8HI_type_node, void_list_node);
tree v4si_ftype_v4si_v4si
! = build_function_type_list (V4SI_type_node,
! V4SI_type_node, V4SI_type_node, NULL_TREE);
tree v4sf_ftype_v4si_char
! = build_function_type_list (V4SF_type_node,
! V4SI_type_node, char_type_node, NULL_TREE);
tree v4si_ftype_v4sf_char
! = build_function_type_list (V4SI_type_node,
! V4SF_type_node, char_type_node, NULL_TREE);
tree v4si_ftype_v4si_char
! = build_function_type_list (V4SI_type_node,
! V4SI_type_node, char_type_node, NULL_TREE);
tree v8hi_ftype_v8hi_char
! = build_function_type_list (V8HI_type_node,
! V8HI_type_node, char_type_node, NULL_TREE);
tree v16qi_ftype_v16qi_char
! = build_function_type_list (V16QI_type_node,
! V16QI_type_node, char_type_node, NULL_TREE);
tree v16qi_ftype_v16qi_v16qi_char
! = build_function_type_list (V16QI_type_node,
! V16QI_type_node, V16QI_type_node,
! char_type_node, NULL_TREE);
tree v8hi_ftype_v8hi_v8hi_char
! = build_function_type_list (V8HI_type_node,
! V8HI_type_node, V8HI_type_node,
! char_type_node, NULL_TREE);
tree v4si_ftype_v4si_v4si_char
! = build_function_type_list (V4SI_type_node,
! V4SI_type_node, V4SI_type_node,
! char_type_node, NULL_TREE);
tree v4sf_ftype_v4sf_v4sf_char
! = build_function_type_list (V4SF_type_node,
! V4SF_type_node, V4SF_type_node,
! char_type_node, NULL_TREE);
tree v4sf_ftype_v4sf_v4sf
! = build_function_type_list (V4SF_type_node,
! V4SF_type_node, V4SF_type_node, NULL_TREE);
tree v4sf_ftype_v4sf_v4sf_v4si
! = build_function_type_list (V4SF_type_node,
! V4SF_type_node, V4SF_type_node,
! V4SI_type_node, NULL_TREE);
tree v4sf_ftype_v4sf_v4sf_v4sf
! = build_function_type_list (V4SF_type_node,
! V4SF_type_node, V4SF_type_node,
! V4SF_type_node, NULL_TREE);
tree v4si_ftype_v4si_v4si_v4si
! = build_function_type_list (V4SI_type_node,
! V4SI_type_node, V4SI_type_node,
! V4SI_type_node, NULL_TREE);
tree v8hi_ftype_v8hi_v8hi
! = build_function_type_list (V8HI_type_node,
! V8HI_type_node, V8HI_type_node, NULL_TREE);
tree v8hi_ftype_v8hi_v8hi_v8hi
! = build_function_type_list (V8HI_type_node,
! V8HI_type_node, V8HI_type_node,
! V8HI_type_node, NULL_TREE);
tree v4si_ftype_v8hi_v8hi_v4si
! = build_function_type_list (V4SI_type_node,
! V8HI_type_node, V8HI_type_node,
! V4SI_type_node, NULL_TREE);
tree v4si_ftype_v16qi_v16qi_v4si
! = build_function_type_list (V4SI_type_node,
! V16QI_type_node, V16QI_type_node,
! V4SI_type_node, NULL_TREE);
tree v16qi_ftype_v16qi_v16qi
! = build_function_type_list (V16QI_type_node,
! V16QI_type_node, V16QI_type_node, NULL_TREE);
tree v4si_ftype_v4sf_v4sf
! = build_function_type_list (V4SI_type_node,
! V4SF_type_node, V4SF_type_node, NULL_TREE);
tree v4si_ftype_v4si
! = build_function_type_list (V4SI_type_node, V4SI_type_node, NULL_TREE);
tree v8hi_ftype_v8hi
! = build_function_type_list (V8HI_type_node, V8HI_type_node, NULL_TREE);
tree v16qi_ftype_v16qi
! = build_function_type_list (V16QI_type_node, V16QI_type_node, NULL_TREE);
tree v8hi_ftype_v16qi_v16qi
! = build_function_type_list (V8HI_type_node,
! V16QI_type_node, V16QI_type_node, NULL_TREE);
tree v4si_ftype_v8hi_v8hi
! = build_function_type_list (V4SI_type_node,
! V8HI_type_node, V8HI_type_node, NULL_TREE);
tree v8hi_ftype_v4si_v4si
! = build_function_type_list (V8HI_type_node,
! V4SI_type_node, V4SI_type_node, NULL_TREE);
tree v16qi_ftype_v8hi_v8hi
! = build_function_type_list (V16QI_type_node,
! V8HI_type_node, V8HI_type_node, NULL_TREE);
tree v4si_ftype_v16qi_v4si
! = build_function_type_list (V4SI_type_node,
! V16QI_type_node, V4SI_type_node, NULL_TREE);
tree v4si_ftype_v16qi_v16qi
! = build_function_type_list (V4SI_type_node,
! V16QI_type_node, V16QI_type_node, NULL_TREE);
tree v4si_ftype_v8hi_v4si
! = build_function_type_list (V4SI_type_node,
! V8HI_type_node, V4SI_type_node, NULL_TREE);
tree v4si_ftype_v8hi
! = build_function_type_list (V4SI_type_node, V8HI_type_node, NULL_TREE);
tree int_ftype_v4si_v4si
! = build_function_type_list (integer_type_node,
! V4SI_type_node, V4SI_type_node, NULL_TREE);
tree int_ftype_v4sf_v4sf
! = build_function_type_list (integer_type_node,
! V4SF_type_node, V4SF_type_node, NULL_TREE);
tree int_ftype_v16qi_v16qi
! = build_function_type_list (integer_type_node,
! V16QI_type_node, V16QI_type_node, NULL_TREE);
tree int_ftype_int_v4si_v4si
! = build_function_type_list (integer_type_node,
! integer_type_node, V4SI_type_node,
! V4SI_type_node, NULL_TREE);
tree int_ftype_int_v4sf_v4sf
! = build_function_type_list (integer_type_node,
! integer_type_node, V4SF_type_node,
! V4SF_type_node, NULL_TREE);
tree int_ftype_int_v8hi_v8hi
! = build_function_type_list (integer_type_node,
! integer_type_node, V8HI_type_node,
! V8HI_type_node, NULL_TREE);
tree int_ftype_int_v16qi_v16qi
! = build_function_type_list (integer_type_node,
! integer_type_node, V16QI_type_node,
! V16QI_type_node, NULL_TREE);
tree v16qi_ftype_int_pvoid
! = build_function_type_list (V16QI_type_node,
! integer_type_node, pvoid_type_node, NULL_TREE);
tree v4si_ftype_int_pvoid
! = build_function_type_list (V4SI_type_node,
! integer_type_node, pvoid_type_node, NULL_TREE);
tree v8hi_ftype_int_pvoid
! = build_function_type_list (V8HI_type_node,
! integer_type_node, pvoid_type_node, NULL_TREE);
tree int_ftype_v8hi_v8hi
! = build_function_type_list (integer_type_node,
! V8HI_type_node, V8HI_type_node, NULL_TREE);
def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_4sf", v4sf_ftype_pfloat, ALTIVEC_BUILTIN_LD_INTERNAL_4sf);
def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_4sf", void_ftype_pfloat_v4sf, ALTIVEC_BUILTIN_ST_INTERNAL_4sf);
More information about the Gcc-patches
mailing list