[Committed] IBM Z: Spectre: Prevent thunk cfi to be emitted with -fno-dwarf2-cfi-asm

2018-04-12 Thread Andreas Krebbel
The CFI magic we emit as part of the indirect branch thunks in order to have somewhat sane unwind information must not be emitted with -fno-dwarf2-cfi-asm. Committed to mainline, gcc-7-branch, and gcc-6-branch. gcc/ChangeLog: 2018-04-12 Andreas Krebbel <kreb...@linux.vnet.ibm.

Re: [PATCH] Invoke maybe_warn_nonstring_arg for strcpy/stpcpy builtins.

2018-04-12 Thread Andreas Krebbel
On 04/11/2018 11:20 PM, Martin Sebor wrote: > On 04/11/2018 06:47 AM, Andreas Krebbel wrote: >> On 04/11/2018 10:02 AM, Jakub Jelinek wrote: >>> On Wed, Apr 11, 2018 at 09:48:05AM +0200, Andreas Krebbel wrote: >>>> c-c++-common/attr-nonstring-3.c fail

Re: [PATCH] Invoke maybe_warn_nonstring_arg for strcpy/stpcpy builtins.

2018-04-11 Thread Andreas Krebbel
On 04/11/2018 10:02 AM, Jakub Jelinek wrote: > On Wed, Apr 11, 2018 at 09:48:05AM +0200, Andreas Krebbel wrote: >> c-c++-common/attr-nonstring-3.c fails on IBM Z. The reason appears to be >> that we provide builtin implementations for strcpy and stpcpy. The >> warning

[PATCH] Invoke maybe_warn_nonstring_arg for strcpy/stpcpy builtins.

2018-04-11 Thread Andreas Krebbel
: 2018-04-11 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * builtins.c (expand_builtin_strcpy): Invoke maybe_warn_nonstring_arg. (expand_builtin_stpcpy): Likewise. --- gcc/builtins.c | 12 1 file changed, 12 insertions(+) diff --git a/gcc/builtins.c

[PATCH 3/3] IBM Z: Fix vcond-shift testcase.

2018-04-06 Thread Andreas Krebbel
gcc/testsuite/ChangeLog: 2018-04-06 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gcc.target/s390/vector/vcond-shift.c: Use the proper conditions to trigger the optimization. Do some cleanup and function renaming. Add more test functions. --- gcc/testsuite/gcc.

[PATCH 2/3] IBM Z: Use the dedicated NOP instructions for "nop"

2018-04-06 Thread Andreas Krebbel
giush NOPs generated for hotpatching from NOPs added when using -O0 to attach location information to it. Hence I had to make sure that the hotpatch testcases get skipped when compiling without optimization. gcc/ChangeLog: 2018-04-06 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * co

[PATCH 1/3] Wattributes.c testcase: Disable warning check for IBM Z.

2018-04-06 Thread Andreas Krebbel
On IBM Z we enforce function alignment to 8 bytes. Hence we get an error instead of a warning when trying to specify smaller alignments. gcc/testsuite/ChangeLog: 2018-04-06 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * c-c++-common/Wattributes.c: Disable warning for s390*

[Committed 0/3] IBM Z testsuite fixes

2018-04-06 Thread Andreas Krebbel
These patch fix a couple of testsuite fails for IBM Z. Bootstrapped and regression tested on s390x. Committed to mainline Andreas Krebbel (3): Wattributes.c testcase: Disable warning check for IBM Z. IBM Z: Use the dedicated NOP instructions for "nop" IBM Z: Fix vcond-shif

Re: [PATCH 1/3] improve detection of attribute conflicts (PR 81544)

