[PATCH 11/55] rs6000: Parsing built-in input file, part 1 of 3

2021-06-08 Thread Bill Schmidt via Gcc-patches
2021-06-07 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (bif_stanza): New enum. (curr_bif_stanza): New variable. (stanza_entry): New struct. (stanza_map): New initialized variable. (enable_string): Likewise. (fnkinds): New enum.

[PATCH 10/55] rs6000: Main function with stubs for parsing and output

2021-06-08 Thread Bill Schmidt via Gcc-patches
2021-06-08 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (rbtree.h): New #include. (num_bifs): New variable. (num_ovld_stanzas): Likewise. (num_ovlds): Likewise. (parse_codes): New enum. (bif_rbt): New variable. (ovld_rbt):

[PATCH 03/55] rs6000: Add initial input files

2021-06-08 Thread Bill Schmidt via Gcc-patches
This patch adds a tiny subset of the built-in and overload descriptions. 2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: New. * config/rs6000/rs6000-overload.def: New. --- gcc/config/rs6000/rs6000-builtin-new.def | 199 +++

[PATCH 09/55] rs6000: Red-black tree implementation for balanced tree search

2021-06-08 Thread Bill Schmidt via Gcc-patches
2021-06-08 Bill Schmidt gcc/ * config/rs6000/rbtree.c: New file. * config/rs6000/rbtree.h: New file. --- gcc/config/rs6000/rbtree.c | 242 + gcc/config/rs6000/rbtree.h | 52 2 files changed, 294 insertions(+) create mode 100644

[PATCH 08/55] rs6000: Add functions for matching types, part 3 of 3

2021-06-08 Thread Bill Schmidt via Gcc-patches
2021-06-07 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (restriction): New enum. (typeinfo): Add restr field. (match_bracketed_pair): New function. (match_const_restriction): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 115

[PATCH 07/55] rs6000: Add functions for matching types, part 2 of 3

2021-06-08 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (match_basetype): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 64 + 1 file changed, 64 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c

[PATCH 01/55] rs6000: Support scanning of build-time GC roots in gengtype

2021-06-08 Thread Bill Schmidt via Gcc-patches
Currently gengtype supports scanning target-specific files for GC roots, but those files must exist in the source tree. This patch extends the support to include header files generated into the build directory. It also allows targets to specify build dependencies for s-gtype to ensure the built

[PATCH 06/55] rs6000: Add functions for matching types, part 1 of 3

2021-06-08 Thread Bill Schmidt via Gcc-patches
2021-06-07 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (void_status): New enum. (basetype): Likewise. (typeinfo): Likewise. (handle_pointer): New function. (match_basetype): New stub function. (match_const_restriction): Likewise.

[PATCH 05/55] rs6000: Add helper functions for parsing

2021-06-08 Thread Bill Schmidt via Gcc-patches
2021-06-07 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (consume_whitespace): New function. (advance_line): Likewise. (safe_inc_pos): Likewise. (match_identifier): Likewise. (match_integer): Likewise. (match_to_right_bracket):

[PATCH 04/55] rs6000: Add file support and functions for diagnostic support

2021-06-08 Thread Bill Schmidt via Gcc-patches
2021-06-07 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (bif_file): New variable. (ovld_file): Likewise. (header_file): Likewise. (init_file): Likewise. (defines_file): Likewise. (pgm_path): Likewise. (bif_path): Likewise.

[PATCHv2 00/55] Replace the Power target-specific builtin machinery

2021-06-08 Thread Bill Schmidt via Gcc-patches
Original patch series here: https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568840.html Segher and others, thanks for reviewing the first chunk of patches from this series! Some of the stylistic changes turn out to affect many of the remaining patches, so in addition to addressing the

[PATCH 02/55] rs6000: Initial create of rs6000-gen-builtins.c

2021-06-08 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c: New. --- gcc/config/rs6000/rs6000-gen-builtins.c | 165 1 file changed, 165 insertions(+) create mode 100644 gcc/config/rs6000/rs6000-gen-builtins.c diff --git

Re: [PATCH 02/57] Support scanning of build-time GC roots in gengtype

2021-06-07 Thread Bill Schmidt via Gcc-patches
On 6/7/21 12:45 PM, Richard Biener wrote: On Mon, Jun 7, 2021 at 5:38 PM Bill Schmidt wrote: On 6/7/21 8:36 AM, Richard Biener wrote: Some maybe obvious issue - what about DOS-style path hosts? You seem to build ../ strings to point to parent dirs... I'm not sure what we do elsewhere - I

Re: [PATCH 02/57] Support scanning of build-time GC roots in gengtype

