public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/wschmidt/heads/builtins4)] rs6000: Empty overload stanzas don't work, fix that
@ 2020-12-09  4:17 William Schmidt
  0 siblings, 0 replies; 3+ messages in thread
From: William Schmidt @ 2020-12-09  4:17 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:83f4bc6eb4404e7ad4f006bbbdcdc500e29100ff

commit 83f4bc6eb4404e7ad4f006bbbdcdc500e29100ff
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Tue Dec 8 22:16:42 2020 -0600

    rs6000: Empty overload stanzas don't work, fix that
    
    2020-12-08  Bill Schmidt  <wschmidt@linux.ibm.com>
    
    gcc/
            * config/rs6000/rs6000-overload.def (VEC_EXTRACT): Add single
            overload to register with the front end.
            (VEC_INSERT): Likewise.
            (VEC_PROMOTE): Likewise.
            (VEC_SPLATS): Likewise.
            (VEC_STEP): Likewise.

Diff:
---
 gcc/config/rs6000/rs6000-overload.def | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-overload.def b/gcc/config/rs6000/rs6000-overload.def
index 8922da3176c..7e4b091e06b 100644
--- a/gcc/config/rs6000/rs6000-overload.def
+++ b/gcc/config/rs6000/rs6000-overload.def
@@ -1097,8 +1097,12 @@
 
 ; There are no actual builtins for vec_extract.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by "pointer tricks."
+; is replaced by "pointer tricks."  The single overload here causes
+; __builtin_vec_extract to be registered with the front end so this can
+; happen.
 [VEC_EXTRACT, vec_extract, __builtin_vec_extract]
+  vsi __builtin_vec_extract (vsi, signed int);
+    VSPLTW  EXTRACT_FAKERY
 
 [VEC_EXTRACT_FP_FROM_SHORTH, vec_extract_fp32_from_shorth, __builtin_vec_vextract_fp_from_shorth, _ARCH_PWR9]
   vf __builtin_vec_vextract_fp_from_shorth (vus);
@@ -1316,8 +1320,11 @@
 
 ; There are no actual builtins for vec_insert.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by "pointer tricks."
+; is replaced by "pointer tricks."  The single overload here causes
+; __builtin_vec_insert to be registered with the front end so this can happen.
 [VEC_INSERT, vec_insert, __builtin_vec_insert]
+  vsi __builtin_vec_extract (vsi, vsi, signed int);
+    XXPERMDI_4SI  INSERT_FAKERY
 
 [VEC_INSERTH, vec_inserth, __builtin_vec_inserth, _ARCH_PWR10]
   vuc __builtin_vec_inserth (unsigned char, vuc, unsigned int);
@@ -2297,8 +2304,11 @@
 
 ; There are no actual builtins for vec_promote.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by a constructor.
+; is replaced by a constructor.  The single overload here causes
+; __builtin_vec_promote to be registered with the front end so that can happen.
 [VEC_PROMOTE, vec_promote, __builtin_vec_promote]
+  vsi __builtin_vec_promote (vsi);
+    ABS_V4SI PROMOTE_FAKERY
 
 [VEC_RE, vec_re, __builtin_vec_re]
   vf __builtin_vec_re (vf);
@@ -2753,8 +2763,11 @@
 
 ; There are no actual builtins for vec_splats.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by a constructor.
+; is replaced by a constructor.  The single overload here causes
+; __builtin_vec_splats to be registered with the front end so that can happen.
 [VEC_SPLATS, vec_splats, __builtin_vec_splats]
+  vsi __builtin_vec_splats (vsi);
+    ABS_V4SI SPLATS_FAKERY
 
 [VEC_SQRT, vec_sqrt, __builtin_vec_sqrt, __VSX__]
   vf __builtin_vec_sqrt (vf);
@@ -2984,7 +2997,11 @@
 
 ; There are no builtins for VEC_STEP; this is handled directly
 ; with a constant replacement in rs6000_resolve_overloaded_builtin.
+; The single overload registers __builtin_vec_step with the front end
+; so this can happen.
 [VEC_STEP, vec_step, __builtin_vec_step]
+  signed int __builtin_vec_step (vsi);
+    VCLZLSBB_V4SI  STEP_FAKERY
 
 [VEC_STL, vec_stl, __builtin_vec_stl]
   void __builtin_vec_stl (vsc, signed long long, vsc *);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins4)] rs6000: Empty overload stanzas don't work, fix that
