public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: William Schmidt <wschmidt@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/wschmidt/heads/builtins4)] rs6000: More bug fixes Date: Thu, 17 Dec 2020 22:25:45 +0000 (GMT) [thread overview] Message-ID: <20201217222545.0F8FA3890401@sourceware.org> (raw) https://gcc.gnu.org/g:9befce7ac191a33c2280d0fa99b24e83d34cbd79 commit 9befce7ac191a33c2280d0fa99b24e83d34cbd79 Author: Bill Schmidt <wschmidt@linux.ibm.com> Date: Thu Dec 17 16:25:22 2020 -0600 rs6000: More bug fixes 2020-12-17 Bill Schmidt <wschmidt@linux.ibm.com> * config/rs6000/rs6000-builtin-new.def (LVEBX): Fix return type. (LVEHX): Likewise. (LVEWX): Likeiwse. * config/rs6000/rs6000-gen-builtins.c (construct_fntype_id): Don't use "ci" for pointers. * config/rs6000/rs6000-overload.def (VEC_CMPEQ): Use Altivec forms, not VSX forms, for now. (VEC_CMPEQ_P): Likewise. (VEC_CMPGE): Likewise. (VEC_CMPGE_P): Likewise. (VEC_CMPGT): Likewise. (VEC_CMPGT_P): Likewise. (VEC_NMSUB): Likewise. (VEC_RE): Likewise. Diff: --- gcc/config/rs6000/rs6000-builtin-new.def | 6 +++--- gcc/config/rs6000/rs6000-gen-builtins.c | 5 ++++- gcc/config/rs6000/rs6000-overload.def | 27 +++++++++++++++++++-------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-builtin-new.def index 3ca7ccab705..8b54b17e1ce 100644 --- a/gcc/config/rs6000/rs6000-builtin-new.def +++ b/gcc/config/rs6000/rs6000-builtin-new.def @@ -306,13 +306,13 @@ fpmath vf __builtin_altivec_float_sisf (vsi); FLOAT_V4SI_V4SF floatv4siv4sf2 {} - pure vop __builtin_altivec_lvebx (signed long long, const void *); + pure vsc __builtin_altivec_lvebx (signed long long, const void *); LVEBX altivec_lvebx {ldvec} - pure vop __builtin_altivec_lvehx (signed long long, const void *); + pure vss __builtin_altivec_lvehx (signed long long, const void *); LVEHX altivec_lvehx {ldvec} - pure vop __builtin_altivec_lvewx (signed long long, const void *); + pure vsi __builtin_altivec_lvewx (signed long long, const void *); LVEWX altivec_lvewx {ldvec} pure vuc __builtin_altivec_lvsl (signed long long, const void *); diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c index 57095dde58a..a4495e0c443 100644 --- a/gcc/config/rs6000/rs6000-gen-builtins.c +++ b/gcc/config/rs6000/rs6000-gen-builtins.c @@ -930,6 +930,7 @@ match_type (typeinfo *typedata, int voidok) [const] [[signed|unsigned] <basetype> | <vectype>] [*] + #### Lie below #### where "const" applies only to a <basetype> of "int". Legal values of <basetype> are (for now): @@ -1577,7 +1578,9 @@ construct_fntype_id (prototype *protoptr) { assert (argptr); buf[bufi++] = '_'; - if (argptr->info.isconst && argptr->info.base == BT_INT) + if (argptr->info.isconst + && argptr->info.base == BT_INT + && !argptr->info.ispointer) { buf[bufi++] = 'c'; buf[bufi++] = 'i'; diff --git a/gcc/config/rs6000/rs6000-overload.def b/gcc/config/rs6000/rs6000-overload.def index 2109c6ccb56..981e2fe944b 100644 --- a/gcc/config/rs6000/rs6000-overload.def +++ b/gcc/config/rs6000/rs6000-overload.def @@ -456,6 +456,7 @@ VCMPBFP [VEC_CMPEQ, vec_cmpeq, __builtin_vec_cmpeq] +; #### XVCMPEQSP{TARGET_VSX};VCMPEQFP vbc __builtin_vec_cmpeq (vsc, vsc); VCMPEQUB VCMPEQUB_VSC vbc __builtin_vec_cmpeq (vuc, vuc); @@ -481,12 +482,13 @@ vbll __builtin_vec_cmpeq (vbll, vbll); VCMPEQUD VCMPEQUD_VBLL vbi __builtin_vec_cmpeq (vf, vf); - XVCMPEQSP + VCMPEQFP vbll __builtin_vec_cmpeq (vd, vd); XVCMPEQDP ; We skip generating a #define because of the C-versus-C++ complexity ; in altivec.h. Look there for the template-y details. +; #### XVCMPEQSP_P{TARGET_VSX};VCMPEQFP_P [VEC_CMPEQ_P, SKIP, __builtin_vec_vcmpeq_p] signed int __builtin_vec_vcmpeq_p (signed int, vuc, vuc); VCMPEQUB_P VCMPEQUB_PU @@ -515,7 +517,7 @@ signed int __builtin_vec_vcmpeq_p (signed int, vbll, vbll); VCMPEQUD_P VCMPEQUD_PB signed int __builtin_vec_vcmpeq_p (signed int, vf, vf); - XVCMPEQSP_P + VCMPEQFP_P signed int __builtin_vec_vcmpeq_p (signed int, vd, vd); XVCMPEQDP_P @@ -523,6 +525,7 @@ signed int __builtin_byte_in_set (unsigned char, unsigned long long); CMPEQB +; #### XVCMPGESP{TARGET_VSX};VCMPGEFP [VEC_CMPGE, vec_cmpge, __builtin_vec_cmpge] vbc __builtin_vec_cmpge (vsc, vsc); CMPGE_16QI CMPGE_16QI_VSC @@ -541,7 +544,7 @@ vbll __builtin_vec_cmpge (vull, vull); CMPGE_2DI CMPGE_2DI_VULL vbi __builtin_vec_cmpge (vf, vf); - XVCMPGESP + VCMPGEFP vbll __builtin_vec_cmpge (vd, vd); XVCMPGEDP @@ -549,6 +552,7 @@ ; in altivec.h. Look there for the template-y details. ; See altivec_build_resolved_builtin for how we deal with VEC_CMPGE_P. ; It's quite strange and horrible! +; #### XVCMPGESP_P{TARGET_VSX};VCMPGEFP_P [VEC_CMPGE_P, SKIP, __builtin_vec_vcmpge_p] signed int __builtin_vec_vcmpge_p (signed int, vuc, vuc); VCMPGTUB_P VCMPGTUB_PR @@ -567,10 +571,11 @@ signed int __builtin_vec_vcmpge_p (signed int, vsll, vsll); VCMPGTSD_P VCMPGTSD_PR signed int __builtin_vec_vcmpge_p (signed int, vf, vf); - XVCMPGESP_P + VCMPGEFP_P signed int __builtin_vec_vcmpge_p (signed int, vd, vd); XVCMPGEDP_P +; #### XVCMPGTSP{TARGET_VSX};VCMPGTFP [VEC_CMPGT, vec_cmpgt, __builtin_vec_cmpgt] vbc __builtin_vec_cmpgt (vsc, vsc); VCMPGTSB @@ -589,12 +594,13 @@ vbll __builtin_vec_cmpgt (vull, vull); VCMPGTUD vbi __builtin_vec_cmpgt (vf, vf); - XVCMPGTSP + VCMPGTFP vbll __builtin_vec_cmpgt (vd, vd); XVCMPGTDP ; We skip generating a #define because of the C-versus-C++ complexity ; in altivec.h. Look there for the template-y details. +; #### XVCMPGTSP_P{TARGET_VSX};VCMPGTFP_P [VEC_CMPGT_P, SKIP, __builtin_vec_vcmpgt_p] signed int __builtin_vec_vcmpgt_p (signed int, vuc, vuc); VCMPGTUB_P @@ -613,7 +619,7 @@ signed int __builtin_vec_vcmpgt_p (signed int, vsll, vsll); VCMPGTSD_P signed int __builtin_vec_vcmpgt_p (signed int, vf, vf); - XVCMPGTSP_P + VCMPGTFP_P signed int __builtin_vec_vcmpgt_p (signed int, vd, vd); XVCMPGTDP_P @@ -2084,9 +2090,10 @@ vd __builtin_vec_nmadd (vd, vd, vd); XVNMADDDP +; #### XVNMSUBDP{TARGET_VSX};VNMSUBFP [VEC_NMSUB, vec_nmsub, __builtin_vec_nmsub] vf __builtin_vec_nmsub (vf, vf, vf); - XVNMSUBSP + VNMSUBFP vd __builtin_vec_nmsub (vd, vd, vd); XVNMSUBDP @@ -2354,9 +2361,13 @@ vsi __builtin_vec_promote (vsi); ABS_V4SI PROMOTE_FAKERY +; Opportunity for improvement: We can use XVRESP instead of VREFP for +; TARGET_VSX. We would need conditional dispatch to allow two possibilities. +; Some syntax like "XVRESP{TARGET_VSX};VREFP". +; TODO. #### [VEC_RE, vec_re, __builtin_vec_re] vf __builtin_vec_re (vf); - XVRESP + VREFP vd __builtin_vec_re (vd); XVREDP
next reply other threads:[~2020-12-17 22:25 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-17 22:25 William Schmidt [this message] 2021-01-06 21:07 William Schmidt 2021-01-07 18:23 William Schmidt 2021-01-08 20:42 William Schmidt 2021-01-08 23:09 William Schmidt 2021-01-13 14:58 William Schmidt 2021-01-13 21:47 William Schmidt 2021-01-14 23:07 William Schmidt 2021-01-27 16:07 William Schmidt 2021-01-27 23:01 William Schmidt 2021-01-28 23:21 William Schmidt 2021-02-01 0:34 William Schmidt 2021-02-07 17:48 William Schmidt 2021-02-07 18:16 William Schmidt 2021-02-07 18:17 William Schmidt 2021-02-07 18:17 William Schmidt 2021-02-07 18:17 William Schmidt 2021-02-07 18:18 William Schmidt 2021-02-07 18:18 William Schmidt 2021-02-07 18:18 William Schmidt 2021-02-07 18:18 William Schmidt 2021-02-07 18:18 William Schmidt 2021-02-07 18:18 William Schmidt 2021-02-07 18:18 William Schmidt 2021-02-07 18:18 William Schmidt 2021-02-07 18:18 William Schmidt 2021-02-22 20:27 William Schmidt 2021-02-22 20:27 William Schmidt 2021-02-24 3:59 William Schmidt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201217222545.0F8FA3890401@sourceware.org \ --to=wschmidt@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).