2021-06-07 Thread Bill Schmidt via Gcc-patches
On 6/7/21 8:36 AM, Richard Biener wrote: Some maybe obvious issue - what about DOS-style path hosts? You seem to build ../ strings to point to parent dirs... I'm not sure what we do elsewhere - I suppose we arrange for appropriate -I command line arguments? Well, actually it's just using "./"

Re: [PATCH 02/57] Support scanning of build-time GC roots in gengtype

2021-06-07 Thread Bill Schmidt via Gcc-patches
On 6/7/21 5:39 AM, Richard Sandiford wrote: Bill Schmidt via Gcc-patches writes: On 5/20/21 5:24 PM, Segher Boessenkool wrote: On Tue, May 11, 2021 at 11:01:22AM -0500, Bill Schmidt wrote: Hi!  I'd like to ping this specific patch from the series, which is the only one remaining that affects

Re: [PATCH 02/57] Support scanning of build-time GC roots in gengtype

2021-06-04 Thread Bill Schmidt via Gcc-patches
On 5/20/21 5:24 PM, Segher Boessenkool wrote: On Tue, May 11, 2021 at 11:01:22AM -0500, Bill Schmidt wrote: Hi!  I'd like to ping this specific patch from the series, which is the only one remaining that affects common code.  I confess that I don't know whom to ask for a review for gengtype; I

Re: Generate 128-bit divide/modulus

2021-06-04 Thread will schmidt via Gcc-patches
On Fri, 2021-06-04 at 11:10 -0400, Michael Meissner wrote: Hi, > Generate 128-bit divide/modulus. > > This patch adds support for the VDIVSQ, VDIVUQ, VMODSQ, and VMODUQ > instructions to do 128-bit arithmetic. vdivsq,vdivuq,vmodsq,vmoduq should be lowercase ? > > I have tested this on 3

Re: [PATCH] rs6000: Support doubleword swaps removal in rot64 load store [PR100085]

2021-06-03 Thread Bill Schmidt via Gcc-patches
On 6/3/21 3:19 PM, Segher Boessenkool wrote: On Thu, Jun 03, 2021 at 08:09:36AM -0500, Bill Schmidt wrote: Note also that swap optimization can handle more general cases than simplify-rtx. Do you have examples? That should be fixed (unless it is something Power-specific?) It is

Re: rs6000: Require ELFv2 ABI for ROP test (PR100750)

2021-06-03 Thread Bill Schmidt via Gcc-patches
On 6/1/21 7:44 PM, Segher Boessenkool wrote: It would be nice if we had a selector for when we can use -mrop-protect, instead of assuming it is only for ELFv2. Agreed -- I'll take a note and try to get to this sometime.

Re: [PATCH] rs6000: Support doubleword swaps removal in rot64 load store [PR100085]

2021-06-03 Thread Bill Schmidt via Gcc-patches
On 6/2/21 7:46 PM, Xionghu Luo wrote: Hi, On 2021/6/3 06:20, Segher Boessenkool wrote: On Wed, Jun 02, 2021 at 03:19:32AM -0500, Xionghu Luo wrote: On P8LE, extra rot64+rot64 load or store instructions are generated in float128 to vector __int128 conversion. This patch teaches pass swaps to

rs6000: Require ELFv2 ABI for ROP test (PR100750)

2021-06-01 Thread Bill Schmidt via Gcc-patches
Hi! PR100750 reports a failure on my part to require the ELFv2 ABI for one of the ROP tests. This fixes that. Tested on powerpc64-linux-gnu, committed as obvious. Thanks! Bill PR100750: Require ELFv2 ABI for ROP test 2021-06-01 Bill Schmidt gcc/testsuite/ PR testsuite/100750

Re: [PATCH 06/57] rs6000: Add helper functions for parsing

2021-06-01 Thread Bill Schmidt via Gcc-patches
On 5/21/21 6:43 PM, Segher Boessenkool wrote: Yes, wrappers is a no-go. But you could just have added the features you need to the generic code? Was there a technical reason not to do that? It sounds useful in many places, not just here. I agree it would be nice if all the gen* tools had

Re: [PATCH 06/57] rs6000: Add helper functions for parsing

2021-05-21 Thread Bill Schmidt via Gcc-patches
On 5/21/21 1:51 PM, Segher Boessenkool wrote: Hi! On Tue, Apr 27, 2021 at 10:32:41AM -0500, Bill Schmidt via Gcc-patches wrote: +/* Used as a sentinel for range constraints on integer fields. No field can + be 32 bits wide, so this is a safe sentinel value. */ +#define MININT INT32_MIN