@ 2021-02-07 18:16 William Schmidt
  0 siblings, 0 replies; 3+ messages in thread
From: William Schmidt @ 2021-02-07 18:16 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2295c0f5a3136aa1c889367b41b6c539296fb872

commit 2295c0f5a3136aa1c889367b41b6c539296fb872
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Tue Dec 8 22:16:42 2020 -0600

    rs6000: Empty overload stanzas don't work, fix that
    
    2020-12-08  Bill Schmidt  <wschmidt@linux.ibm.com>
    
    gcc/
            * config/rs6000/rs6000-overload.def (VEC_EXTRACT): Add single
            overload to register with the front end.
            (VEC_INSERT): Likewise.
            (VEC_PROMOTE): Likewise.
            (VEC_SPLATS): Likewise.
            (VEC_STEP): Likewise.

Diff:
---
 gcc/config/rs6000/rs6000-overload.def | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-overload.def b/gcc/config/rs6000/rs6000-overload.def
index 8922da3176c..7e4b091e06b 100644
--- a/gcc/config/rs6000/rs6000-overload.def
+++ b/gcc/config/rs6000/rs6000-overload.def
@@ -1097,8 +1097,12 @@
 
 ; There are no actual builtins for vec_extract.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by "pointer tricks."
+; is replaced by "pointer tricks."  The single overload here causes
+; __builtin_vec_extract to be registered with the front end so this can
+; happen.
 [VEC_EXTRACT, vec_extract, __builtin_vec_extract]
+  vsi __builtin_vec_extract (vsi, signed int);
+    VSPLTW  EXTRACT_FAKERY
 
 [VEC_EXTRACT_FP_FROM_SHORTH, vec_extract_fp32_from_shorth, __builtin_vec_vextract_fp_from_shorth, _ARCH_PWR9]
   vf __builtin_vec_vextract_fp_from_shorth (vus);
@@ -1316,8 +1320,11 @@
 
 ; There are no actual builtins for vec_insert.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by "pointer tricks."
+; is replaced by "pointer tricks."  The single overload here causes
+; __builtin_vec_insert to be registered with the front end so this can happen.
 [VEC_INSERT, vec_insert, __builtin_vec_insert]
+  vsi __builtin_vec_extract (vsi, vsi, signed int);
+    XXPERMDI_4SI  INSERT_FAKERY
 
 [VEC_INSERTH, vec_inserth, __builtin_vec_inserth, _ARCH_PWR10]
   vuc __builtin_vec_inserth (unsigned char, vuc, unsigned int);
@@ -2297,8 +2304,11 @@
 
 ; There are no actual builtins for vec_promote.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by a constructor.
+; is replaced by a constructor.  The single overload here causes
+; __builtin_vec_promote to be registered with the front end so that can happen.
 [VEC_PROMOTE, vec_promote, __builtin_vec_promote]
+  vsi __builtin_vec_promote (vsi);
+    ABS_V4SI PROMOTE_FAKERY
 
 [VEC_RE, vec_re, __builtin_vec_re]
   vf __builtin_vec_re (vf);
@@ -2753,8 +2763,11 @@
 
 ; There are no actual builtins for vec_splats.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by a constructor.
+; is replaced by a constructor.  The single overload here causes
+; __builtin_vec_splats to be registered with the front end so that can happen.
 [VEC_SPLATS, vec_splats, __builtin_vec_splats]
+  vsi __builtin_vec_splats (vsi);
+    ABS_V4SI SPLATS_FAKERY
 
 [VEC_SQRT, vec_sqrt, __builtin_vec_sqrt, __VSX__]
   vf __builtin_vec_sqrt (vf);
@@ -2984,7 +2997,11 @@
 
 ; There are no builtins for VEC_STEP; this is handled directly
 ; with a constant replacement in rs6000_resolve_overloaded_builtin.
+; The single overload registers __builtin_vec_step with the front end
+; so this can happen.
 [VEC_STEP, vec_step, __builtin_vec_step]
+  signed int __builtin_vec_step (vsi);
+    VCLZLSBB_V4SI  STEP_FAKERY
 
 [VEC_STL, vec_stl, __builtin_vec_stl]
   void __builtin_vec_stl (vsc, signed long long, vsc *);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins4)] rs6000: Empty overload stanzas don't work, fix that
@ 2020-12-16 18:09 William Schmidt
  0 siblings, 0 replies; 3+ messages in thread
