public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH 08/13] S/390 zvector builtin support.
Date: Mon, 11 May 2015 13:41:00 -0000	[thread overview]
Message-ID: <20150511134050.GA23075@maggie> (raw)
In-Reply-To: <1431350621-21405-1-git-send-email-krebbel@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 3342 bytes --]

With this patch GCC implements an Altivec style set of builtins to
make use of vector instructions in C/C++ code.  This is provided for
compatibility with the IBM XL compiler.

gcc/
	* config.gcc: Add vecintrin.h to extra_headers.  Add s390-c.o to
	c_target_objs and cxx_target_objs.  Add t-s390 to tmake_file.
	* config/s390/s390-builtin-types.def: New file.
	* config/s390/s390-builtins.def: New file.
	* config/s390/s390-builtins.h: New file.
	* config/s390/s390-c.c: New file.
	* config/s390/s390-modes.def: Add modes CCVEQANY, CCVH,
	CCVHANY, CCVHU, CCVHUANY, CCVFHANY, CCVFHEANY.
	* config/s390/s390-protos.h (s390_expand_vec_compare_cc)
	(s390_cpu_cpp_builtins, s390_register_target_pragmas): Add
	prototypes.
	* config/s390/s390.c (s390-builtins.h, s390-builtins.def):
	Include.
	(flags_builtin, flags_overloaded_builtin_var, s390_builtin_types)
	(s390_builtin_fn_types, s390_builtin_decls, code_for_builtin): New
	variable definitions.
	(s390_const_operand_ok): New function.
	(s390_expand_builtin): Rewrite.
	(s390_init_builtins): New function.
	(s390_handle_vectorbool_attribute): New function.
	(s390_attribute_table): Add s390_vector_bool attribute.
	(s390_match_ccmode_set): Handle new cc modes CCVH, CCVHU.
	(s390_branch_condition_mask): Generate masks for new modes.
	(s390_expand_vec_compare_cc): New function.
	(s390_mangle_type): Add mangling for vector bool types.
	(enum s390_builtin): Remove.
	(s390_atomic_assign_expand_fenv): Rename constants for sfpc and
	efpc builtins.
	* config/s390/s390.h (TARGET_CPU_CPP_BUILTINS): Call
	s390_cpu_cpp_builtins.
	(REGISTER_TARGET_PRAGMAS): New macro.
	* config/s390/s390.md: Define more UNSPEC_VEC_* constants.
	(insn_cmp mode attribute): Add new CC modes.
	(s390_sfpc, s390_efpc): Rename patterns to sfpc and efpc.
	(lcbb): New pattern definition.
	* config/s390/s390intrin.h: Include vecintrin.h.
	* config/s390/t-s390: New file.
	* config/s390/vecintrin.h: New file.
	* config/s390/vector.md: Include vx-builtins.md.
	* config/s390/vx-builtins.md: New file.S/390 zvector builtin support.
---
 gcc/config.gcc                         |   24 +-
 gcc/config/s390/s390-builtin-types.def |  747 ++++++++++
 gcc/config/s390/s390-builtins.def      | 2486 ++++++++++++++++++++++++++++++++
 gcc/config/s390/s390-builtins.h        |  160 ++
 gcc/config/s390/s390-c.c               |  907 ++++++++++++
 gcc/config/s390/s390-modes.def         |   30 +
 gcc/config/s390/s390-protos.h          |    8 +
 gcc/config/s390/s390.c                 |  833 ++++++++---
 gcc/config/s390/s390.h                 |   27 +-
 gcc/config/s390/s390.md                |  118 +-
 gcc/config/s390/s390.opt               |    4 +
 gcc/config/s390/s390intrin.h           |    3 +
 gcc/config/s390/t-s390                 |   27 +
 gcc/config/s390/vecintrin.h            |  311 ++++
 gcc/config/s390/vector.md              |    2 +
 gcc/config/s390/vx-builtins.md         | 2081 ++++++++++++++++++++++++++
 16 files changed, 7494 insertions(+), 274 deletions(-)
 create mode 100644 gcc/config/s390/s390-builtin-types.def
 create mode 100644 gcc/config/s390/s390-builtins.def
 create mode 100644 gcc/config/s390/s390-builtins.h
 create mode 100644 gcc/config/s390/s390-c.c
 create mode 100644 gcc/config/s390/t-s390
 create mode 100644 gcc/config/s390/vecintrin.h
 create mode 100644 gcc/config/s390/vx-builtins.md