2018-04-05 Thread Andreas Krebbel
On 04/04/2018 07:34 PM, Jakub Jelinek wrote: > On Wed, Apr 04, 2018 at 06:51:00PM +0200, Andreas Krebbel wrote: >>> On targets enforcing a function alignment bigger than 4 bytes this triggers >>> an error instead: >>> >>> +inline int ATTR ((aligned

Re: [PATCH 1/3] improve detection of attribute conflicts (PR 81544)

2018-04-04 Thread Andreas Krebbel
On 04/04/2018 06:16 PM, Andreas Krebbel wrote: > On 10/03/2017 12:23 AM, Jeff Law wrote: >> On 09/20/2017 12:04 PM, Martin Sebor wrote: >>> On 09/19/2017 03:00 PM, Joseph Myers wrote: >>>> On Tue, 19 Sep 2017, Martin Sebor wrote: >>>> >>>>>&

Re: [PATCH 1/3] improve detection of attribute conflicts (PR 81544)

2018-04-04 Thread Andreas Krebbel
On 10/03/2017 12:23 AM, Jeff Law wrote: > On 09/20/2017 12:04 PM, Martin Sebor wrote: >> On 09/19/2017 03:00 PM, Joseph Myers wrote: >>> On Tue, 19 Sep 2017, Martin Sebor wrote: >>> > In general, the data structures where you need to ensure manually that if > > attribute A is listed in 

Re: [PATCH] S/390: Set ABI default based on uname

2018-03-20 Thread Andreas Krebbel
On 03/13/2018 04:53 PM, Michael Matz wrote: > Hi, > > On Tue, 13 Mar 2018, Andreas Krebbel wrote: > >> Leaving history aside don't you agree that it would have been more >> sensible to require a -m option only if you want to build for an ABI >> different f

Re: [PATCH] S/390: Set ABI default based on uname

2018-03-13 Thread Andreas Krebbel
On 03/12/2018 06:50 PM, Jakub Jelinek wrote: > On Mon, Mar 12, 2018 at 06:42:15PM +0100, Andreas Krebbel wrote: >> On 03/12/2018 06:31 PM, Jakub Jelinek wrote: >>> On Mon, Mar 12, 2018 at 06:28:09PM +0100, Andreas Krebbel wrote: >>>> Currently the default ABI opti

Re: [PATCH] S/390: Set ABI default based on uname

2018-03-12 Thread Andreas Krebbel
On 03/12/2018 06:31 PM, Jakub Jelinek wrote: > On Mon, Mar 12, 2018 at 06:28:09PM +0100, Andreas Krebbel wrote: >> Currently the default ABI option for a GCC built on a 64 bit system is >> always -m64. This is inconvenient when e.g. building 32 bit libraries >> on a 64 bit s

[PATCH] S/390: Set ABI default based on uname

2018-03-12 Thread Andreas Krebbel
days for comments. gcc/ChangeLog: 2018-03-12 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/driver-native.c (s390_host_detect_target_bits): New function. * config/s390/s390.h: Invoke s390_host_detect_target_bits if neither -m31 nor -m64 ha

[Committed] GCC 6: S/390: Disable branch prediction

2018-03-07 Thread Andreas Krebbel
Bootstrapped and regression tested with z900 and z10 on s390x. gcc/ChangeLog: 2018-03-07 Andreas Krebbel <kreb...@linux.vnet.ibm.com> Backport from mainline 2018-02-08 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390-opts.h (enum ind

[PATCH] S/390: libatomic: Fix 16 byte atomic exchange

2018-03-05 Thread Andreas Krebbel
n, Inc. + Contributed by Andreas Krebbel <kreb...@linux.vnet.ibm.com> + + This file is part of the GNU Atomic Library (libatomic). + + Libatomic is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Softwar

[Committed] S/390: Fix PR84295

2018-02-09 Thread Andreas Krebbel
Bootstrapped and regression tested with --with-arch=z14 and --with-arch=z900. Glibc build is clean with that patch using -mindirect-branch=thunk and -mfunction-return=thunk. gcc/ChangeLog: 2018-02-09 Andreas Krebbel <kreb...@linux.vnet.ibm.com> PR target/PR84295 * confi

[Committed] S/390: Disable branch prediction for indirect branches

2018-02-08 Thread Andreas Krebbel
gcc/ChangeLog: 2018-02-08 Andreas Krebbel <kreb...@linux.vnet.ibm.com> Backport from mainline 2018-02-08 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390-opts.h (enum indirect_branch): Define. * config/s390/s

Re: [PATCH] S/390: Disable prediction of indirect branches

2018-02-08 Thread Andreas Krebbel
On 02/08/2018 12:33 PM, Richard Biener wrote: > On Wed, Feb 7, 2018 at 1:01 PM, Andreas Krebbel > <kreb...@linux.vnet.ibm.com> wrote: >> This patch implements GCC support for mitigating vulnerability >> CVE-2017-5715 known as Spectre #2 on IBM Z. >> >> In ord

[PATCH] S/390: Disable prediction of indirect branches

2018-02-07 Thread Andreas Krebbel
into one section per option. I plan to commit the patch tomorrow. gcc/ChangeLog: 2018-02-07 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390-opts.h (enum indirect_branch): Define. * config/s390/s390-protos.h (s390_return_addr_from_

[Committed] S/390: PR83420: Improve hotpatch option parsing.

2017-12-18 Thread Andreas Krebbel
equals destination size [-Werror=stringop-truncation] strncpy (s, opt->arg, 256); ^~ gcc/ChangeLog: 2017-12-18 Andreas Krebbel <kreb...@linux.vnet.ibm.com> PR target/83420 * config/s390/s390.c (s390_option_override): Avoid strncpy.

Re: [PATCH] lra: Clobbers in a parallel are earlyclobbers (PR83245)

2017-12-04 Thread Andreas Krebbel
On 12/04/2017 01:13 AM, Vladimir Makarov wrote: > > > On 12/02/2017 01:59 PM, Segher Boessenkool wrote: >> The documentation (rtl.texi) says: >> >>When a @code{clobber} expression for a register appears inside a >>@code{parallel} with other side effects, the register allocator >>

[Committed] S/390: Split MVC instruction for better forwarding

2017-12-01 Thread Andreas Krebbel
Certain lengths used in an MVC instruction might disable operand forwarding. Split MVCs into up to 2 forwardable ones if possible. Bootstrapped and regtested on s390x. gcc/ChangeLog: 2017-12-01 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/predica

Re: [RFC] New pragma exec_charset

2017-10-24 Thread Andreas Krebbel
On 10/24/2017 05:33 PM, Martin Sebor wrote: >>> My concern with this pragma/attribute and inlining has to do with >>> strings in one exec charset being propagated into functions that >>> operate on strings in another charset. E.g., like in the test >>> case below that's "miscompiled" with your

Re: [RFC] New pragma exec_charset

2017-10-24 Thread Andreas Krebbel
On 10/23/2017 06:14 PM, Martin Sebor wrote: ... > It seems to me that before exposing a new mechanism to control > the exec charset it would be prudent to a) plug at least the > biggest holes to make the feature more reliable (in my mind, > that's at least -Wformat), and b) make sure the pragma

Re: [RFC] New pragma exec_charset

2017-10-23 Thread Andreas Krebbel
On 10/19/2017 07:13 PM, Martin Sebor wrote: > On 10/19/2017 09:50 AM, Andreas Krebbel wrote: >> The TPF operating system uses the GCC S/390 backend. They set an >> EBCDIC exec charset for compilation using -fexec-charset. However, >> certain libraries require ASCII strin

Re: [RFC] New pragma exec_charset

2017-10-20 Thread Andreas Krebbel
On 10/20/2017 10:28 AM, Richard Biener wrote: > On Fri, Oct 20, 2017 at 9:53 AM, Jakub Jelinek wrote: >> On Fri, Oct 20, 2017 at 09:48:38AM +0200, Richard Biener wrote: >>> How does it work semantically to have different exec charsets? That is, >>> if "strings" flow from a

[RFC] New pragma exec_charset

2017-10-19 Thread Andreas Krebbel
The TPF operating system uses the GCC S/390 backend. They set an EBCDIC exec charset for compilation using -fexec-charset. However, certain libraries require ASCII strings instead. In order to be able to put calls to that library into the normal code it is required to switch the exec charset

[Committed] S/390: Fix vec-cmp-2 testcase

2017-10-18 Thread Andreas Krebbel
/testsuite/ChangeLog: 2017-10-18 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gcc.target/s390/zvector/vec-cmp-2.c (all_eq_double, all_ne_double, all_gt_double) (all_lt_double, all_ge_double, all_le_double) (any_eq_double, any_ne_double, any_gt_

Re: [PATCH 2/2] S/390: Do not end groups after fallthru edge

2017-10-16 Thread Andreas Krebbel
On 10/11/2017 01:53 PM, Robin Dapp wrote: > This patch fixes cases where we start a new group although the previous one > has > not ended. > > Regression tested on s390x. > > gcc/ChangeLog: > > 2017-10-11 Robin Dapp > > * config/s390/s390.c

Re: [PATCH 1/2] S/390: Handle long-running instructions

2017-10-16 Thread Andreas Krebbel
On 10/11/2017 01:53 PM, Robin Dapp wrote: ... > @@ -14623,8 +14659,13 @@ s390_sched_variable_issue (FILE *file, int verbose, > rtx_insn *insn, int more) > case 1: > case 2: > case S390_SCHED_STATE_NORMAL: > + if (s390_sched_state == 0) > +

Re: [committed] s390 vec_xor fix (PR target/82464)

2017-10-09 Thread Andreas Krebbel
On 10/09/2017 01:42 PM, Jakub Jelinek wrote: > Hi! > > I've committed following patch which has been preapproved by Andreas in the > PR. No testcase right now, it will be covered by testsuite later together > with all the other intrinsics. > > 2017-10-09 Jakub Jelinek > >

[Committed] S/390: Fix mode in vector merge pattern.

2017-10-04 Thread Andreas Krebbel
Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/vx-builtins.md ("vec_mergeh") ("vec_mergel"): Change mode iterator to V_128_NOSINGLE. --- gcc/config/s390/vx-builtins.md | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

Re: [PATCH 4/5] New target check: vect_nopeel - v2

2017-09-28 Thread Andreas Krebbel
On 09/27/2017 07:30 PM, Sandra Loosemore wrote: > On 09/27/2017 03:05 AM, Rainer Orth wrote: >> Hi Andreas, >> >>> On 09/27/2017 10:10 AM, Rainer Orth wrote: Hi Andreas, > On 09/26/2017 02:26 PM, Rainer Orth wrote: >> Hi Andreas, >> >>> diff --git

Re: [PATCH 4/5] New target check: vect_nopeel - v2

2017-09-28 Thread Andreas Krebbel
On 09/26/2017 06:49 PM, Richard Sandiford wrote: > Andreas Krebbel <kreb...@linux.vnet.ibm.com> writes: ... > Sorry for the bikeshedding, but how about having a positive test > like vect_can_peel instead? ! vect_no... can be hard to read in > complex conditions. (There's al

[PATCH 5/5] New target check: vect_can_peel

2017-09-28 Thread Andreas Krebbel
gcc/ChangeLog: 2017-09-28 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * doc/sourcebuild.texi: Document vect_can_peel. gcc/testsuite/ChangeLog: 2017-09-28 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * g++.dg/vect/slp-pr56812.cc: xfail for targets whic

[PATCH 4/5] New target check for double<->int conversions

2017-09-28 Thread Andreas Krebbel
gcc/ChangeLog: 2017-09-28 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * doc/sourcebuild.texi: Document vect_intdouble_cvt and vect_doubleint_cvt. gcc/testsuite/ChangeLog: 2017-09-28 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gcc.dg/vect/pr6625

[PATCH 3/5] New target check: vect_long_mult

2017-09-28 Thread Andreas Krebbel
We don't have a 64 bit vector integer multiply on z. Add a specific check for that. gcc/ChangeLog: 2017-09-28 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * doc/sourcebuild.texi: Document vect_long_mult. gcc/testsuite/ChangeLog: 2017-09-28 Andreas Krebbel

[PATCH 2/5] Testcases using dg-options require at least -mzarch.

2017-09-28 Thread Andreas Krebbel
Testcases which override the vect default options using dg-options need at least -mzarch on S/390 32 bit. gcc/testsuite/ChangeLog: 2017-09-28 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gfortran.dg/vect/fast-math-mgrid-resid.f: Use -mzarch on S/390. * gfortran.d

[PATCH 1/5] Enable vect_float with S/390 VXE and adjust testcases

2017-09-28 Thread Andreas Krebbel
the vect_float target check to return 1 only on z14. gcc/testsuite/ChangeLog: 2017-09-28 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * lib/target-supports.exp (check_effective_target_vect_float): Return 1 being on a S/390 with VXE. * gcc.dg/vect/pr31699.c: R

[PATCH 0/5] vect testsuite adjustments for S/390 - v2

2017-09-28 Thread Andreas Krebbel
added Ok for mainline? Andreas Krebbel (5): Enable vect_float with S/390 VXE and adjust testcases Testcases using dg-options require at least -mzarch. New target check: vect_long_mult New target check for double<->int conversions New target check: vect_can_peel gcc/doc/sourcebuil

Re: [PATCH 4/5] New target check: vect_nopeel - v2

2017-09-27 Thread Andreas Krebbel
On 09/27/2017 10:10 AM, Rainer Orth wrote: > Hi Andreas, > >> On 09/26/2017 02:26 PM, Rainer Orth wrote: >>> Hi Andreas, >>> diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 307c726..3acfd85 100644 --- a/gcc/doc/sourcebuild.texi +++

Re: [PATCH 4/5] New target check: vect_nopeel - v2

2017-09-27 Thread Andreas Krebbel
On 09/26/2017 02:26 PM, Rainer Orth wrote: > Hi Andreas, > >> diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi >> index 307c726..3acfd85 100644 >> --- a/gcc/doc/sourcebuild.texi >> +++ b/gcc/doc/sourcebuild.texi >> @@ -1398,6 +1398,9 @@ Target supports a vector misalign access. >>

Re: [PATCH 2/5] pr60656.c: New target check: vect_mult_long

2017-09-26 Thread Andreas Krebbel
On 09/26/2017 01:57 PM, Rainer Orth wrote: > Hi Andreas, > >> We don't have a 64 bit vector integer multiply on z. Add a specific >> check for that. >> >> 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> >> >> * gcc.dg/vect/pr606

Re: [PATCH 4/5] New target check: vect_nopeel - v2

2017-09-26 Thread Andreas Krebbel
- vect_nopeel renamed to vect_no_peel - documentation added. gcc/testsuite/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * doc/sourcebuild.texi: Document vect_no_peel. gcc/testsuite/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vne

Re: [PATCH 1/8] Enable vect testcases on S/390.

2017-09-26 Thread Andreas Krebbel
On 09/26/2017 01:06 PM, Rainer Orth wrote: > Hi Andreas, > >> Add s390 platform checks where appropriate. >> >> gcc/testsuite/ChangeLog: >> >> 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> >> >> * lib/target-supports.e

[PATCH 3/5] pr65947-9.c: Requires char to be signed by default.

2017-09-26 Thread Andreas Krebbel
Fails on S/390 with char defaulting to unsigned char. gcc/testsuite/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gcc.dg/vect/pr65947-9.c: Use signed char explicitly. --- gcc/testsuite/gcc.dg/vect/pr65947-9.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH 4/5] New target check: vect_nopeel

2017-09-26 Thread Andreas Krebbel
Without peeling loops for vector alignment the vectorization costs are lower and in some cases make the loop vectorizer cover optimizations which otherwise would be handelt in slp instead. This adds a new target check for that purpose. gcc/testsuite/ChangeLog: 2017-09-26 Andreas Krebbel <k

[PATCH 2/5] pr60656.c: New target check: vect_mult_long

2017-09-26 Thread Andreas Krebbel
We don't have a 64 bit vector integer multiply on z. Add a specific check for that. 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gcc.dg/vect/pr60656.c: Check vect_mult_long. * lib/target-supports.exp (check_effective_target_vect_mult_long): Ne

[PATCH 5/5] Testcases using dg-options require at least -mzarch.

2017-09-26 Thread Andreas Krebbel
Testcases which override the vect default options using dg-options need at least -mzarch on S/390 32 bit. gcc/testsuite/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gfortran.dg/vect/fast-math-mgrid-resid.f: Use -mzarch on S/390. * gfortran.d

[PATCH 1/5] Enable vect_float with S/390 VXE and adjust testcases

2017-09-26 Thread Andreas Krebbel
the vect_float target check to return 1 only on z14. gcc/testsuite/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * lib/target-supports.exp (check_effective_target_vect_float): Return 1 being on a S/390 with VXE. * gcc.dg/vect/pr31699.c: R

[PATCH 0/5] vect testsuite adjustments for S/390

2017-09-26 Thread Andreas Krebbel
These patches adjust the vect testcases and target support checks in order to make the right set of testcases to be run on S/390 (z13 and z14). Ok for mainline? Andreas Krebbel (5): Enable vect_float with S/390 VXE and adjust testcases pr60656.c: New target check: vect_mult_long pr65947-9

[PATCH 8/8] S/390: Fix vmslg instruction and builtin.

2017-09-26 Thread Andreas Krebbel
gcc/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/vx-builtins.md ("vmslg"): Add missing operand in assembler output. * config/s390/s390-builtins.def: Fix constraint on op4. --- gcc/ChangeLog | 6 ++

[PATCH 6/8] S/390: Set the preferred mode for float vectors

2017-09-26 Thread Andreas Krebbel
gcc/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode for SFmode. --- gcc/ChangeLog | 5 + gcc/config/s390/s390.c | 8 2 files changed, 13 insertions(+) diff --git

[PATCH 7/8] S/390: Fix vector fp unordered compares

2017-09-26 Thread Andreas Krebbel
V2DF mode was still hard-coded here. gcc/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.c (s390_expand_vec_compare): Use the new mode independent expanders. * config/s390/vector.md ("vec_cmpuneq&quo

[PATCH 5/8] S/390: Fix rtl standard names for vector unpack low->lo

2017-09-26 Thread Andreas Krebbel
gcc/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to vec_unpacks_lo_v16qi. ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi. --- gcc/ChangeLog

[PATCH 4/8] S/390: Add FP vec_pack/unpack

2017-09-26 Thread Andreas Krebbel
gcc/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/vector.md ("vec_unpacks_lo_v4sf") ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df") ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df&qu

[PATCH 1/8] Enable vect testcases on S/390.

2017-09-26 Thread Andreas Krebbel
Add s390 platform checks where appropriate. gcc/testsuite/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * lib/target-supports.exp: Enable tests for S/390. --- gcc/testsuite/ChangeLog | 4 ++ gcc/testsuite/lib/target-supports.exp

[PATCH 3/8] S/390: Add support for vec_shr

2017-09-26 Thread Andreas Krebbel
gcc/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/predicates.md ("const_shift_by_byte_operand"): New predicate. * config/s390/vector.md ("*vec_srb"): Change modes to V_128 and V16QI. (&qu

[PATCH 2/8] S/390: Add widening vector mult lo/hi patterns

2017-09-26 Thread Andreas Krebbel
Add support for widening vector multiply lo/hi patterns. These do not directly match on IBM Z instructions but can be emulated with even/odd + vector merge. gcc/ChangeLog: 2017-09-26 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/vector.md ("vec_wide

[PATCH 0/8] S/390: Enable vect tests on S/390 + fixes and improvements

2017-09-26 Thread Andreas Krebbel
Committed to mainline Andreas Krebbel (8): Enable vect testcases on S/390. S/390: Add widening vector mult lo/hi patterns S/390: Add support for vec_shr S/390: Add FP vec_pack/unpack S/390: Fix rtl standard names for vector unpack low->lo S/390: Set the preferred mode for fl

[Committed] S/390: Support z14 as CPU name.

2017-07-31 Thread Andreas Krebbel
-07-31 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config.gcc: Add z14. * config/s390/driver-native.c (s390_host_detect_local_cpu): Add CPU model numbers for z13s and z14. * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace arch12 wi

Re: [PATCH] Switch vec_init and vec_extract optabs to 2 mode optab to allow extraction of vector from vector or initialization of vector from smaller vectors (PR target/80846)

2017-07-27 Thread Andreas Krebbel
On 07/25/2017 11:14 AM, Jakub Jelinek wrote: S/390 parts are ok. -Andreas-

[Committed] S/390: Fix PR81534

2017-07-27 Thread Andreas Krebbel
d GCC 7 branch. gcc/ChangeLog: 2017-07-27 Andreas Krebbel <kreb...@linux.vnet.ibm.com> PR target/81534 * config/s390/s390.md ("*atomic_compare_and_swap_1") ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 08/08 V2

2017-07-21 Thread Andreas Krebbel
Hi, I've used your patch as the base and applied my changes on top. The attached patch is the result, so it is supposed to replace your version. It now also supports emitting a runtime loop. It bootstraps fine but unfortunately I see an Ada regression which I haven't tracked down yet. > FAIL:

Re: [PATCH] Fix PR81362: Vector peeling

2017-07-18 Thread Andreas Krebbel
On 07/12/2017 05:11 PM, Robin Dapp wrote: > gcc/ChangeLog: > > 2017-07-12 Robin Dapp > > * (vect_enhance_data_refs_alignment): > Remove body_cost_vec from _vect_peel_extended_info. > tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost): >

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 08/08

2017-07-14 Thread Andreas Krebbel
On 07/11/2017 11:21 PM, Jeff Law wrote: > This patch adds s390 support for stack-clash mitigation. > > s390's most interesting property is that the caller allocates space for > the callee to save registers into. > > So much like aarch64, we start with a very conservative assumption about > the

[Committed] S/390: Calculate costs for load/store on condition

2017-07-12 Thread Andreas Krebbel
This adds code to the backend rtx_costs function in order to model the costs of a load/store on condition. Bootstrapped and regression tested on s390x. gcc/ChangeLog: 2017-07-12 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.c (s390_rtx_costs): Return proper

[Committed] S/390: Remove loc splitter

2017-07-12 Thread Andreas Krebbel
-12 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.md: Remove movcc splitter. --- gcc/ChangeLog | 4 gcc/config/s390/s390.md | 30 -- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/Cha

[PATCH] PR81393: S/390: libgo: Fix ptrace register set accessors.

2017-07-12 Thread Andreas Krebbel
ptrace SETREGS and GETREGS were never supported on S/390. The macros were accidentally defined in the Glibc header though. A recent Glibc change removed them breaking libgo build on S/390. This patch changes the ptrace calls to use PEEKUSR_AREA/POKEUSR_AREA to access the register sets. That's

[Committed] profile-count.h: Fix typos and whitespace issues.

2017-06-30 Thread Andreas Krebbel
I noticed a couple of typos and whitespace issues in profile-count.h. I've committed the following patch to fix them. gcc/ChangeLog: 2017-06-30 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * profile-count.h (enum profile_quality): Fix typos and whitespace issues. --

[Committed] S/390: Adjust to the recent branch probability changes.

2017-06-30 Thread Andreas Krebbel
This fixes the bootstrap failure triggered by the recent changes wrt branch probabilities aka emit_cmp_and_jump_insns does not accept integers as branch probability anymore. Regressiontested on s390x. gcc/ChangeLog: 2017-06-30 Andreas Krebbel <kreb...@linux.vnet.ibm.com> *

[Committed] S/390: New option -mpic-data-is-text-relative

2017-06-28 Thread Andreas Krebbel
will then be handling via GOT. Bootstrapped and regression tested on s390x. Committed to mainline. Bye, -Andreas- gcc/testsuite/ChangeLog: 2017-06-28 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gcc.target/s390/nodatarel-1.c: New test. gcc/ChangeLog: 2017-06-28 Andreas Krebbel

[PATCH, go]: S/390: Fix generation of PtraceRegs

2017-06-27 Thread Andreas Krebbel
esn't. The only user however appear to be syscall_linux_s390(x).go. The attached patch removes the mksysino.sh S/390 specific handling and adjusts the syscall_linux_s390* file accordingly. This fixes the bootstrap on s390x. commit e2903db6cca0a97c3320ce58ec1405cc3bedb5c2 Author: Andreas Krebbel &

[Committed] S/390: Don't fetch the return address early with ooo

2017-06-01 Thread Andreas Krebbel
: 2017-06-01 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.c (s390_emit_epilogue): Disable early return address fetch for z10 or later. --- gcc/config/s390/s390.c | 63 +- 1 file changed, 32 insertions(+), 31 del

[Committed] S/390: Fix PR80725.

2017-05-24 Thread Andreas Krebbel
No regressions on s390x. Applied to mainline. Ok for GCC 7 branch as well? Bye, -Andreas- gcc/ChangeLog: 2017-05-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> PR target/80725 * config/s390/s390.c (s390_check_qrst_address): Check incoming address a

Re: [PATCH v5] S/390: Optimize atomic_compare_exchange and atomic_compare builtins.

2017-04-25 Thread Andreas Krebbel
On 04/11/2017 04:20 PM, Dominik Vogt wrote: > On Mon, Mar 27, 2017 at 09:27:35PM +0100, Dominik Vogt wrote: >> The attached patch optimizes the atomic_exchange and >> atomic_compare patterns on s390 and s390x (mostly limited to >> SImode and DImode). Among general optimizaation, the changes fix

[PATCH] S/390: PR80464: Split MEM->GPR vector moves

2017-04-24 Thread Andreas Krebbel
We do this already for TImode values but it was missing for vector modes. Bootstrapped and regression tested on s390x. Bye, -Andreas- gcc/ChangeLog: 2017-04-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/vector.md: Split MEM->GPR vector moves for

[PATCH] S/390: PR79895: Fix TImode constant handling

2017-04-24 Thread Andreas Krebbel
on s390x. Bye, -Andreas- gcc/ChangeLog: 2017-04-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/predicates.md (reload_const_wide_int_operand): New predicate. * config/s390/s390.md ("movti"): Remove d/P alternative. ("movti_bi

Re: [PATCH] S/390: Optimize atomic_compare_exchange and atomic_compare builtins.

2017-04-11 Thread Andreas Krebbel
On 04/10/2017 11:37 PM, Ulrich Weigand wrote: > Dominik Vogt wrote: > >> So, we could add a special case for const0_rtx that generates the >> LT pattern and does not rely on Combine, and get rid of the >> peephole. I'm not sure this is worthwhile thoug, because the >> peephole has other

Re: [PATCH] PR target/79890: S/390: Fix crash.

2017-04-05 Thread Andreas Krebbel
On 04/05/2017 12:08 AM, Dominik Vogt wrote: > The attached patch fixes PR 79890. Bootstrapped and regression > tested on s390x biarch and s390. Applied. Thanks! -Andreas-

Re: [RFC]: Fix Ada boostrap failure on S/390 with -mzarch

2017-04-04 Thread Andreas Krebbel
well). Which one do you prefer? > > Having System.Word_Size != Standard'Word_Size is a bit disturbing. Does it > work to change only Memory_Size to 2 ** Long_Integer'Size? This will also > correct the definition of Address below. This worked as well. I've committed the following patch: g

[RFC]: Fix Ada boostrap failure on S/390 with -mzarch

2017-04-03 Thread Andreas Krebbel
Hi Eric, I ran into a similiar problem as PR80117 on S/390 starting with your patch merging the system*.ads files for some biarch plattforms. Starting with that change GCC does not bootstrap on S/390 when configured with --with-mode=zarch. On S/390 UNITS_PER_WORD is: 8 with -m64 4 with -m31 8

Re: [PATCH] [gcc, testsuite] Don't xfail on s390.

2017-04-03 Thread Andreas Krebbel
On 03/29/2017 12:23 PM, Dominik Vogt wrote: > The attached patch removes the XFAIL in attr-alloc_size-11.c on > s390. (PR 79356). > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79356 Applied. Thanks! -Andreas-

Re: [PATCH] Fix s390 testcase vcond-shift

2017-04-03 Thread Andreas Krebbel
On 03/27/2017 05:03 PM, Robin Dapp wrote: > this patch fixes the vcond shift testcase that failed since setting > PARAM_MIN_VECT_LOOP_BOUND in the s390 backend. Applied. Thanks! -Andreas-

[PATCH 15/16] S/390: arch12: Support new vector floating point modes.

2017-03-24 Thread Andreas Krebbel
This patch adds support for the new floating point vector elements (SF and TF) introduced with arch12. gcc/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.c (s390_expand_vec_compare): Support other vector floating point modes tha

[PATCH 12/16] S/390: arch12: Add vllezlf instruction.

2017-03-24 Thread Andreas Krebbel
This adds support for the vector load element and zero instruction and makes sure it is used when initializing vectors with elements while setting the rest to 0. gcc/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.c (s390_expand_vec_init

[PATCH 09/16] S/390: arch12: Add arch12 option.

2017-03-24 Thread Andreas Krebbel
This patch covers the mechanical work of making the new architecture option arch12 available wherever it will be needed later. gcc/testsuite/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gcc.target/s390/s390.exp: Run tests in arch12 and vxe dirs.

[PATCH 14/16] S/390: arch12: Support the mul/add/subtract instructions.

2017-03-24 Thread Andreas Krebbel
gcc/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3") ("mulditi3_2", "*muldi3_sign"): New patterns. ("muldi3", &

[PATCH 08/16] S/390: Rearrange fixuns_trunc pattern definitions.

2017-03-24 Thread Andreas Krebbel
Log: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.md ("fixuns_truncdddi2", "fixuns_trunctddi2") ("fixuns_trunc2"): Merge into ... ("fixuns_trunc2"): New expander. ("

[PATCH 11/16] S/390: arch12: New vector popcount variants

2017-03-24 Thread Andreas Krebbel
arch12 provides pop count vector instructions for bigger elements than just chars. gcc/testsuite/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gcc.target/s390/vxe/popcount-1.c: New test. gcc/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vne

[PATCH 13/16] S/390: arch12: Add indirect branch pattern

2017-03-24 Thread Andreas Krebbel
This adds support for the branch indirect instruction. gcc/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.md ("indirect_jump"): Turn insn definition into expander. ("*indirect_jump", "*indirect2_

[PATCH 10/16] S/390: arch12: Add support for new vector bit operations.

2017-03-24 Thread Andreas Krebbel
This patch adds support for the new bit operations introduced with arch12. The patch also renames the one complement pattern to the proper RTL standard name. 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.c (s390_rtx_costs): Return low

[PATCH 03/16] S/390: vec_init improvements

2017-03-24 Thread Andreas Krebbel
This enables the vec_init pattern also for V4SF, V1TI, and V1TF. gcc/testsuite/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gcc.target/s390/vector/vec-init-2.c: New test. gcc/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vne

[PATCH 07/16] S/390: Use wfc for scalar vector compares

2017-03-24 Thread Andreas Krebbel
usually do. So this results in quite some code to be removed from the backend. Regression tested on s390x. gcc/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/2964.md: Remove the single element vector compare instructions which are no longe

[PATCH 06/16] S/390: Move and rename vector check.

2017-03-24 Thread Andreas Krebbel
using that check. gcc/testsuite/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * gcc.target/s390/s390.exp (check_effective_target_vector): Include target-supports.exp and move target_vector check routine ... * lib/target-suppor

[PATCH 04/16] S/390: movsf/sd pattern fixes.

2017-03-24 Thread Andreas Krebbel
The SD/SFmode move pattern used a wrong mnemonic for vector load element. On the vector load element instruction was an operand missing. Regression tested on s390x. 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.md ("mov" SD_SF): C

[PATCH 05/16] S/390: movdf improvements

2017-03-24 Thread Andreas Krebbel
in the mov_64dfp pattern instead. Regression tested on s390x gcc/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.md ("mov_64dfp" DD_DF): Use vleig for loading a FP zero. ("*mov_64" DD_DF): Remo

[PATCH 01/16] S/390: Rename cpu facility vec to vx.

2017-03-24 Thread Andreas Krebbel
gcc/ChangeLog: 2017-03-24 Andreas Krebbel <kreb...@linux.vnet.ibm.com> * config/s390/s390.md: Rename the cpu facilty vec to vx throughout the file. --- gcc/ChangeLog | 5 + gcc/config/s390/s390.md | 46 +++--- 2

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