* [PATCH] use build_function_type_list in the picochip backend
@ 2011-04-20 19:59 Nathan Froyd
2011-04-21 15:23 ` Hari Sandanagobalane
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Froyd @ 2011-04-20 19:59 UTC (permalink / raw)
To: gcc-patches; +Cc: hariharan
As $SUBJECT suggests. Tested with cross to picochip-elf. OK to commit?
-Nathan
* config/picochip/picochip.c (picochip_init_builtins): Call
build_function_type_list instead of build_function_type.
Delete `endlink' variable.
diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c
index 1ca95b4..4442d1e 100644
--- a/gcc/config/picochip/picochip.c
+++ b/gcc/config/picochip/picochip.c
@@ -4216,18 +4216,6 @@ void
picochip_init_builtins (void)
{
tree noreturn;
- tree endlink = void_list_node;
- tree int_endlink = tree_cons (NULL_TREE, integer_type_node, endlink);
- tree unsigned_endlink = tree_cons (NULL_TREE, unsigned_type_node, endlink);
- tree long_endlink = tree_cons (NULL_TREE, long_integer_type_node, endlink);
- tree int_int_endlink =
- tree_cons (NULL_TREE, integer_type_node, int_endlink);
- tree int_int_int_endlink =
- tree_cons (NULL_TREE, integer_type_node, int_int_endlink);
- tree int_long_endlink =
- tree_cons (NULL_TREE, integer_type_node, long_endlink);
- tree long_int_int_int_endlink =
- tree_cons (NULL_TREE, long_integer_type_node, int_int_int_endlink);
tree int_ftype_int, int_ftype_int_int;
tree long_ftype_int, long_ftype_int_int_int;
@@ -4236,36 +4224,51 @@ picochip_init_builtins (void)
tree void_ftype_void, unsigned_ftype_unsigned;
/* void func (void) */
- void_ftype_void = build_function_type (void_type_node, endlink);
+ void_ftype_void = build_function_type_list (void_type_node, NULL_TREE);
/* int func (int) */
- int_ftype_int = build_function_type (integer_type_node, int_endlink);
+ int_ftype_int = build_function_type_list (integer_type_node,
+ integer_type_node, NULL_TREE);
/* unsigned int func (unsigned int) */
- unsigned_ftype_unsigned = build_function_type (unsigned_type_node, unsigned_endlink);
+ unsigned_ftype_unsigned
+ = build_function_type_list (unsigned_type_node,
+ unsigned_type_node, NULL_TREE);
/* int func(int, int) */
int_ftype_int_int
- = build_function_type (integer_type_node, int_int_endlink);
+ = build_function_type_list (integer_type_node,
+ integer_type_node, integer_type_node,
+ NULL_TREE);
/* long func(int) */
- long_ftype_int = build_function_type (long_integer_type_node, int_endlink);
+ long_ftype_int = build_function_type_list (long_integer_type_node,
+ integer_type_node, NULL_TREE);
/* long func(int, int, int) */
long_ftype_int_int_int
- = build_function_type (long_integer_type_node, int_int_int_endlink);
+ = build_function_type_list (long_integer_type_node,
+ integer_type_node, integer_type_node,
+ integer_type_node, NULL_TREE);
/* int func(int, int, int) */
int_ftype_int_int_int
- = build_function_type (integer_type_node, int_int_int_endlink);
+ = build_function_type_list (integer_type_node,
+ integer_type_node, integer_type_node,
+ integer_type_node, NULL_TREE);
/* void func(int, long) */
void_ftype_int_long
- = build_function_type (void_type_node, int_long_endlink);
+ = build_function_type_list (void_type_node,
+ integer_type_node, long_integer_type_node,
+ NULL_TREE);
/* void func(long, int, int, int) */
void_ftype_long_int_int_int
- = build_function_type (void_type_node, long_int_int_int_endlink);
+ = build_function_type_list (void_type_node,
+ long_integer_type_node, integer_type_node,
+ integer_type_node, integer_type_node,
+ NULL_TREE);
/* Initialise the sign-bit-count function. */
add_builtin_function ("__builtin_sbc", int_ftype_int,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] use build_function_type_list in the picochip backend
2011-04-20 19:59 [PATCH] use build_function_type_list in the picochip backend Nathan Froyd
@ 2011-04-21 15:23 ` Hari Sandanagobalane
0 siblings, 0 replies; 2+ messages in thread
From: Hari Sandanagobalane @ 2011-04-21 15:23 UTC (permalink / raw)
To: Nathan Froyd; +Cc: gcc-patches, hariharan
Looks good to me Nathan. Please go ahead and commit.
Thanks
Hari
On 20/04/11 20:51, Nathan Froyd wrote:
> As $SUBJECT suggests. Tested with cross to picochip-elf. OK to commit?
>
> -Nathan
>
> * config/picochip/picochip.c (picochip_init_builtins): Call
> build_function_type_list instead of build_function_type.
> Delete `endlink' variable.
>
> diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c
> index 1ca95b4..4442d1e 100644
> --- a/gcc/config/picochip/picochip.c
> +++ b/gcc/config/picochip/picochip.c
> @@ -4216,18 +4216,6 @@ void
> picochip_init_builtins (void)
> {
> tree noreturn;
> - tree endlink = void_list_node;
> - tree int_endlink = tree_cons (NULL_TREE, integer_type_node, endlink);
> - tree unsigned_endlink = tree_cons (NULL_TREE, unsigned_type_node, endlink);
> - tree long_endlink = tree_cons (NULL_TREE, long_integer_type_node, endlink);
> - tree int_int_endlink =
> - tree_cons (NULL_TREE, integer_type_node, int_endlink);
> - tree int_int_int_endlink =
> - tree_cons (NULL_TREE, integer_type_node, int_int_endlink);
> - tree int_long_endlink =
> - tree_cons (NULL_TREE, integer_type_node, long_endlink);
> - tree long_int_int_int_endlink =
> - tree_cons (NULL_TREE, long_integer_type_node, int_int_int_endlink);
>
> tree int_ftype_int, int_ftype_int_int;
> tree long_ftype_int, long_ftype_int_int_int;
> @@ -4236,36 +4224,51 @@ picochip_init_builtins (void)
> tree void_ftype_void, unsigned_ftype_unsigned;
>
> /* void func (void) */
> - void_ftype_void = build_function_type (void_type_node, endlink);
> + void_ftype_void = build_function_type_list (void_type_node, NULL_TREE);
>
> /* int func (int) */
> - int_ftype_int = build_function_type (integer_type_node, int_endlink);
> + int_ftype_int = build_function_type_list (integer_type_node,
> + integer_type_node, NULL_TREE);
>
> /* unsigned int func (unsigned int) */
> - unsigned_ftype_unsigned = build_function_type (unsigned_type_node, unsigned_endlink);
> + unsigned_ftype_unsigned
> + = build_function_type_list (unsigned_type_node,
> + unsigned_type_node, NULL_TREE);
>
> /* int func(int, int) */
> int_ftype_int_int
> - = build_function_type (integer_type_node, int_int_endlink);
> + = build_function_type_list (integer_type_node,
> + integer_type_node, integer_type_node,
> + NULL_TREE);
>
> /* long func(int) */
> - long_ftype_int = build_function_type (long_integer_type_node, int_endlink);
> + long_ftype_int = build_function_type_list (long_integer_type_node,
> + integer_type_node, NULL_TREE);
>
> /* long func(int, int, int) */
> long_ftype_int_int_int
> - = build_function_type (long_integer_type_node, int_int_int_endlink);
> + = build_function_type_list (long_integer_type_node,
> + integer_type_node, integer_type_node,
> + integer_type_node, NULL_TREE);
>
> /* int func(int, int, int) */
> int_ftype_int_int_int
> - = build_function_type (integer_type_node, int_int_int_endlink);
> + = build_function_type_list (integer_type_node,
> + integer_type_node, integer_type_node,
> + integer_type_node, NULL_TREE);
>
> /* void func(int, long) */
> void_ftype_int_long
> - = build_function_type (void_type_node, int_long_endlink);
> + = build_function_type_list (void_type_node,
> + integer_type_node, long_integer_type_node,
> + NULL_TREE);
>
> /* void func(long, int, int, int) */
> void_ftype_long_int_int_int
> - = build_function_type (void_type_node, long_int_int_int_endlink);
> + = build_function_type_list (void_type_node,
> + long_integer_type_node, integer_type_node,
> + integer_type_node, integer_type_node,
> + NULL_TREE);
>
> /* Initialise the sign-bit-count function. */
> add_builtin_function ("__builtin_sbc", int_ftype_int,
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-21 15:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-20 19:59 [PATCH] use build_function_type_list in the picochip backend Nathan Froyd
2011-04-21 15:23 ` Hari Sandanagobalane
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).