[-- Attachment #2: 0008-S-390-zvector-builtin-support.patch.gz --]
[-- Type: application/octet-stream, Size: 56973 bytes --]

  parent reply	other threads:[~2015-05-11 13:41 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 13:23 [PATCH 00/13] S/390 Implement support for IBM z13 Andreas Krebbel
2015-05-11 13:23 ` [PATCH 01/13] recog: Increased max number of alternatives Andreas Krebbel
2015-05-11 14:01   ` Segher Boessenkool
2015-05-11 14:46     ` Andreas Krebbel
2015-05-11 17:03   ` Jeff Law
2015-05-18 13:47   ` [PATCH 01/13] recog: Increased max number of alternatives - v2 Andreas Krebbel
2015-05-18 14:39     ` Richard Biener
2015-05-19  8:41       ` Andreas Krebbel
2015-05-19 10:13         ` Richard Biener
2015-05-22  8:26         ` Andreas Krebbel
2015-06-01  8:22           ` Jakub Jelinek
2015-06-08 13:35             ` Andreas Krebbel
2015-06-08 13:40               ` Jakub Jelinek
2015-07-02 11:52                 ` Andreas Krebbel
2015-05-11 13:24 ` [PATCH 13/13] S/390 Invalid vector binary ops Andreas Krebbel
2015-05-11 13:24 ` [PATCH 02/13] optabs: Fix vec_perm -> V16QI middle end lowering Andreas Krebbel
2015-05-11 17:20   ` Jeff Law
2015-05-18 17:36   ` Richard Henderson
2015-05-19  8:45     ` Andreas Krebbel
2015-05-19 15:02       ` Richard Henderson
2015-05-22  8:12         ` Andreas Krebbel
2015-05-11 13:24 ` [PATCH 04/13] S/390 Add -march/-mtune=z13 option Andreas Krebbel
2015-05-11 13:24 ` [PATCH 11/13] Testsuite S/390 vector types are only 8 byte aligned Andreas Krebbel
2015-05-11 17:05   ` Jeff Law
2015-05-11 13:24 ` [PATCH 06/13] Vector base support - testcases Andreas Krebbel
2015-05-11 13:24 ` [PATCH 10/13] Testsuite These testcases require disabling hardware vector support on S/390 Andreas Krebbel
2015-05-11 17:05   ` Jeff Law
2015-05-11 13:24 ` [RFC 12/13] S/390 Vector ABI GNU Attribute Andreas Krebbel
2015-05-19 18:18   ` [PING] " Andreas Krebbel
2015-05-11 13:24 ` [PATCH 05/13] S/390 Vector base support Andreas Krebbel
2015-06-04 23:31   ` [BUILDROBOT] (was: [PATCH 05/13] S/390 Vector base support.) Jan-Benedict Glaw
2015-06-08 13:36     ` [BUILDROBOT] Andreas Krebbel
2015-05-11 13:24 ` [PATCH 09/13] S/390 Add zvector testcases Andreas Krebbel
2015-05-11 13:24 ` [PATCH 07/13] S/390 Add vector scalar instruction support Andreas Krebbel
2015-05-11 13:24 ` [PATCH 03/13] S/390 Fix secondary reload issue with store/load relative operands Andreas Krebbel
2015-05-11 13:41 ` Andreas Krebbel [this message]
2015-05-11 17:07   ` [PATCH 08/13] S/390 zvector builtin support Jeff Law

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=20150511134050.GA23075@maggie \
    --to=krebbel@linux.vnet.ibm.com \
    --cc=gcc-patches@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: link
Be 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).