Re: [PATCH 05/57] rs6000: Add file support and functions for diagnostic support

2021-05-21 Thread Bill Schmidt via Gcc-patches
On 5/20/21 6:03 PM, Segher Boessenkool wrote: Hi! On Tue, Apr 27, 2021 at 10:32:40AM -0500, Bill Schmidt via Gcc-patches wrote: * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope variable. What makes it interesting that this var has file scope? Did you mean

Re: [PATCH 04/57] rs6000: Add initial input files

2021-05-21 Thread Bill Schmidt via Gcc-patches
On 5/20/21 5:46 PM, Segher Boessenkool wrote: On Tue, Apr 27, 2021 at 10:32:39AM -0500, Bill Schmidt via Gcc-patches wrote: This patch adds a tiny subset of the built-in and overload descriptions. * config/rs6000/rs6000-builtin-new.def: New. You'll have to rename this to not have

Re: [PATCH 00/57] Replace the Power target-specific built-in machinery

2021-05-21 Thread Bill Schmidt via Gcc-patches
On 5/20/21 4:57 PM, Segher Boessenkool wrote: Is there some (semi-)automatic way to compare the results of the old and new systems? Yes...very "semi".  There's a patch in the series that updates the information printed from -mdebug=builtin.  I use this to print the builtins generated by the

Re: [PATCH 2/2] Fix tests when running on power10, PR testsuite/100166

2021-05-20 Thread will schmidt via Gcc-patches
On Tue, 2021-05-18 at 16:59 -0400, Michael Meissner wrote: > [PATCH 2/2] Fix tests when running on power10, PR testsuite/100166 > Hi, > This patch updates the various tests in the testsuite to adjust the test > if power10 code generation is used. > > Some tests would not generate the expected

Re: [PATCH 1/2] Deal with prefixed loads/stores in tests, PR testsuite/100166

2021-05-20 Thread will schmidt via Gcc-patches
On Tue, 2021-05-18 at 16:57 -0400, Michael Meissner wrote: > [PATCH 1/2] Deal with prefixed loads/stores in tests, PR testsuite/100166 > Hi, > This patch updates the various tests in the testsuite to treat plxv > and pstxv as being vector loads/stores. This shows up if you run the > testsuite

Re: [PATCH] Fix vec-splati-runnable.c test.

2021-05-20 Thread will schmidt via Gcc-patches
On Tue, 2021-05-18 at 16:49 -0400, Michael Meissner wrote: > [PATCH] Fix vec-splati-runnable.c test. > hi, > I noticed that the vec-splati-runnable.c did not have an abort after one > of the tests. If the test was run with optimization, the optimizer could > delete some of the tests and throw

Re: [PATCH 2/2] Fix xxeval predicates.

2021-05-20 Thread will schmidt via Gcc-patches
On Tue, 2021-05-18 at 16:47 -0400, Michael Meissner wrote: > [PATCH 2/2] Fix xxeval predicates. > > In doing the patch to move the XX* built-in functions from altivec.md to > vsx.md, I noticed that the xxeval built-in function used the > altivec_register_operand predicate. Since it takes vsx

Re: [PATCH 1/2] Move xx* builtins to vsx.md.

2021-05-20 Thread will schmidt via Gcc-patches
On Tue, 2021-05-18 at 16:46 -0400, Michael Meissner wrote: > [PATCH 1/2] Move xx* builtins to vsx.md. > Hi, > I noticed that the xx built-in functions (xxspltiw, xxspltidp, xxsplti32dx, > xxeval, xxblend, and xxpermx) were all defined in altivec.md. However, since > the XX instructions can

Re: [PATCH] Change rs6000_const_f32_to_i32 return type.

2021-05-20 Thread will schmidt via Gcc-patches
On Tue, 2021-05-18 at 16:39 -0400, Michael Meissner wrote: > [PATCH] Change rs6000_const_f32_to_i32 return type. > > The function rs6000_const_f32_to_i32 called REAL_VALUE_TO_TARGET_SINGLE > with a long long type and returns it. This patch changes the type to long > which is the proper type for

Re: [PATCH] Allow __ibm128 on older PowerPC systems.

2021-05-20 Thread will schmidt via Gcc-patches
On Tue, 2021-05-18 at 16:36 -0400, Michael Meissner wrote: > [PATCH] Allow __ibm128 on older PowerPC systems. > Hi, > On January 8th, 2018, I added code to ibm-ldouble.c to use the built-in > function __builtin_pack_ibm128 if long double is IEEE 128-bit and continue to > use

Re: [PATCH] Fix long double tests when default long double is not IBM.

