PowerPC new instructions for -mcpu=future

2020-06-01 Thread Michael Meissner via Gcc-patches
These 3 patches add support for some new instructions in the 'future' processor. The first patch adds support for the new byte swap instructions that byte swap valies in the GPRs. The second patch renames some functions from _p9 to _hw. This is in preparation for the third patch that adds

[PATCH 3/3] PowerPC future: Add IEEE 128-bit min, max, compare.

2020-06-01 Thread Michael Meissner via Gcc-patches
Add support for the new IEEE 128-bit minimum, maximum, and set compare mask instructions when -mcpu=future was used. gcc/ 2020-06-01 Michael Meissner * config/rs6000/rs6000.c (rs6000_emit_hw_fp_minmax): Update comment. (rs6000_emit_hw_fp_cmove): Update comment.

[PATCH 6/7] PowerPC tests: Add PC-relative tests.

2020-06-01 Thread Michael Meissner via Gcc-patches
These tests make sure that PC-relative variant is generated for -mcpu=future on systems that support PC-relative addressing. 2020-06-01 Michael Meissner * gcc.target/powerpc/prefix-pcrel-dd.c: New test. * gcc.target/powerpc/prefix-pcrel-df.c: New test. *

[PATCH 7/7] PowerPC test: Add prefixed stack protect test

2020-06-01 Thread Michael Meissner via Gcc-patches
Test that stack protection generates prefixed stack instructions if you are using large stack frame for -mcpu=future. 2020-06-01 Michael Meissner * gcc.target/powerpc/prefix-stack-protect.c: New test. --- .../gcc.target/powerpc/prefix-stack-protect.c| 20

[PATCH 4/7] PowerPC test: Add prefixed no update test

2020-06-01 Thread Michael Meissner via Gcc-patches
This test makes sure we do not generate a prefixed instruction with an update form. 2020-06-01 Michael Meissner * gcc.target/powerpc/prefix-no-update.c: New test. --- .../gcc.target/powerpc/prefix-no-update.c | 50 ++ 1 file changed, 50 insertions(+)

[PATCH 5/7] PowerPC tests: Prefixed insn with large offsets

2020-06-01 Thread Michael Meissner via Gcc-patches
Add tests to make sure for -mcpu=future that prefixed load/store instructions are generated if the offset is larger than 16 bits. 2020-06-01 Michael Meissner * gcc.target/powerpc/prefix-large-dd.c: New test. * gcc.target/powerpc/prefix-large-df.c: New test. *

[PATCH 2/7] PowerPC tests: Add PLI/PADDI tests.

2020-06-01 Thread Michael Meissner via Gcc-patches
Add tests for -mcpu=future that test the generation of PADDI (and PLI which becomes PADDI). 2020-06-01 Michael Meissner * gcc.target/powerpc/prefix-add.c: New test. * gcc.target/powerpc/prefix-si-constant.c: New test. * gcc.target/powerpc/prefix-di-constant.c: New

[PATCH 1/7] PowerPC tests: Add prefixed/pcrel tests.

2020-06-01 Thread Michael Meissner via Gcc-patches
2020-06-01 Michael Meissner * lib/target-supports.exp (check_effective_target_powerpc_pcrel): New. (check_effective_target_powerpc_prefixed_addr): New. --- gcc/testsuite/lib/target-supports.exp | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH 3/7] PowerPC tests: Add prefixed vs. DS/DQ instruction tests.

2020-06-01 Thread Michael Meissner via Gcc-patches
Add test to make sure prefixed load/store instructions are generated if the offset would not fit in the DS/DQ encodings. 2020-06-01 Michael Meissner * gcc.target/powerpc/prefix-ds-dq.c: New test. --- gcc/testsuite/gcc.target/powerpc/prefix-ds-dq.c | 159 1

PowerPC tests for -mcpu=future

2020-06-01 Thread Michael Meissner via Gcc-patches
This thread adds seven patches to add tests for the -mcpu=future code generation. These patches are an update to the patches I sent out in April. https://gcc.gnu.org/pipermail/gcc-patches/2020-April/544653.html I have done bootstrap builds with/without the patches on a little end power9 box,

[PATCH] PowerPC -mcpu=future Patch 7 of 7, Add test for stack checking and large stack frames

2020-04-27 Thread Michael Meissner via Gcc-patches
This patch adds a test for the case where we have prefixed load/store instructions, a large stack frame, and stack checking is enabled. This is patch #7 of 7. I have checked this patch on a little endian power8 system running Linux, and the test passed. Can I check this into the GCC 10 trunk?

[PATCH] PowerPC -mcpu=future Patch 6 of 7, add PC-relative tests

