public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/wschmidt/heads/builtins4)] rs6000: Fix overload matching of arg types
@ 2020-12-21 15:12 William Schmidt
0 siblings, 0 replies; 2+ messages in thread
From: William Schmidt @ 2020-12-21 15:12 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b025f3ff04098e857ff5381a5759566928ab82a9
commit b025f3ff04098e857ff5381a5759566928ab82a9
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date: Sun Dec 20 11:30:57 2020 -0600
rs6000: Fix overload matching of arg types
2020-12-20 Bill Schmidt <wschmidt@linux.ibm.com>
* config/rs6000/rs6000-c.c (altivec_build_new_resolved_builtin):
Use ret_type as a separate parameter, not taken from fntype.
(altivec_resolve_new_overloaded_builtin): Resolve argument types
to built-in type, but return type to instance type.
Diff:
---
gcc/config/rs6000/rs6000-c.c | 38 ++++++++++++++++++++++++--------------
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index ba6ac56e7b3..43f8cbf880a 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -39,7 +39,7 @@
static tree
-altivec_build_new_resolved_builtin (tree *, int, tree,
+altivec_build_new_resolved_builtin (tree *, int, tree, tree,
rs6000_gen_builtins, rs6000_gen_builtins);
static tree
altivec_resolve_new_overloaded_builtin (location_t, tree, void *);
@@ -1954,10 +1954,10 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
static tree
altivec_build_new_resolved_builtin (tree *args, int n, tree fntype,
+ tree ret_type,
rs6000_gen_builtins bif_id,
rs6000_gen_builtins ovld_id)
{
- tree ret_type = TREE_TYPE (fntype);
tree argtypes = TYPE_ARG_TYPES (fntype);
tree arg_type[MAX_OVLD_ARGS];
tree fndecl = rs6000_builtin_decls_x[bif_id];
@@ -2836,10 +2836,13 @@ altivec_resolve_new_overloaded_builtin (location_t loc, tree fndecl,
{
if (rs6000_builtin_decl (instance->bifid, false) != error_mark_node
&& rs6000_new_builtin_is_supported_p (instance->bifid))
- return altivec_build_new_resolved_builtin (args, n,
- instance->fntype,
- instance->bifid,
- fcode);
+ {
+ tree ret_type = TREE_TYPE (instance->fntype);
+ return altivec_build_new_resolved_builtin (args, n, fntype,
+ ret_type,
+ instance->bifid,
+ fcode);
+ }
else
unsupported_builtin = true;
}
@@ -2891,10 +2894,13 @@ altivec_resolve_new_overloaded_builtin (location_t loc, tree fndecl,
{
if (rs6000_builtin_decl (instance->bifid, false) != error_mark_node
&& rs6000_new_builtin_is_supported_p (instance->bifid))
- return altivec_build_new_resolved_builtin (args, n,
- instance->fntype,
- instance->bifid,
- fcode);
+ {
+ tree ret_type = TREE_TYPE (instance->fntype);
+ return altivec_build_new_resolved_builtin (args, n, fntype,
+ ret_type,
+ instance->bifid,
+ fcode);
+ }
else
unsupported_builtin = true;
}
@@ -2925,10 +2931,14 @@ altivec_resolve_new_overloaded_builtin (location_t loc, tree fndecl,
if (rs6000_builtin_decl (instance->bifid, false) != error_mark_node
&& rs6000_new_builtin_is_supported_p (instance->bifid))
- return altivec_build_new_resolved_builtin (args, n,
- instance->fntype,
- instance->bifid,
- fcode);
+ {
+ tree fntype = rs6000_builtin_info_x[instance->bifid].fntype;
+ tree ret_type = TREE_TYPE (instance->fntype);
+ return altivec_build_new_resolved_builtin (args, n, fntype,
+ ret_type,
+ instance->bifid,
+ fcode);
+ }
else
{
unsupported_builtin = true;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/wschmidt/heads/builtins4)] rs6000: Fix overload matching of arg types
@ 2021-02-07 18:16 William Schmidt
0 siblings, 0 replies; 2+ messages in thread
From: William Schmidt @ 2021-02-07 18:16 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:a4986e92a24342364376f99b99853c3bc1548fa5
commit a4986e92a24342364376f99b99853c3bc1548fa5
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date: Sun Dec 20 11:30:57 2020 -0600
rs6000: Fix overload matching of arg types
2020-12-20 Bill Schmidt <wschmidt@linux.ibm.com>
* config/rs6000/rs6000-c.c (altivec_build_new_resolved_builtin):
Use ret_type as a separate parameter, not taken from fntype.
(altivec_resolve_new_overloaded_builtin): Resolve argument types
to built-in type, but return type to instance type.
Diff:
---
gcc/config/rs6000/rs6000-c.c | 38 ++++++++++++++++++++++++--------------
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index b5b54c8b22b..e879357636b 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -39,7 +39,7 @@
static tree
-altivec_build_new_resolved_builtin (tree *, int, tree,
+altivec_build_new_resolved_builtin (tree *, int, tree, tree,
rs6000_gen_builtins, rs6000_gen_builtins);
static tree
altivec_resolve_new_overloaded_builtin (location_t, tree, void *);
@@ -1956,10 +1956,10 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
static tree
altivec_build_new_resolved_builtin (tree *args, int n, tree fntype,
+ tree ret_type,
rs6000_gen_builtins bif_id,
rs6000_gen_builtins ovld_id)
{
- tree ret_type = TREE_TYPE (fntype);
tree argtypes = TYPE_ARG_TYPES (fntype);
tree arg_type[MAX_OVLD_ARGS];
tree fndecl = rs6000_builtin_decls_x[bif_id];
@@ -2854,10 +2854,13 @@ altivec_resolve_new_overloaded_builtin (location_t loc, tree fndecl,
{
if (rs6000_builtin_decl (instance->bifid, false) != error_mark_node
&& rs6000_new_builtin_is_supported_p (instance->bifid))
- return altivec_build_new_resolved_builtin (args, n,
- instance->fntype,
- instance->bifid,
- fcode);
+ {
+ tree ret_type = TREE_TYPE (instance->fntype);
+ return altivec_build_new_resolved_builtin (args, n, fntype,
+ ret_type,
+ instance->bifid,
+ fcode);
+ }
else
unsupported_builtin = true;
}
@@ -2909,10 +2912,13 @@ altivec_resolve_new_overloaded_builtin (location_t loc, tree fndecl,
{
if (rs6000_builtin_decl (instance->bifid, false) != error_mark_node
&& rs6000_new_builtin_is_supported_p (instance->bifid))
- return altivec_build_new_resolved_builtin (args, n,
- instance->fntype,
- instance->bifid,
- fcode);
+ {
+ tree ret_type = TREE_TYPE (instance->fntype);
+ return altivec_build_new_resolved_builtin (args, n, fntype,
+ ret_type,
+ instance->bifid,
+ fcode);
+ }
else
unsupported_builtin = true;
}
@@ -2943,10 +2949,14 @@ altivec_resolve_new_overloaded_builtin (location_t loc, tree fndecl,
if (rs6000_builtin_decl (instance->bifid, false) != error_mark_node
&& rs6000_new_builtin_is_supported_p (instance->bifid))
- return altivec_build_new_resolved_builtin (args, n,
- instance->fntype,
- instance->bifid,
- fcode);
+ {
+ tree fntype = rs6000_builtin_info_x[instance->bifid].fntype;
+ tree ret_type = TREE_TYPE (instance->fntype);
+ return altivec_build_new_resolved_builtin (args, n, fntype,
+ ret_type,
+ instance->bifid,
+ fcode);
+ }
else
{
unsupported_builtin = true;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-07 18:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 15:12 [gcc(refs/users/wschmidt/heads/builtins4)] rs6000: Fix overload matching of arg types William Schmidt
2021-02-07 18:16 William Schmidt
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).