2021-05-20 Thread will schmidt via Gcc-patches
On Tue, 2021-05-18 at 16:32 -0400, Michael Meissner wrote: > [PATCH] Fix long double tests when default long double is not IBM. > Hi, > This patch adds 3 more selections to target-supports.exp to see if we can > force > the compiler to use a particular long double format (IEEE 128-bit, IBM >

Re: [PATCH 2/2] Add IEEE 128-bit fp conditional move on PowerPC.

2021-05-20 Thread will schmidt via Gcc-patches
On Tue, 2021-05-18 at 16:28 -0400, Michael Meissner wrote: > [PATCH 2/2] Add IEEE 128-bit fp conditional move on PowerPC. > Hi, > This patch adds the support for power10 IEEE 128-bit floating point > conditional > move and for automatically generating min/max. > > In this patch, I simplified

Re: [PATCH 1/2] Add IEEE 128-bit min/max support on PowerPC.

2021-05-20 Thread will schmidt via Gcc-patches
On Tue, 2021-05-18 at 16:26 -0400, Michael Meissner wrote: > [PATCH 1/2] Add IEEE 128-bit min/max support on PowerPC. > Hi, > This patch adds the support for the IEEE 128-bit floating point C minimum and > maximum instructions. The next patch will add the support for using the > compare and

Re: [PATCH] rs6000: Remove old psabi warnings

2021-05-18 Thread Bill Schmidt via Gcc-patches
On 5/18/21 11:30 AM, Segher Boessenkool wrote: On Tue, May 18, 2021 at 09:09:07AM -0500, Bill Schmidt wrote: Long ago we were forced to make some small ABI breaks to correct errors in the implementation, and we added warning messages for the changes from GCC 4.9 to GCC 5. Enough time has

[PATCH] rs6000: Remove old psabi warnings

2021-05-18 Thread Bill Schmidt via Gcc-patches
Hi! Long ago we were forced to make some small ABI breaks to correct errors in the implementation, and we added warning messages for the changes from GCC 4.9 to GCC 5. Enough time has passed that these are now just irritants, so let's remove them. Also clean up associated macros using

Re: [PATCH 1/4] rs6000: Add -mrop-protect and -mprivileged flags

2021-05-15 Thread Bill Schmidt via Gcc-patches
Series pushed with recommended changes.  Thank you! Bill On 5/14/21 10:55 AM, Segher Boessenkool wrote: On Thu, May 13, 2021 at 10:34:54PM -0500, Bill Schmidt via Gcc-patches wrote: +mprivileged +Target Var(rs6000_privileged) Init(0) +Enable generation of instructions that require privileged

Re: [PATCH 2/4] rs6000: Emit ROP-mitigation instructions in prologue and epilogue

2021-05-14 Thread Bill Schmidt via Gcc-patches
On 5/14/21 1:44 PM, Segher Boessenkool wrote: Please make this an unspec_volatile? Oops!  Sorry for missing that the first time. Thanks for the review!! Bill

[PATCH 4/4] rs6000: Add ROP tests

2021-05-13 Thread Bill Schmidt via Gcc-patches
2021-05-13 Bill Schmidt gcc/testsuite/ * gcc.target/powerpc/rop-1.c: New. * gcc.target/powerpc/rop-2.c: New. * gcc.target/powerpc/rop-3.c: New. * gcc.target/powerpc/rop-4.c: New. * gcc.target/powerpc/rop-5.c: New. ---

[PATCH 3/4] rs6000: Conditionally define __ROP_PROTECT__

2021-05-13 Thread Bill Schmidt via Gcc-patches
2021-05-13 Bill Schmidt gcc/ * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define __ROP_PROTECT__ if -mrop-protect is selected. --- gcc/config/rs6000/rs6000-c.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/config/rs6000/rs6000-c.c

[PATCH 2/4] rs6000: Emit ROP-mitigation instructions in prologue and epilogue

2021-05-13 Thread Bill Schmidt via Gcc-patches
2021-05-13 Bill Schmidt gcc/ * config/rs6000/rs6000-internal.h (rs6000_stack): Add rop_hash_save_offset and rop_hash_size. * config/rs6000/rs6000-logue.c (rs6000_stack_info): Compute rop_hash_size and rop_hash_save_offset. (debug_stack_info): Dump

[PATCH 1/4] rs6000: Add -mrop-protect and -mprivileged flags

2021-05-13 Thread Bill Schmidt via Gcc-patches
2021-05-13 Bill Schmidt gcc/ * config/rs6000/rs6000.c (rs6000_option_override_internal): Disable shrink wrap when inserting ROP-protect instructions. * config/rs6000/rs6000.opt (mrop-protect): New option. (mprivileged): Likewise. * doc/invoke.texi:

[PATCHv2 0/4] ROP support

2021-05-13 Thread Bill Schmidt via Gcc-patches
This is version 2 of the ROP support patch, addressing comments by Will Schmidt and Segher Boessenkool. I've attempted to implement all of your excellent suggestions; otherwise the series is unchanged. I decided to repost the whole series rather than just the patches needing further approval,

Re: [PATCH 02/57] Support scanning of build-time GC roots in gengtype

2021-05-11 Thread Bill Schmidt via Gcc-patches
Hi!  I'd like to ping this specific patch from the series, which is the only one remaining that affects common code.  I confess that I don't know whom to ask for a review for gengtype; I didn't get any good ideas from MAINTAINERS.  If you know of a good reviewer candidate, please CC them. In

Re: [PATCH 00/57] Replace the Power target-specific built-in machinery

2021-05-11 Thread Bill Schmidt via Gcc-patches
Hi!  I'd like to ping this series.  This is a big change, so I'd like to get it committed fairly early in stage 1.  I know you have a lot stacked up, though. Thanks! Bill On 4/27/21 10:32 AM, Bill Schmidt wrote: The design of the target-specific built-in function support in the Power back

Re: [PATCH 0/4] [rs6000] ROP support

2021-05-11 Thread Bill Schmidt via Gcc-patches
Hi!  I'd like to ping this series.  It has slightly higher priority from my perspective, since I'd like this to be backported in time for GCC 11.2. Thanks! Bill On 4/25/21 8:50 PM, Bill Schmidt via Gcc-patches wrote: Add POWER10 support for hashst[p] and hashchk[p] operations. When the -mrop

Re: PowerPC64 ELFv1 -fpatchable-function-entry

2021-05-07 Thread will schmidt via Gcc-patches
On Fri, 2021-05-07 at 12:19 +0930, Alan Modra via Gcc-patches wrote: > On PowerPC64 ELFv1 function symbols are defined on function > descriptors in an .opd section rather than in the function code. > .opd is not split up by the PowerPC64 backend for comdat groups or > other situations where

Re: Revert "rs6000: Avoid -fpatchable-function-entry* regressions on powerpc64 be [PR98125]"

2021-05-07 Thread will schmidt via Gcc-patches
On Fri, 2021-05-07 at 12:19 +0930, Alan Modra via Gcc-patches wrote: > This reverts commit b680b9049737198d010e49cf434704c6a6ed2b3f now > that the PowerPC64 ELFv1 regression is fixed properly. > Hi, Ok. looks like that was initially handled by Jakub, on copy, good. :-) Contents below appear to