From: William Schmidt @ 2020-12-16 18:09 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bbff62479b3b826c15679c4a616ca2cf946dac6a

commit bbff62479b3b826c15679c4a616ca2cf946dac6a
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Tue Dec 8 22:16:42 2020 -0600

    rs6000: Empty overload stanzas don't work, fix that
    
    2020-12-08  Bill Schmidt  <wschmidt@linux.ibm.com>
    
    gcc/
            * config/rs6000/rs6000-overload.def (VEC_EXTRACT): Add single
            overload to register with the front end.
            (VEC_INSERT): Likewise.
            (VEC_PROMOTE): Likewise.
            (VEC_SPLATS): Likewise.
            (VEC_STEP): Likewise.

Diff:
---
 gcc/config/rs6000/rs6000-overload.def | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-overload.def b/gcc/config/rs6000/rs6000-overload.def
index 8922da3176c..7e4b091e06b 100644
--- a/gcc/config/rs6000/rs6000-overload.def
+++ b/gcc/config/rs6000/rs6000-overload.def
@@ -1097,8 +1097,12 @@
 
 ; There are no actual builtins for vec_extract.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by "pointer tricks."
+; is replaced by "pointer tricks."  The single overload here causes
+; __builtin_vec_extract to be registered with the front end so this can
+; happen.
 [VEC_EXTRACT, vec_extract, __builtin_vec_extract]
+  vsi __builtin_vec_extract (vsi, signed int);
+    VSPLTW  EXTRACT_FAKERY
 
 [VEC_EXTRACT_FP_FROM_SHORTH, vec_extract_fp32_from_shorth, __builtin_vec_vextract_fp_from_shorth, _ARCH_PWR9]
   vf __builtin_vec_vextract_fp_from_shorth (vus);
@@ -1316,8 +1320,11 @@
 
 ; There are no actual builtins for vec_insert.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by "pointer tricks."
+; is replaced by "pointer tricks."  The single overload here causes
+; __builtin_vec_insert to be registered with the front end so this can happen.
 [VEC_INSERT, vec_insert, __builtin_vec_insert]
+  vsi __builtin_vec_extract (vsi, vsi, signed int);
+    XXPERMDI_4SI  INSERT_FAKERY
 
 [VEC_INSERTH, vec_inserth, __builtin_vec_inserth, _ARCH_PWR10]
   vuc __builtin_vec_inserth (unsigned char, vuc, unsigned int);
@@ -2297,8 +2304,11 @@
 
 ; There are no actual builtins for vec_promote.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by a constructor.
+; is replaced by a constructor.  The single overload here causes
+; __builtin_vec_promote to be registered with the front end so that can happen.
 [VEC_PROMOTE, vec_promote, __builtin_vec_promote]
+  vsi __builtin_vec_promote (vsi);
+    ABS_V4SI PROMOTE_FAKERY
 
 [VEC_RE, vec_re, __builtin_vec_re]
   vf __builtin_vec_re (vf);
@@ -2753,8 +2763,11 @@
 
 ; There are no actual builtins for vec_splats.  There is special handling for
 ; this in altivec_resolve_overloaded_builtin in rs6000-c.c, where the call
-; is replaced by a constructor.
+; is replaced by a constructor.  The single overload here causes
+; __builtin_vec_splats to be registered with the front end so that can happen.
 [VEC_SPLATS, vec_splats, __builtin_vec_splats]
+  vsi __builtin_vec_splats (vsi);
+    ABS_V4SI SPLATS_FAKERY
 
 [VEC_SQRT, vec_sqrt, __builtin_vec_sqrt, __VSX__]
   vf __builtin_vec_sqrt (vf);
@@ -2984,7 +2997,11 @@
 
 ; There are no builtins for VEC_STEP; this is handled directly
 ; with a constant replacement in rs6000_resolve_overloaded_builtin.
+; The single overload registers __builtin_vec_step with the front end
+; so this can happen.
 [VEC_STEP, vec_step, __builtin_vec_step]
+  signed int __builtin_vec_step (vsi);
+    VCLZLSBB_V4SI  STEP_FAKERY
 
 [VEC_STL, vec_stl, __builtin_vec_stl]
   void __builtin_vec_stl (vsc, signed long long, vsc *);


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-07 18:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09  4:17 [gcc(refs/users/wschmidt/heads/builtins4)] rs6000: Empty overload stanzas don't work, fix that William Schmidt
2020-12-16 18:09 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).