2020-04-27 Thread Michael Meissner via Gcc-patches
This patch adds PC-relative tests for -mcpu=future. This is patch #6 of 7. I have checked this on a little endian power8 system running Linux, and all tests passed. Can I check this into the GCC 10 trunk? 2020-04-27 Michael Meissner * gcc.target/powerpc/prefix-pcrel.h: New set of

[PATCH] PowerPC -mcpu=future Patch 5 of 7, Add prefixed load/store tests with large numeric offsets

2020-04-27 Thread Michael Meissner via Gcc-patches
This patch adds tests for -mcpu=future generating prefixed load/store instructions with large numeric offsets. This is patch #5 of 7. This patch was tested on a little endian power8 system running Linux, and the tests passed. Can I check this into GCC 10? 2020-04-27 Michael Meissner

[PATCH] PowerPC -mcpu=future Patch 4 of 7, Make sure an invalid instruction is not generated

2020-04-27 Thread Michael Meissner via Gcc-patches
This test validates that the compiler does not generate a prefixed load/store instruction with an update form. The prefixed load/store instructions do not have an update form. This is patch #4 of 7. This patch was run on a little endian power8 system running Linux, and the tests passed. Can I

[PATCH] PowerPC -mcpu=future Patch 3 of 7, Add test for generating prefixed load/store

2020-04-27 Thread Michael Meissner via Gcc-patches
This patch adds a test that verifies that the compiler generates a prefixed load/store instruction where the compiler cannot generate the instruction directly because the offset is not a valid DS or DQ offset. A DS offset must have the bottom 2 bits clear. A DQ offset must have the bottom 4 bits

[PATCH] PowerPC -mcpu=future Patch 2 of 7, Add PLI/PADDI tests

2020-04-27 Thread Michael Meissner via Gcc-patches
Add tests for generating PLI/PADDI with -mcpu=future. This is patch #2 of 7. This patch was run on a little endian power8 system running Linux and the patches succeeded. 2020-04-27 Michael Meissner * gcc.target/powerpc/prefix-add.c: New test for -mcpu=future generating PADDI

Re: [PATCH] PowerPC -mcpu=future Patch 1 of 7, add target supports for -mpcrel and -mprefixed

2020-04-27 Thread Michael Meissner via Gcc-patches
This patch adds supports in target-supports.exp for -mpcrel and -mprefixed. Patch #1 of 7. 2020-04-27 Michael Meissner * lib/target-supports.exp (check_effective_target_powerpc_pcrel): New target for PowerPC -mcpu=future support.

[PATCH] PowerPC -mcpu=future tests, Introduction

2020-04-27 Thread Michael Meissner via Gcc-patches
This patch will allow me to group the 7 patches I have for GCC 10 to test the various -mcpu=future features. There are 7 patches in this patch set: Patch #1: Add target support for -mpcrel and -mprefixed. Patch #2: Test that PLI/PADDI is generated to load or add large constants. Patch #3: Add

[PATCH, V5] PowerPC Turn on -mpcrel by default for -mcpu=future

2020-04-21 Thread Michael Meissner via Gcc-patches
Turn on -mpcrel by default for -mcpu=future I reworked the patches based on your comments: 1) I removed the check for 64-bit; 2) I now set the prefixed and PC-relative bits on by default; 3) I removed the #if around the test, and provided a definition earlier; 5) I removed the #undef in

Re: [PATCH, V4] PowerPC Turn on -mpcrel by default for -mcpu=future

2020-04-21 Thread Michael Meissner via Gcc-patches
On Tue, Apr 07, 2020 at 05:58:01PM -0500, Segher Boessenkool wrote: > > + /* Enable -mprefixed by default on 64-bit 'future' systems. */ > > + if (TARGET_FUTURE && TARGET_POWERPC64 > > + && (rs6000_isa_flags_explicit & OPTION_MASK_PREFIXED) == 0) > > +rs6000_isa_flags |=

Re: [PATCH], PR target/94557, V2, Fix GCC 9.x PowerPC regression due to PR target/93932 back port.

2020-04-16 Thread Michael Meissner via Gcc-patches
On Thu, Apr 16, 2020 at 11:31:17AM -0500, Segher Boessenkool wrote: > Hi! > > On Wed, Apr 15, 2020 at 09:37:32PM -0400, Michael Meissner wrote: > > Fix regression caused by PR target/93932 backport. > > > > When I back ported the fix for PR target/93932 to the GCC 9 branch, I put > > in an > >

[PATCH], PR target/94557, V2, Fix GCC 9.x PowerPC regression due to PR target/93932 back port.

2020-04-15 Thread Michael Meissner via Gcc-patches
Fix regression caused by PR target/93932 backport. When I back ported the fix for PR target/93932 to the GCC 9 branch, I put in an unintended regression when the GCC compiler is optimizing the vec_extract built-in function, and the vector element is in memory, and the index is variable. This