Re: PowerPC64 ELFv2 -fpatchable-function-entry

2021-05-07 Thread will schmidt via Gcc-patches
On Fri, 2021-05-07 at 12:19 +0930, Alan Modra via Gcc-patches wrote: > PowerPC64 ELFv2 dual entry point functions have a couple of problems > with -fpatchable-function-entry. One is that the nops added after the > global entry land in the global entry code which is constrained to be > a power of

Re: [PATCH] rs6000: Make density_test only for vector version

2021-05-07 Thread will schmidt via Gcc-patches
On Fri, 2021-05-07 at 10:28 +0800, Kewen.Lin via Gcc-patches wrote: > Hi, > > When I was investigating density_test heuristics, I noticed that > the current rs6000_density_test could be used for single scalar > iteration cost calculation, through the call trace: >

[PATCH "60/57"] rs6000: Fix AltiVec builtin marked as VSX

2021-04-30 Thread Bill Schmidt via Gcc-patches
On 4/27/21 10:32 AM, Bill Schmidt wrote: The design of the target-specific built-in function support in the Power back end has not stood the test of time. The machinery is grossly inefficient, confusing, and arcane; and adding new built-in functions is inefficient and error-prone. This patch

[PATCH "59/57"] rs6000: Fix builtins that should have been available everywhere

2021-04-30 Thread Bill Schmidt via Gcc-patches
On 4/27/21 10:32 AM, Bill Schmidt wrote: The design of the target-specific built-in function support in the Power back end has not stood the test of time. The machinery is grossly inefficient, confusing, and arcane; and adding new built-in functions is inefficient and error-prone. This patch

[PATCH "58/57"] rs6000: Avoid problems with undefined decimal float types

