diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2002-06-30 01:19:58 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2002-06-30 01:19:58 +0000 |
commit | b4de2f7db73c5331446fe1af9678a874d4958bae (patch) | |
tree | 551f8946278e801b4d603f4a0a4dbc717e5588fe | |
parent | 1691051fc987751fdc596faf2069be5fa7be3cee (diff) | |
download | gcc-b4de2f7db73c5331446fe1af9678a874d4958bae.zip gcc-b4de2f7db73c5331446fe1af9678a874d4958bae.tar.gz gcc-b4de2f7db73c5331446fe1af9678a874d4958bae.tar.bz2 |
i386.c (ix86_init_mmx_sse_builtins): Use build_function_type_list instead of build_function_type.
2002-06-29 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.
From-SVN: r55109
-rw-r--r-- | gcc/ChangeLog | 17 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 19 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 458 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 44 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 488 | ||||
-rw-r--r-- | gcc/tree.c | 25 | ||||
-rw-r--r-- | gcc/tree.h | 1 |
8 files changed, 357 insertions, 700 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b4e21ee..a1ec75b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2002-06-29 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. + 2002-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * collect2.c (scan_prog_file): Fix typo in message. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 24e8c5c..b109328 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -6498,22 +6498,17 @@ alpha_init_builtins () 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)); + 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 (long_integer_type_node, - tree_cons (NULL_TREE, - long_integer_type_node, - tree_cons (NULL_TREE, - long_integer_type_node, - void_list_node))); + ftype = build_function_type_list (long_integer_type_node, + long_integer_type_node, + long_integer_type_node, NULL_TREE); p = two_arg_builtins; for (i = 0; i < ARRAY_SIZE (two_arg_builtins); ++i, ++p) @@ -6524,9 +6519,7 @@ alpha_init_builtins () 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)); + 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); } diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 5dce15b3..04212db 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -9314,10 +9314,9 @@ arm_init_builtins () tree int_ftype_int, void_ftype_pchar; - /* void func (void *) */ + /* void func (char *) */ void_ftype_pchar - = build_function_type (void_type_node, - tree_cons (NULL_TREE, pchar_type_node, endlink)); + = build_function_type_list (void_type_node, pchar_type_node, NULL_TREE); /* int func (int) */ int_ftype_int diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index f6b1101..1411bcd 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -11823,7 +11823,6 @@ ix86_init_mmx_sse_builtins () { 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); @@ -11833,405 +11832,252 @@ ix86_init_mmx_sse_builtins () /* 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))); + = build_function_type_list (integer_type_node, + V4SF_type_node, V4SF_type_node, NULL_TREE); 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))); + = 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 (integer_type_node, - tree_cons (NULL_TREE, V4SF_type_node, - endlink)); + = build_function_type_list (integer_type_node, + V4SF_type_node, NULL_TREE); tree int_ftype_v8qi - = build_function_type (integer_type_node, - tree_cons (NULL_TREE, V8QI_type_node, - endlink)); + = build_function_type_list (integer_type_node, V8QI_type_node, NULL_TREE); 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))); + = build_function_type_list (V4SF_type_node, + V4SF_type_node, integer_type_node, NULL_TREE); 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))); + = build_function_type_list (V4SF_type_node, + V4SF_type_node, V2SI_type_node, NULL_TREE); 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))); + = build_function_type_list (integer_type_node, + V4HI_type_node, integer_type_node, NULL_TREE); 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)))); + = build_function_type_list (V4HI_type_node, + integer_type_node, integer_type_node, + NULL_TREE); /* 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))); + = build_function_type_list (V8QI_type_node, + V4HI_type_node, V4HI_type_node, NULL_TREE); 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))); + = build_function_type_list (V4HI_type_node, + V2SI_type_node, V2SI_type_node, NULL_TREE); 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)))); + = 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 (V2SI_type_node, - tree_cons (NULL_TREE, V4HI_type_node, - tree_cons (NULL_TREE, V4HI_type_node, - endlink))); + = build_function_type_list (V2SI_type_node, + V4HI_type_node, V4HI_type_node, NULL_TREE); 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))); + = 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 (V4HI_type_node, - tree_cons (NULL_TREE, V4HI_type_node, - tree_cons (NULL_TREE, - long_long_integer_type_node, - endlink))); + = 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 (V2SI_type_node, - tree_cons (NULL_TREE, V2SI_type_node, - tree_cons (NULL_TREE, - long_long_integer_type_node, - endlink))); + = 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, endlink); + = build_function_type (void_type_node, void_list_node); tree void_ftype_unsigned - = build_function_type (void_type_node, - tree_cons (NULL_TREE, unsigned_type_node, - endlink)); + = build_function_type_list (void_type_node, unsigned_type_node, NULL_TREE); tree unsigned_ftype_void - = build_function_type (unsigned_type_node, endlink); + = build_function_type (unsigned_type_node, void_list_node); tree di_ftype_void - = build_function_type (long_long_unsigned_type_node, endlink); + = build_function_type (long_long_unsigned_type_node, void_list_node); tree v4sf_ftype_void - = build_function_type (V4SF_type_node, endlink); + = build_function_type (V4SF_type_node, void_list_node); tree v2si_ftype_v4sf - = build_function_type (V2SI_type_node, - tree_cons (NULL_TREE, V4SF_type_node, - endlink)); + = build_function_type_list (V2SI_type_node, V4SF_type_node, NULL_TREE); /* 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); + = 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 (V4SF_type_node, - tree_cons (NULL_TREE, pfloat_type_node, - endlink)); + = build_function_type_list (V4SF_type_node, pfloat_type_node, NULL_TREE); /* @@@ 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))); + = build_function_type_list (V4SF_type_node, + V4SF_type_node, pv2di_type_node, NULL_TREE); 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))); + = build_function_type_list (void_type_node, + pv2di_type_node, V4SF_type_node, NULL_TREE); 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))); + = build_function_type_list (void_type_node, + pfloat_type_node, V4SF_type_node, NULL_TREE); 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))); + = 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 (void_type_node, - tree_cons (NULL_TREE, pv2di_type_node, - tree_cons (NULL_TREE, - V2DI_type_node, - endlink))); + = 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 (V4SF_type_node, - tree_cons (NULL_TREE, V4SF_type_node, - endlink)); + = build_function_type_list (V4SF_type_node, V4SF_type_node, NULL_TREE); /* 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))); + = build_function_type_list (V4SF_type_node, + V4SF_type_node, V4SF_type_node, NULL_TREE); 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))); + = build_function_type_list (V8QI_type_node, + V8QI_type_node, V8QI_type_node, NULL_TREE); 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))); + = build_function_type_list (V4HI_type_node, + V4HI_type_node, V4HI_type_node, NULL_TREE); 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))); + = build_function_type_list (V2SI_type_node, + V2SI_type_node, V2SI_type_node, NULL_TREE); 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))); + = 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 (V2SI_type_node, - tree_cons (NULL_TREE, V2SF_type_node, - endlink)); + = build_function_type_list (V2SI_type_node, V2SFmode, NULL_TREE); tree v2sf_ftype_v2si - = build_function_type (V2SF_type_node, - tree_cons (NULL_TREE, V2SI_type_node, - endlink)); + = build_function_type_list (V2SF_type_node, V2SI_type_node, NULL_TREE); tree v2si_ftype_v2si - = build_function_type (V2SI_type_node, - tree_cons (NULL_TREE, V2SI_type_node, - endlink)); + = build_function_type_list (V2SI_type_node, V2SI_type_node, NULL_TREE); tree v2sf_ftype_v2sf - = build_function_type (V2SF_type_node, - tree_cons (NULL_TREE, V2SF_type_node, - endlink)); + = build_function_type_list (V2SF_type_node, V2SF_type_node, NULL_TREE); 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))); + = build_function_type_list (V2SF_type_node, + V2SF_type_node, V2SF_type_node, NULL_TREE); 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))); + = 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 (integer_type_node, - tree_cons (NULL_TREE, V2DF_type_node, - tree_cons (NULL_TREE, V2DF_type_node, endlink))); + = 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, endlink); + = build_function_type (intTI_type_node, void_list_node); 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))); + = build_function_type_list (intTI_type_node, + intTI_type_node, intTI_type_node, NULL_TREE); tree void_ftype_pvoid - = build_function_type (void_type_node, - tree_cons (NULL_TREE, ptr_type_node, endlink)); + = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE); tree v2di_ftype_di - = build_function_type (V2DI_type_node, - tree_cons (NULL_TREE, long_long_unsigned_type_node, - endlink)); + = build_function_type_list (V2DI_type_node, + long_long_unsigned_type_node, NULL_TREE); tree v4sf_ftype_v4si - = build_function_type (V4SF_type_node, - tree_cons (NULL_TREE, V4SI_type_node, endlink)); + = build_function_type_list (V4SF_type_node, V4SI_type_node, NULL_TREE); tree v4si_ftype_v4sf - = build_function_type (V4SI_type_node, - tree_cons (NULL_TREE, V4SF_type_node, endlink)); + = build_function_type_list (V4SI_type_node, V4SF_type_node, NULL_TREE); tree v2df_ftype_v4si - = build_function_type (V2DF_type_node, - tree_cons (NULL_TREE, V4SI_type_node, endlink)); + = build_function_type_list (V2DF_type_node, V4SI_type_node, NULL_TREE); tree v4si_ftype_v2df - = build_function_type (V4SI_type_node, - tree_cons (NULL_TREE, V2DF_type_node, endlink)); + = build_function_type_list (V4SI_type_node, V2DF_type_node, NULL_TREE); tree v2si_ftype_v2df - = build_function_type (V2SI_type_node, - tree_cons (NULL_TREE, V2DF_type_node, endlink)); + = build_function_type_list (V2SI_type_node, V2DF_type_node, NULL_TREE); tree v4sf_ftype_v2df - = build_function_type (V4SF_type_node, - tree_cons (NULL_TREE, V2DF_type_node, endlink)); + = build_function_type_list (V4SF_type_node, V2DF_type_node, NULL_TREE); tree v2df_ftype_v2si - = build_function_type (V2DF_type_node, - tree_cons (NULL_TREE, V2SI_type_node, endlink)); + = build_function_type_list (V2DF_type_node, V2SI_type_node, NULL_TREE); tree v2df_ftype_v4sf - = build_function_type (V2DF_type_node, - tree_cons (NULL_TREE, V4SF_type_node, endlink)); + = build_function_type_list (V2DF_type_node, V4SF_type_node, NULL_TREE); tree int_ftype_v2df - = build_function_type (integer_type_node, - tree_cons (NULL_TREE, V2DF_type_node, endlink)); + = build_function_type_list (integer_type_node, V2DF_type_node, NULL_TREE); 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))); + = build_function_type_list (V2DF_type_node, + V2DF_type_node, integer_type_node, NULL_TREE); 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))); + = build_function_type_list (V4SF_type_node, + V4SF_type_node, V2DF_type_node, NULL_TREE); 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))); + = build_function_type_list (V2DF_type_node, + V2DF_type_node, V4SF_type_node, NULL_TREE); 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)))); + = 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 (V2DF_type_node, - tree_cons (NULL_TREE, V2DF_type_node, - tree_cons (NULL_TREE, pv2si_type_node, - endlink))); + = build_function_type_list (V2DF_type_node, + V2DF_type_node, pv2si_type_node, NULL_TREE); 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))); + = build_function_type_list (void_type_node, + pv2si_type_node, V2DF_type_node, NULL_TREE); 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))); + = build_function_type_list (void_type_node, + pdouble_type_node, V2DF_type_node, NULL_TREE); 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))); + = build_function_type_list (void_type_node, + pint_type_node, integer_type_node, NULL_TREE); tree void_ftype_v16qi_v16qi_pchar - = build_function_type (void_type_node, maskmovdqu_args); + = 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 (V2DF_type_node, - tree_cons (NULL_TREE, pdouble_type_node, - endlink)); + = build_function_type_list (V2DF_type_node, pdouble_type_node, NULL_TREE); 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))); + = build_function_type_list (V2DF_type_node, + V2DF_type_node, V2DF_type_node, NULL_TREE); 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))); + = build_function_type_list (V16QI_type_node, + V16QI_type_node, V16QI_type_node, NULL_TREE); 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))); + = build_function_type_list (V8HI_type_node, + V8HI_type_node, V8HI_type_node, NULL_TREE); 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))); + = build_function_type_list (V4SI_type_node, + V4SI_type_node, V4SI_type_node, NULL_TREE); 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))); + = build_function_type_list (V2DI_type_node, + V2DI_type_node, V2DI_type_node, NULL_TREE); 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))); + = build_function_type_list (V2DI_type_node, + V2DF_type_node, V2DF_type_node, NULL_TREE); tree v2df_ftype_v2df - = build_function_type (V2DF_type_node, - tree_cons (NULL_TREE, V2DF_type_node, - endlink)); + = build_function_type_list (V2DF_type_node, V2DF_type_node, NULL_TREE); tree v2df_ftype_double - = build_function_type (V2DF_type_node, - tree_cons (NULL_TREE, double_type_node, - endlink)); + = build_function_type_list (V2DF_type_node, double_type_node, NULL_TREE); 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))); + = build_function_type_list (V2DF_type_node, + double_type_node, double_type_node, NULL_TREE); 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))); + = build_function_type_list (integer_type_node, + V8HI_type_node, integer_type_node, NULL_TREE); 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)))); + = 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 (V2DI_type_node, - tree_cons (NULL_TREE, V2DI_type_node, - tree_cons (NULL_TREE, integer_type_node, - endlink))); + = build_function_type_list (V2DI_type_node, + V2DI_type_node, integer_type_node, NULL_TREE); 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))); + = build_function_type_list (V4SI_type_node, + V4SI_type_node, integer_type_node, NULL_TREE); 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))); + = build_function_type_list (V8HI_type_node, + V8HI_type_node, integer_type_node, NULL_TREE); 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))); + = build_function_type_list (V8HI_type_node, + V8HI_type_node, V2DI_type_node, NULL_TREE); 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))); + = build_function_type_list (V4SI_type_node, + V4SI_type_node, V2DI_type_node, NULL_TREE); 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))); + = build_function_type_list (V4SI_type_node, + V8HI_type_node, V8HI_type_node, NULL_TREE); 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))); + = 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 (V2DI_type_node, - tree_cons (NULL_TREE, V16QI_type_node, - tree_cons (NULL_TREE, V16QI_type_node, - endlink))); + = build_function_type_list (V2DI_type_node, + V16QI_type_node, V16QI_type_node, NULL_TREE); tree int_ftype_v16qi - = build_function_type (integer_type_node, - tree_cons (NULL_TREE, V16QI_type_node, endlink)); + = 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. */ diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index e7ef534..4f7380a 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -7506,52 +7506,40 @@ ia64_init_builtins () { 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)))); + = 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 (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)))); + = 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, endlink); + = build_function_type (void_type_node, void_list_node); /* __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))); + = 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 (long_integer_type_node, - tree_cons (NULL_TREE, pdi_type_node, - tree_cons (NULL_TREE, long_integer_type_node, - endlink))); + = 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 (void_type_node, tree_cons (NULL_TREE, psi_type_node, - endlink)); + = build_function_type_list (void_type_node, psi_type_node, NULL_TREE); /* __sync_lock_release_di */ tree void_ftype_pdi - = build_function_type (void_type_node, tree_cons (NULL_TREE, pdi_type_node, - endlink)); + = 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) @@ -7578,11 +7566,11 @@ ia64_init_builtins () IA64_BUILTIN_LOCK_RELEASE_DI); def_builtin ("__builtin_ia64_bsp", - build_function_type (ptr_type_node, endlink), + build_function_type (ptr_type_node, void_list_node), IA64_BUILTIN_BSP); def_builtin ("__builtin_ia64_flushrs", - build_function_type (void_type_node, endlink), + build_function_type (void_type_node, void_list_node), IA64_BUILTIN_FLUSHRS); def_builtin ("__sync_fetch_and_add_si", si_ftype_psi_si, diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 8420d7b..20cb299 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4281,8 +4281,6 @@ altivec_init_builtins (void) 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); @@ -4290,423 +4288,213 @@ altivec_init_builtins (void) 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)))); + = 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 (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)))); + = 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 (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)))); + = 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 (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). */ + = 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 (V4SI_type_node, - tree_cons (NULL_TREE, char_type_node, endlink)); - - /* V8HI foo (char). */ + = build_function_type_list (V4SI_type_node, char_type_node, NULL_TREE); tree v8hi_ftype_char - = build_function_type (V8HI_type_node, - tree_cons (NULL_TREE, char_type_node, endlink)); - - /* V16QI foo (char). */ + = build_function_type_list (V8HI_type_node, char_type_node, NULL_TREE); tree v16qi_ftype_char - = build_function_type (V16QI_type_node, - tree_cons (NULL_TREE, char_type_node, endlink)); - /* V4SF foo (V4SF). */ + = build_function_type_list (V16QI_type_node, char_type_node, NULL_TREE); tree v4sf_ftype_v4sf - = build_function_type (V4SF_type_node, - tree_cons (NULL_TREE, V4SF_type_node, endlink)); - - /* V4SI foo (int *). */ + = build_function_type_list (V4SF_type_node, V4SF_type_node, NULL_TREE); tree v4si_ftype_pint - = build_function_type (V4SI_type_node, - tree_cons (NULL_TREE, pint_type_node, endlink)); - /* V8HI foo (short *). */ + = build_function_type_list (V4SI_type_node, pint_type_node, NULL_TREE); tree v8hi_ftype_pshort - = build_function_type (V8HI_type_node, - tree_cons (NULL_TREE, pshort_type_node, endlink)); - /* V16QI foo (char *). */ + = build_function_type_list (V8HI_type_node, pshort_type_node, NULL_TREE); tree v16qi_ftype_pchar - = build_function_type (V16QI_type_node, - tree_cons (NULL_TREE, pchar_type_node, endlink)); - /* V4SF foo (float *). */ + = build_function_type_list (V16QI_type_node, pchar_type_node, NULL_TREE); tree v4sf_ftype_pfloat - = build_function_type (V4SF_type_node, - tree_cons (NULL_TREE, pfloat_type_node, endlink)); - - /* V8HI foo (V16QI). */ + = build_function_type_list (V4SF_type_node, pfloat_type_node, NULL_TREE); tree v8hi_ftype_v16qi - = build_function_type (V8HI_type_node, - tree_cons (NULL_TREE, V16QI_type_node, endlink)); - - /* void foo (void *, int, char/literal). */ + = build_function_type_list (V8HI_type_node, V16QI_type_node, NULL_TREE); 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). */ + = 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 (void_type_node, - tree_cons (NULL_TREE, pint_type_node, - tree_cons (NULL_TREE, V4SI_type_node, - endlink))); - /* void foo (short *, V8HI). */ + = build_function_type_list (void_type_node, + pint_type_node, V4SI_type_node, NULL_TREE); 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). */ + = build_function_type_list (void_type_node, + pshort_type_node, V8HI_type_node, NULL_TREE); 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). */ + = build_function_type_list (void_type_node, + pchar_type_node, V16QI_type_node, NULL_TREE); 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). */ + = build_function_type_list (void_type_node, + pfloat_type_node, V4SF_type_node, NULL_TREE); tree void_ftype_v4si - = build_function_type (void_type_node, - tree_cons (NULL_TREE, V4SI_type_node, - endlink)); - - /* void foo (vint, int, void *). */ + = build_function_type_list (void_type_node, V4SI_type_node, NULL_TREE); 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 *). */ + = 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 (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 *). */ + = 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 (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). */ + = 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 (void_type_node, - tree_cons (NULL_TREE, char_type_node, - endlink)); - - /* void foo (void). */ + = 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); - - /* 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. */ - + = build_function_type_list (V4SI_type_node, + V4SI_type_node, V4SI_type_node, NULL_TREE); 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))); + = build_function_type_list (V4SF_type_node, + V4SI_type_node, char_type_node, NULL_TREE); 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))); + = build_function_type_list (V4SI_type_node, + V4SF_type_node, char_type_node, NULL_TREE); 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))); + = build_function_type_list (V4SI_type_node, + V4SI_type_node, char_type_node, NULL_TREE); 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))); + = build_function_type_list (V8HI_type_node, + V8HI_type_node, char_type_node, NULL_TREE); 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. */ - + = build_function_type_list (V16QI_type_node, + V16QI_type_node, char_type_node, NULL_TREE); 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)))); - + = 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 (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)))); - + = 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 (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)))); - + = 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 (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. */ - + = 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 (V4SF_type_node, - tree_cons (NULL_TREE, V4SF_type_node, - tree_cons (NULL_TREE, V4SF_type_node, - endlink))); + = build_function_type_list (V4SF_type_node, + V4SF_type_node, V4SF_type_node, NULL_TREE); 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)))); + = 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 (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)))); + = 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 (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)))); - + = 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 (V8HI_type_node, - tree_cons (NULL_TREE, V8HI_type_node, - tree_cons (NULL_TREE, V8HI_type_node, - endlink))); + = build_function_type_list (V8HI_type_node, + V8HI_type_node, V8HI_type_node, NULL_TREE); 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)))); + = 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 (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)))); + = 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 (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)))); - + = 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 (V16QI_type_node, - tree_cons (NULL_TREE, V16QI_type_node, - tree_cons (NULL_TREE, V16QI_type_node, - endlink))); - + = build_function_type_list (V16QI_type_node, + V16QI_type_node, V16QI_type_node, NULL_TREE); 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))); - + = build_function_type_list (V4SI_type_node, + V4SF_type_node, V4SF_type_node, NULL_TREE); tree v4si_ftype_v4si - = build_function_type (V4SI_type_node, - tree_cons (NULL_TREE, V4SI_type_node, endlink)); - + = build_function_type_list (V4SI_type_node, V4SI_type_node, NULL_TREE); tree v8hi_ftype_v8hi - = build_function_type (V8HI_type_node, - tree_cons (NULL_TREE, V8HI_type_node, endlink)); - + = build_function_type_list (V8HI_type_node, V8HI_type_node, NULL_TREE); tree v16qi_ftype_v16qi - = build_function_type (V16QI_type_node, - tree_cons (NULL_TREE, V16QI_type_node, endlink)); - + = build_function_type_list (V16QI_type_node, V16QI_type_node, NULL_TREE); 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))); - + = build_function_type_list (V8HI_type_node, + V16QI_type_node, V16QI_type_node, NULL_TREE); 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))); - + = build_function_type_list (V4SI_type_node, + V8HI_type_node, V8HI_type_node, NULL_TREE); 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))); - + = build_function_type_list (V8HI_type_node, + V4SI_type_node, V4SI_type_node, NULL_TREE); 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))); - + = build_function_type_list (V16QI_type_node, + V8HI_type_node, V8HI_type_node, NULL_TREE); 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))); - + = build_function_type_list (V4SI_type_node, + V16QI_type_node, V4SI_type_node, NULL_TREE); 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))); - + = build_function_type_list (V4SI_type_node, + V16QI_type_node, V16QI_type_node, NULL_TREE); 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))); - + = build_function_type_list (V4SI_type_node, + V8HI_type_node, V4SI_type_node, NULL_TREE); tree v4si_ftype_v8hi - = build_function_type (V4SI_type_node, - tree_cons (NULL_TREE, V8HI_type_node, endlink)); - + = build_function_type_list (V4SI_type_node, V8HI_type_node, NULL_TREE); 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))); - + = build_function_type_list (integer_type_node, + V4SI_type_node, V4SI_type_node, NULL_TREE); 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))); - + = build_function_type_list (integer_type_node, + V4SF_type_node, V4SF_type_node, NULL_TREE); 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))); - + = build_function_type_list (integer_type_node, + V16QI_type_node, V16QI_type_node, NULL_TREE); 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)))); - + = 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 - (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)))); - + = 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 - (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)))); - + = 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 - (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)))); - + = 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 (V16QI_type_node, - tree_cons (NULL_TREE, integer_type_node, - tree_cons (NULL_TREE, pvoid_type_node, - endlink))); - + = build_function_type_list (V16QI_type_node, + integer_type_node, pvoid_type_node, NULL_TREE); 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))); - + = build_function_type_list (V4SI_type_node, + integer_type_node, pvoid_type_node, NULL_TREE); 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))); - + = build_function_type_list (V8HI_type_node, + integer_type_node, pvoid_type_node, NULL_TREE); 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))); + = 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); @@ -3801,6 +3801,31 @@ build_function_type (value_type, arg_types) 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, ...)) +{ + tree t, args, last; + + VA_OPEN (p, first); + VA_FIXEDARG (p, tree, first); + + t = va_arg (p, tree); + for (args = NULL_TREE; t != NULL_TREE; t = va_arg (p, tree)) + args = tree_cons (NULL_TREE, t, args); + + last = args; + args = nreverse (args); + TREE_CHAIN (last) = void_list_node; + args = build_function_type (first, args); + + VA_CLOSE (p); + return 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. @@ -2178,6 +2178,7 @@ extern tree build_index_type PARAMS ((tree)); 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)); |