Re: [PATCH], Fix target/94557 PowerPC regression on GCC 9 (variable vec_extract)

2020-04-14 Thread Michael Meissner via Gcc-patches
On Tue, Apr 14, 2020 at 07:39:44AM -0500, Segher Boessenkool wrote: > Hi, > > On Mon, Apr 13, 2020 at 10:24:39PM -0400, Michael Meissner wrote: > > This patch fixes PR target/94557, on PowerPC. It was a regression on the > > GCC 9 > > branch caused by my recent patch for PR target/93932. > > >

[PATCH], Fix target/94557 PowerPC regression on GCC 9 (variable vec_extract)

2020-04-13 Thread Michael Meissner via Gcc-patches
This patch fixes PR target/94557, on PowerPC. It was a regression on the GCC 9 branch caused by my recent patch for PR target/93932. The patch for 93932 was a back port from the master branch of a fix for the vec_extract built-in function. This patch fixes the case where we are optimizing a

[PATCH], PowerPC, Backport PR 93932 (variable vec_extract) to GCC 9

2020-04-09 Thread Michael Meissner via Gcc-patches
Backport PR target/93932 (variable vec_extract) to GCC 9 This patch backports the fix for PR target/93932 from the current master branch to GCC 9. The patch for the master branch had to be adjusted due to using different constraints (GCC 10 uses the enabled attribute to eliminate alternatives,

[PATCH, V4] PowerPC Turn on -mpcrel by default for -mcpu=future

2020-04-06 Thread Michael Meissner via Gcc-patches
Commit message: Enable -mpcrel for -mcpu=future if it is allowed by the ABI. 2020-04-06 Michael Meissner * config/rs6000/linux64.h (PCREL_SUPPORTED_BY_OS): Enable prefixed PC-relative addressing if the ABI supports it. * config/rs6000/rs6000-cpus.def

[PATCH] Enable -mpcrel on PowerPC -mcpu=future ELF v2 systems, V3

2020-04-02 Thread Michael Meissner via Gcc-patches
Enable -mpcrel on PowerPC -mcpu=future ELF v2 systems, V3 This patch changes the default for -mcpu=future to be -mpcrel (i.e. use PC-relative addressing) if the ABI allows PC-relative relocations and the user did not use either -mno-pcrel or -mno-prefixed. I have changed the spelling of the

Re: [PATCH], Make PowerPC -mcpu=future enable -mpcrel on linux ELFv2

2020-04-01 Thread Michael Meissner via Gcc-patches
On Wed, Apr 01, 2020 at 04:36:05PM -0500, Segher Boessenkool wrote: > On Wed, Apr 01, 2020 at 03:16:52PM -0400, Michael Meissner wrote: > > > > > -/* Support for a future processor's features. Do not enable -mpcrel > > > > > until it > > > > > - is fully functional. */ > > > > > +/* Support

Re: [PATCH], Make PowerPC -mcpu=future enable -mpcrel on linux ELFv2

2020-04-01 Thread Michael Meissner via Gcc-patches
On Mon, Mar 30, 2020 at 05:51:49PM -0500, Segher Boessenkool wrote: > Hi! > > On Mon, Mar 30, 2020 at 12:50:43PM -0500, will schmidt wrote: > > On Fri, 2020-03-27 at 21:31 -0400, Michael Meissner via Gcc-patches > > > * config/rs6000/rs6000.c (PCREL_SUP

[PATCH], Make PowerPC -mcpu=future enable -mpcrel on linux ELFv2

2020-03-27 Thread Michael Meissner via Gcc-patches
This is a revised version of the patch I posted on March 23rd. The changes are to update the comments and improve the ChangeLog. There were no regressions when I did the bootstrap and make check steps. I verified that -mcpu=future does turn on -mprecl if you are targeting a Linux ELF v2 system

Re: [PATCH], Set -mpcrel by default on Linux 64-bit systems for -mcpu=future

2020-03-27 Thread Michael Meissner via Gcc-patches
On Wed, Mar 25, 2020 at 11:07:04AM -0500, will schmidt wrote: > Hi, > Comments inline. > > > Is this patch acceptable to be committed to the master branch. I have done > > various tests with this patch, including most recently bootstraping and > > running > > make check. I have built the Spec

[PATCH], Set -mpcrel by default on Linux 64-bit systems for -mcpu=future

2020-03-23 Thread Michael Meissner via Gcc-patches
This is a revision of a patch that I've submitted several times. It makes -mpcrel the default on Linux 64-bit systems that use ELF v2, use the medium code mode, and if the user did not disable prefixed load/store instructions for -mcpu=future. Previous versions of the patch had two macros that

<    2   3   4   5   6   7