2021-04-30 Thread Bill Schmidt via Gcc-patches
On 4/27/21 10:32 AM, Bill Schmidt wrote: The design of the target-specific built-in function support in the Power back end has not stood the test of time. The machinery is grossly inefficient, confusing, and arcane; and adding new built-in functions is inefficient and error-prone. This patch

Re: [PATCH 1/5 ver4] RS6000: Add 128-bit Integer Operations

2021-04-27 Thread will schmidt via Gcc-patches
On Mon, 2021-04-26 at 09:35 -0700, Carl Love wrote: > Will, Segher: > > This patch fixes the order of the argument in the vec_rlmi and > vec_rlnm builtins. The patch also adds a new test cases to verify > the fix. > > The patch has been tested on > powerpc64-linux instead (Power 8 BE) >

Re: [PATCH 3/5 ver4] RS6000: Add TI to TD (128-bit DFP) and TD to TI support

2021-04-27 Thread will schmidt via Gcc-patches
On Mon, 2021-04-26 at 09:36 -0700, Carl Love wrote: > Will, Segher: > Hi, > This patch adds support for converting to/from 128-bit integers and > 128-bit decimal floating point formats. You reference TI,TD in the subject, would be helpful to elaborate a bit in your description. > > The

Re: [PATCH 4/5 ver4] RS6000, Add test 128-bit shifts for just the int128 type.

2021-04-27 Thread will schmidt via Gcc-patches
On Mon, 2021-04-26 at 09:36 -0700, Carl Love wrote: > Will, Segher: > > The previous patch added the vector 128-bit integer shift instruction > support for the V1TI type. This patch renames and moves the VSX_TI > iterator from vsx.md to VEC_TI in vector.md. The uses of VEC_TI are > also

Re: [PATCH 2/5 ver4] RS6000: Add 128-bit Integer Operations

2021-04-27 Thread will schmidt via Gcc-patches
On Mon, 2021-04-26 at 09:36 -0700, Carl Love wrote: > Will, Segher: > > This patch adds the 128-bit integer support for divide, modulo, shift, > compare of 128-bit integers instructions and builtin support. Hi, > > The patch has been tested on > powerpc64-linux instead (Power 8 BE) >

Re: [PATCH 5/5 ver4] RS6000: Conversions between 128-bit integer and floating point values.

2021-04-27 Thread will schmidt via Gcc-patches
On Mon, 2021-04-26 at 09:36 -0700, Carl Love wrote: > Will, Segher: > > This patch adds support for converting to/from 128-bit integers and > 128-bit decimal floating point formats using the new P10 instructions > dcffixqq and dctfixqq. The new instructions are only used on P10 HW, > otherwise

Re: [PATCH 01/57] Allow targets to specify build dependencies for out_object_file

2021-04-27 Thread Bill Schmidt via Gcc-patches
On 4/27/21 11:47 AM, Jakub Jelinek wrote: On Tue, Apr 27, 2021 at 11:14:00AM -0500, Bill Schmidt wrote: On 4/27/21 10:57 AM, Jakub Jelinek wrote: On Tue, Apr 27, 2021 at 10:32:36AM -0500, Bill Schmidt wrote: 2021-03-03 Bill Schmidt gcc/ * Makefile.in (OUT_FILE_DEPS): New variable.

Re: [PATCH 01/57] Allow targets to specify build dependencies for out_object_file

2021-04-27 Thread Bill Schmidt via Gcc-patches
On 4/27/21 10:57 AM, Jakub Jelinek wrote: On Tue, Apr 27, 2021 at 10:32:36AM -0500, Bill Schmidt wrote: 2021-03-03 Bill Schmidt gcc/ * Makefile.in (OUT_FILE_DEPS): New variable. (out_object_file): Depend on OUT_FILE_DEPS. Why? E.g. gcc/config/i386/t-i386 contains: i386.o:

[PATCH 42/57] rs6000: Handle overloads during program parsing

2021-04-27 Thread Bill Schmidt via Gcc-patches
Although this patch looks quite large, the changes are fairly minimal. Most of it is duplicating the large function that does the overload resolution using the automatically generated data structures instead of the old hand-generated ones. This doesn't make the patch terribly easy to review,

[PATCH 21/57] rs6000: Write output to the builtins init file, part 3 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (typemap): New struct. (TYPE_MAP_SIZE): New defined constant. (type_map): New initialized filescope variable. (map_token_to_type_node): New function. (write_type_node): Likewise.

[PATCH 05/57] rs6000: Add file support and functions for diagnostic support

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope variable. (ovld_file): Likewise. (header_file): Likewise. (init_file): Likewise. (defines_file): Likewise. (pgm_path): Likewise.

[PATCH 55/57] rs6000: Test case adjustments

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/testsuite/ * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust. * gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust. * gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust. * gcc.target/powerpc/bfp/scalar-insert-exp-5.c:

[PATCH 57/57] rs6000: Adjust to late-breaking change

2021-04-27 Thread Bill Schmidt via Gcc-patches
After this patch set was developed, a small change was made to overload handling for VEC_INSERT. Reflecting that into the new support here. 2021-04-27 Bill Schmidt gcc/ * config/rs6000/rs6000-c.c (altivec_resolve_new_overloaded_builtin): Change P8-vector test to

[PATCH 54/57] rs6000: Update altivec.h for automated interfaces

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/altivec.h: Delete a number of #defines that are now superfluous; include rs6000-vecdefines.h; include some synonyms. --- gcc/config/rs6000/altivec.h | 516 +++- 1 file changed, 41

[PATCH 56/57] rs6000: Enable the new builtin support

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_init_file): Initialize new_builtins_are_live to 1. --- gcc/config/rs6000/rs6000-gen-builtins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c

[PATCH 53/57] rs6000: Debug support

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_debug_type): New function. (def_builtin): Change debug formatting for easier parsing and include more information. (rs6000_init_builtins): Add dump of autogenerated builtins.

[PATCH 52/57] rs6000: Miscellaneous uses of rs6000_builtin_decls_x

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000.c (rs6000_builtin_reciprocal): Use rs6000_builtin_decls_x when appropriate. (add_condition_to_bb): Likewise. (rs6000_atomic_assign_expand_fenv): Likewise. --- gcc/config/rs6000/rs6000.c | 19

[PATCH 51/57] rs6000: Update rs6000_builtin_decl

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_new_builtin_decl): New function. (rs6000_builtin_decl): Call it. --- gcc/config/rs6000/rs6000-call.c | 20 1 file changed, 20 insertions(+) diff --git

[PATCH 50/57] rs6000: Builtin expansion, part 6

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (new_htm_spr_num): New function. (new_htm_expand_builtin): Implement. (rs6000_expand_new_builtin): Handle 32-bit and endian cases. --- gcc/config/rs6000/rs6000-call.c | 202 1

[PATCH 49/57] rs6000: Builtin expansion, part 5

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-25 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (new_mma_expand_builtin): Implement. --- gcc/config/rs6000/rs6000-call.c | 92 + 1 file changed, 92 insertions(+) diff --git a/gcc/config/rs6000/rs6000-call.c

[PATCH 48/57] rs6000: Builtin expansion, part 4

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (elemrev_icode): Implement. (ldv_expand_builtin): Likewise. (lxvrse_expand_builtin): Likewise. (lxvrze_expand_builtin): Likewise. (stv_expand_builtin): Likewise. ---

[PATCH 47/57] rs6000: Builtin expansion, part 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (new_cpu_expand_builtin): Implement. --- gcc/config/rs6000/rs6000-call.c | 100 1 file changed, 100 insertions(+) diff --git a/gcc/config/rs6000/rs6000-call.c

[PATCH 45/57] rs6000: Builtin expansion, part 1

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_expand_new_builtin): New forward decl. (rs6000_invalid_new_builtin): New stub function. (rs6000_expand_builtin): Call rs6000_expand_new_builtin. (rs6000_expand_ldst_mask): New stub

[PATCH 46/57] rs6000: Builtin expansion, part 2

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_invalid_new_builtin): Implement. (rs6000_expand_ldst_mask): Likewise. (rs6000_init_builtins): Initialize altivec_builtin_mask_for_load. --- gcc/config/rs6000/rs6000-call.c | 101

[PATCH 43/57] rs6000: Handle gimple folding of target built-ins

2021-04-27 Thread Bill Schmidt via Gcc-patches
This is another patch that looks bigger than it really is. Because we have a new namespace for the builtins, allowing us to have both the old and new builtin infrastructure supported at once, we need versions of these functions that use the new builtin namespace. Otherwise the code is unchanged.

[PATCH 44/57] rs6000: Support for vectorizing built-in functions

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000.c (rs6000-builtins.h): New include. (rs6000_new_builtin_vectorized_function): New function. (rs6000_new_builtin_md_vectorized_function): Likewise. (rs6000_builtin_vectorized_function): Call

[PATCH 41/57] rs6000: Always initialize vector_pair and vector_quad nodes

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_init_builtins): Remove TARGET_EXTRA_BUILTINS guard. --- gcc/config/rs6000/rs6000-call.c | 51 - 1 file changed, 24 insertions(+), 27 deletions(-) diff --git

[PATCH 40/57] rs6000: Add sanity to V2DI_type_node definitions

2021-04-27 Thread Bill Schmidt via Gcc-patches
It seems quite strange for these to be "vector long" for 64-bit and "vector long long" for 32-bit, when "vector long long" will do for both. 2021-03-04 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_init_builtins): Change initialization of V2DI_type_node and

[PATCH 39/57] rs6000: Darwin builtin support

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-04 Bill Schmidt gcc/ * config/rs6000/darwin.h (SUBTARGET_INIT_BUILTINS): Use the new decl when new_builtins_are_live. * config/rs6000/rs6000-builtin-new.def (__builtin_cfstring): New built-in. --- gcc/config/rs6000/darwin.h | 8 ++--

[PATCH 36/57] rs6000: Add Cell builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add cell stanza. --- gcc/config/rs6000/rs6000-builtin-new.def | 27 1 file changed, 27 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 35/57] rs6000: Add miscellaneous builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add ieee128-hw, dfp, crypto, and htm stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 215 +++ 1 file changed, 215 insertions(+) diff --git

[PATCH 38/57] rs6000: Execute the automatic built-in initialization code

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-04 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000-builtins.h): New #include. (rs6000_init_builtins): Call rs6000_autoinit_builtins; skip the old initialization logic when new builtins are enabled. --- gcc/config/rs6000/rs6000-call.c | 12

[PATCH 34/57] rs6000: Add MMA builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add mma stanza. --- gcc/config/rs6000/rs6000-builtin-new.def | 404 +++ 1 file changed, 404 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 33/57] rs6000: Add Power10 builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power10 and power10-64 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 427 +++ 1 file changed, 427 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 31/57] rs6000: Add Power9 builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power9-vector, power9, and power9-64 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 360 +++ 1 file changed, 360 insertions(+) diff --git

[PATCH 30/57] rs6000: Add power8-vector builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power8-vector stanza. --- gcc/config/rs6000/rs6000-builtin-new.def | 438 +++ 1 file changed, 438 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 32/57] rs6000: Add more type nodes to support builtin processing

2021-04-27 Thread Bill Schmidt via Gcc-patches
Previously we created pointer types on the fly from their base types whenever we needed one. It's more efficient to create them up front, and the new mechanism requires that. 2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_init_builtins): Initialize various

[PATCH 27/57] rs6000: Add VSX builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add vsx stanza. --- gcc/config/rs6000/rs6000-builtin-new.def | 860 +++ 1 file changed, 860 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 26/57] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Finish altivec stanza. * config/rs6000/rs6000-call.c (rs6000_init_builtins): Move initialization of pcvoid_type_node here... (altivec_init_builtins): ...from here. *

[PATCH 29/57] rs6000: Add power7 and power7-64 builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power7 and power7-64 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 39 1 file changed, 39 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 19/57] rs6000: Write output to the builtins init file, part 1 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_fntype): New function. (write_fntype_init): New stub function. (write_init_bif_table): Likewise. (write_init_ovld_table): New function. (write_init_file): Implement. ---

[PATCH 22/57] rs6000: Write static initializations for built-in table

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_bif_static_init): New function. (write_init_file): Call write_bif_static_init. --- gcc/config/rs6000/rs6000-gen-builtins.c | 104 1 file changed, 104 insertions(+) diff

[PATCH 28/57] rs6000: Add available-everywhere and ancient builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add always, power5, and power6 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 72 1 file changed, 72 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def

[PATCH 23/57] rs6000: Write static initializations for overload tables

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_ovld_static_init): New function. (write_init_file): Call write_ovld_static_init. --- gcc/config/rs6000/rs6000-gen-builtins.c | 53 + 1 file changed, 53 insertions(+) diff

[PATCH 25/57] rs6000: Add gengtype handling to the build machinery

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-04 Bill Schmidt gcc/ * config.gcc (target_gtfiles): Add ./rs6000-builtins.h. * config/rs6000/t-rs6000 (EXTRA_GTYPE_DEPS): Set. --- gcc/config.gcc | 1 + gcc/config/rs6000/t-rs6000 | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc/config.gcc

[PATCH 24/57] rs6000: Incorporate new builtins code into the build machinery

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-04 Bill Schmidt gcc/ * config.gcc (extra_objs): Include rs6000-builtins.o and rs6000-c.o. * config/rs6000/t-rs6000 (OUT_FILE_DEPS): Add rs6000-builtins.h. (rs6000-gen-builtins.o): New target. (rbtree.o): Likewise. (rs6000-gen-builtins):

<    1   2   3   4   5   6   7   8   9   10   >