Commit 3af82a61 by Andreas Krebbel

S/390 zvector builtin support.

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.

From-SVN: r223398
parent 6e5b5de8
...@@ -457,7 +457,7 @@ spu*-*-*) ...@@ -457,7 +457,7 @@ spu*-*-*)
s390*-*-*) s390*-*-*)
cpu_type=s390 cpu_type=s390
extra_options="${extra_options} fused-madd.opt" extra_options="${extra_options} fused-madd.opt"
extra_headers="s390intrin.h htmintrin.h htmxlintrin.h" extra_headers="s390intrin.h htmintrin.h htmxlintrin.h vecintrin.h"
;; ;;
# Note the 'l'; we need to be able to match e.g. "shle" or "shl". # Note the 'l'; we need to be able to match e.g. "shle" or "shl".
sh[123456789lbe]*-*-* | sh-*-*) sh[123456789lbe]*-*-* | sh-*-*)
...@@ -2538,27 +2538,35 @@ rx-*-elf*) ...@@ -2538,27 +2538,35 @@ rx-*-elf*)
s390-*-linux*) s390-*-linux*)
default_gnu_indirect_function=yes default_gnu_indirect_function=yes
tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h" tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
c_target_objs="${c_target_objs} s390-c.o"
cxx_target_objs="${cxx_target_objs} s390-c.o"
if test x$enable_targets = xall; then if test x$enable_targets = xall; then
tmake_file="${tmake_file} s390/t-linux64" tmake_file="${tmake_file} s390/t-linux64"
fi fi
tmake_file="${tmake_file} s390/t-s390"
;; ;;
s390x-*-linux*) s390x-*-linux*)
default_gnu_indirect_function=yes default_gnu_indirect_function=yes
tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h" tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
tm_p_file="linux-protos.h s390/s390-protos.h" tm_p_file="linux-protos.h s390/s390-protos.h"
c_target_objs="${c_target_objs} s390-c.o"
cxx_target_objs="${cxx_target_objs} s390-c.o"
md_file=s390/s390.md md_file=s390/s390.md
extra_modes=s390/s390-modes.def extra_modes=s390/s390-modes.def
out_file=s390/s390.c out_file=s390/s390.c
tmake_file="${tmake_file} s390/t-linux64" tmake_file="${tmake_file} s390/t-linux64 s390/t-s390"
;; ;;
s390x-ibm-tpf*) s390x-ibm-tpf*)
tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h" tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
tm_p_file=s390/s390-protos.h tm_p_file=s390/s390-protos.h
c_target_objs="${c_target_objs} s390-c.o"
cxx_target_objs="${cxx_target_objs} s390-c.o"
md_file=s390/s390.md md_file=s390/s390.md
extra_modes=s390/s390-modes.def extra_modes=s390/s390-modes.def
out_file=s390/s390.c out_file=s390/s390.c
thread_file='tpf' thread_file='tpf'
extra_options="${extra_options} s390/tpf.opt" extra_options="${extra_options} s390/tpf.opt"
tmake_file="${tmake_file} s390/t-s390"
;; ;;
sh-*-elf* | sh[12346l]*-*-elf* | \ sh-*-elf* | sh[12346l]*-*-elf* | \
sh-*-linux* | sh[2346lbe]*-*-linux* | \ sh-*-linux* | sh[2346lbe]*-*-linux* | \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Common data structures used for builtin handling on S/390.
Copyright (C) 2015 Free Software Foundation, Inc.
Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
This file is part of GCC.
GCC 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 Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* This files contains data structure definitions which can be used by
s390-builtins.c as well as s390-c.c. Since the latter is
considered to be part of the front-end we have to be careful not
to use any of tree and rtx like data structures. */
/* Builtin types, data and prototypes. */
enum s390_builtin_type_index
{
#undef DEF_TYPE
#undef DEF_POINTER_TYPE
#undef DEF_DISTINCT_TYPE
#undef DEF_VECTOR_TYPE
#undef DEF_OPAQUE_VECTOR_TYPE
#undef DEF_FN_TYPE
#undef DEF_OV_TYPE
#define DEF_TYPE(INDEX, NODE, CONST_P) INDEX,
#define DEF_POINTER_TYPE(INDEX, INDEX2) INDEX,
#define DEF_DISTINCT_TYPE(INDEX, INDEX2) INDEX,
#define DEF_VECTOR_TYPE(INDEX, INDEX2, ELEMENTS) INDEX,
#define DEF_OPAQUE_VECTOR_TYPE(INDEX, INDEX2, ELEMENTS) INDEX,
#define DEF_FN_TYPE(...)
#define DEF_OV_TYPE(...)
#include "s390-builtin-types.def"
BT_MAX
};
enum s390_builtin_fn_type_index
{
#undef DEF_TYPE
#undef DEF_POINTER_TYPE
#undef DEF_DISTINCT_TYPE
#undef DEF_VECTOR_TYPE
#undef DEF_OPAQUE_VECTOR_TYPE
#undef DEF_FN_TYPE
#undef DEF_OV_TYPE
#define DEF_TYPE(...)
#define DEF_POINTER_TYPE(...)
#define DEF_DISTINCT_TYPE(...)
#define DEF_VECTOR_TYPE(...)
#define DEF_OPAQUE_VECTOR_TYPE(...)
#define DEF_FN_TYPE(INDEX, ...) INDEX,
#define DEF_OV_TYPE(...)
#include "s390-builtin-types.def"
BT_FN_MAX
};
enum s390_builtin_ov_type_index
{
#undef DEF_TYPE
#undef DEF_POINTER_TYPE
#undef DEF_DISTINCT_TYPE
#undef DEF_VECTOR_TYPE
#undef DEF_OPAQUE_VECTOR_TYPE
#undef DEF_FN_TYPE
#undef DEF_OV_TYPE
#define DEF_TYPE(...)
#define DEF_POINTER_TYPE(...)
#define DEF_DISTINCT_TYPE(...)
#define DEF_VECTOR_TYPE(...)
#define DEF_OPAQUE_VECTOR_TYPE(...)
#define DEF_FN_TYPE(...)
#define DEF_OV_TYPE(INDEX, ...) INDEX,
#include "s390-builtin-types.def"
BT_OV_MAX
};
#define MAX_OV_OPERANDS 6
extern tree s390_builtin_types[BT_MAX];
extern tree s390_builtin_fn_types[BT_FN_MAX];
/* Builtins. */
enum s390_builtins {
#undef B_DEF
#undef OB_DEF
#undef OB_DEF_VAR
#define B_DEF(NAME, ...) S390_BUILTIN_##NAME,
#define OB_DEF(...)
#define OB_DEF_VAR(...)
#include "s390-builtins.def"
S390_BUILTIN_MAX
};
/* Generate an enumeration of all overloaded builtins defined with
OB_DEF in s390-builtins.def. */
enum s390_overloaded_builtins {
#undef B_DEF
#undef OB_DEF
#undef OB_DEF_VAR
#define B_DEF(...)
#define OB_DEF(NAME, ...) S390_OVERLOADED_BUILTIN_##NAME,
#define OB_DEF_VAR(...)
#include "s390-builtins.def"
S390_OVERLOADED_BUILTIN_MAX
};
/* Generate an enumeration of all variants of overloaded builtins
defined with OB_DEF_VAR in s390-builtins.def. */
enum s390_overloaded_builtin_vars {
#undef B_DEF
#undef OB_DEF
#undef OB_DEF_VAR
#define B_DEF(...)
#define OB_DEF(...)
#define OB_DEF_VAR(NAME, ...) S390_OVERLOADED_BUILTIN_VAR_##NAME,
#include "s390-builtins.def"
S390_OVERLOADED_BUILTIN_VAR_MAX
};
#define S390_OVERLOADED_BUILTIN_OFFSET S390_BUILTIN_MAX
#define S390_OVERLOADED_BUILTIN_VAR_OFFSET \
(S390_BUILTIN_MAX + S390_OVERLOADED_BUILTIN_MAX)
#define S390_ALL_BUILTIN_MAX \
(S390_BUILTIN_MAX + S390_OVERLOADED_BUILTIN_MAX + \
S390_OVERLOADED_BUILTIN_VAR_MAX)
extern const unsigned int flags_builtin[S390_BUILTIN_MAX + 1];
extern const unsigned int
flags_overloaded_builtin_var[S390_OVERLOADED_BUILTIN_VAR_MAX + 1];
static inline unsigned int
flags_for_builtin (int fcode)
{
if (fcode >= S390_OVERLOADED_BUILTIN_VAR_OFFSET)
return flags_overloaded_builtin_var[fcode -
S390_OVERLOADED_BUILTIN_VAR_OFFSET];
else if (fcode >= S390_OVERLOADED_BUILTIN_OFFSET)
gcc_unreachable ();
else
return flags_builtin[fcode];
}
extern tree s390_builtin_decls[S390_BUILTIN_MAX +
S390_OVERLOADED_BUILTIN_MAX +
S390_OVERLOADED_BUILTIN_VAR_MAX];
...@@ -87,9 +87,21 @@ CCA -> CCAP, CCAN ...@@ -87,9 +87,21 @@ CCA -> CCAP, CCAN
Vector comparison modes Vector comparison modes
CCVEQ EQ - - NE (VCEQ) CCVEQ EQ - - NE (VCEQ)
CCVEQANY EQ EQ - NE (VCEQ)
CCVH GT - - LE (VCH)
CCVHANY GT GT - LE (VCH)
CCVHU GTU - - LEU (VCHL)
CCVHUANY GTU GTU - LEU (VCHL)
CCVFH GT - - UNLE (VFCH) CCVFH GT - - UNLE (VFCH)
CCVFHANY GT GT - UNLE (VFCH)
CCVFHE GE - - UNLT (VFCHE) CCVFHE GE - - UNLT (VFCHE)
CCVFHEANY GE GE - UNLT (VFCHE)
*** Comments *** *** Comments ***
CCAP, CCAN CCAP, CCAN
...@@ -157,6 +169,15 @@ The compare and swap instructions sets the condition code to 0/1 if the ...@@ -157,6 +169,15 @@ The compare and swap instructions sets the condition code to 0/1 if the
operands were equal/unequal. The CCZ1 mode ensures the result can be operands were equal/unequal. The CCZ1 mode ensures the result can be
effectively placed into a register. effectively placed into a register.
CCV*
The variants with and without ANY are generated by the same
instructions and therefore are holding the same information. However,
when generating a condition code mask they require checking different
bits of CC. In that case the variants without ANY represent the
results for *all* elements.
CCRAW CCRAW
The cc mode generated by a non-compare instruction. The condition The cc mode generated by a non-compare instruction. The condition
...@@ -188,8 +209,17 @@ CC_MODE (CCT3); ...@@ -188,8 +209,17 @@ CC_MODE (CCT3);
CC_MODE (CCRAW); CC_MODE (CCRAW);
CC_MODE (CCVEQ); CC_MODE (CCVEQ);
CC_MODE (CCVEQANY);
CC_MODE (CCVH);
CC_MODE (CCVHANY);
CC_MODE (CCVHU);
CC_MODE (CCVHUANY);
CC_MODE (CCVFH); CC_MODE (CCVFH);
CC_MODE (CCVFHANY);
CC_MODE (CCVFHE); CC_MODE (CCVFHE);
CC_MODE (CCVFHEANY);
/* Vector modes. */ /* Vector modes. */
......
...@@ -97,6 +97,7 @@ extern void s390_expand_atomic (machine_mode, enum rtx_code, ...@@ -97,6 +97,7 @@ extern void s390_expand_atomic (machine_mode, enum rtx_code,
rtx, rtx, rtx, bool); rtx, rtx, rtx, bool);
extern void s390_expand_tbegin (rtx, rtx, rtx, bool); extern void s390_expand_tbegin (rtx, rtx, rtx, bool);
extern void s390_expand_vec_compare (rtx, enum rtx_code, rtx, rtx); extern void s390_expand_vec_compare (rtx, enum rtx_code, rtx, rtx);
extern void s390_expand_vec_compare_cc (rtx, enum rtx_code, rtx, rtx, bool);
extern void s390_expand_vcond (rtx, rtx, rtx, enum rtx_code, rtx, rtx); extern void s390_expand_vcond (rtx, rtx, rtx, enum rtx_code, rtx, rtx);
extern void s390_expand_vec_init (rtx, rtx); extern void s390_expand_vec_init (rtx, rtx);
extern rtx s390_return_addr_rtx (int, rtx); extern rtx s390_return_addr_rtx (int, rtx);
...@@ -124,3 +125,10 @@ extern bool s390_extzv_shift_ok (int, int, unsigned HOST_WIDE_INT); ...@@ -124,3 +125,10 @@ extern bool s390_extzv_shift_ok (int, int, unsigned HOST_WIDE_INT);
extern void s390_asm_output_function_label (FILE *, const char *, tree); extern void s390_asm_output_function_label (FILE *, const char *, tree);
#endif /* RTX_CODE */ #endif /* RTX_CODE */
/* s390-c.c routines */
extern void s390_cpu_cpp_builtins (struct cpp_reader *);
extern void s390_register_target_pragmas (void);
/* Routines for s390-c.c */
extern bool s390_const_operand_ok (tree, int, int, tree);
...@@ -111,22 +111,7 @@ enum processor_flags ...@@ -111,22 +111,7 @@ enum processor_flags
#define TARGET_TPF 0 #define TARGET_TPF 0
/* Target CPU builtins. */ /* Target CPU builtins. */
#define TARGET_CPU_CPP_BUILTINS() \ #define TARGET_CPU_CPP_BUILTINS() s390_cpu_cpp_builtins (pfile)
do \
{ \
builtin_assert ("cpu=s390"); \
builtin_assert ("machine=s390"); \
builtin_define ("__s390__"); \
if (TARGET_ZARCH) \
builtin_define ("__zarch__"); \
if (TARGET_64BIT) \
builtin_define ("__s390x__"); \
if (TARGET_LONG_DOUBLE_128) \
builtin_define ("__LONG_DOUBLE_128__"); \
if (TARGET_HTM) \
builtin_define ("__HTM__"); \
} \
while (0)
#ifdef DEFAULT_TARGET_64BIT #ifdef DEFAULT_TARGET_64BIT
#define TARGET_DEFAULT (MASK_64BIT | MASK_ZARCH | MASK_HARD_DFP \ #define TARGET_DEFAULT (MASK_64BIT | MASK_ZARCH | MASK_HARD_DFP \
...@@ -989,4 +974,14 @@ extern const int processor_flags_table[]; ...@@ -989,4 +974,14 @@ extern const int processor_flags_table[];
always generate -1 in that case. */ always generate -1 in that case. */
#define VECTOR_STORE_FLAG_VALUE(MODE) CONSTM1_RTX (GET_MODE_INNER (MODE)) #define VECTOR_STORE_FLAG_VALUE(MODE) CONSTM1_RTX (GET_MODE_INNER (MODE))
/* Target pragma. */
/* resolve_overloaded_builtin can not be defined the normal way since
it is defined in code which technically belongs to the
front-end. */
#define REGISTER_TARGET_PRAGMAS() \
do { \
s390_register_target_pragmas (); \
} while (0)
#endif /* S390_H */ #endif /* S390_H */
...@@ -126,21 +126,107 @@ ...@@ -126,21 +126,107 @@
UNSPEC_FPINT_NEARBYINT UNSPEC_FPINT_NEARBYINT
UNSPEC_FPINT_RINT UNSPEC_FPINT_RINT
UNSPEC_LCBB
; Vector ; Vector
UNSPEC_VEC_EXTRACT UNSPEC_VEC_SMULT_HI
UNSPEC_VEC_SET UNSPEC_VEC_UMULT_HI
UNSPEC_VEC_PERM UNSPEC_VEC_SMULT_LO
UNSPEC_VEC_SRLB
UNSPEC_VEC_GENBYTEMASK
UNSPEC_VEC_VSUM
UNSPEC_VEC_VSUMG
UNSPEC_VEC_SMULT_EVEN UNSPEC_VEC_SMULT_EVEN
UNSPEC_VEC_UMULT_EVEN UNSPEC_VEC_UMULT_EVEN
UNSPEC_VEC_SMULT_ODD UNSPEC_VEC_SMULT_ODD
UNSPEC_VEC_UMULT_ODD UNSPEC_VEC_UMULT_ODD
UNSPEC_VEC_VMAL
UNSPEC_VEC_VMAH
UNSPEC_VEC_VMALH
UNSPEC_VEC_VMAE
UNSPEC_VEC_VMALE
UNSPEC_VEC_VMAO
UNSPEC_VEC_VMALO
UNSPEC_VEC_GATHER
UNSPEC_VEC_EXTRACT
UNSPEC_VEC_INSERT_AND_ZERO
UNSPEC_VEC_LOAD_BNDRY
UNSPEC_VEC_LOAD_LEN UNSPEC_VEC_LOAD_LEN
UNSPEC_VEC_MERGEH
UNSPEC_VEC_MERGEL
UNSPEC_VEC_PACK
UNSPEC_VEC_PACK_SATURATE
UNSPEC_VEC_PACK_SATURATE_CC
UNSPEC_VEC_PACK_SATURATE_GENCC
UNSPEC_VEC_PACK_UNSIGNED_SATURATE
UNSPEC_VEC_PACK_UNSIGNED_SATURATE_CC
UNSPEC_VEC_PACK_UNSIGNED_SATURATE_GENCC
UNSPEC_VEC_PERM
UNSPEC_VEC_PERMI
UNSPEC_VEC_EXTEND
UNSPEC_VEC_STORE_LEN
UNSPEC_VEC_UNPACKH
UNSPEC_VEC_UNPACKH_L
UNSPEC_VEC_UNPACKL
UNSPEC_VEC_UNPACKL_L
UNSPEC_VEC_ADDC
UNSPEC_VEC_ADDC_U128
UNSPEC_VEC_ADDE_U128
UNSPEC_VEC_ADDEC_U128
UNSPEC_VEC_AVG
UNSPEC_VEC_AVGU
UNSPEC_VEC_CHECKSUM
UNSPEC_VEC_GFMSUM
UNSPEC_VEC_GFMSUM_128
UNSPEC_VEC_GFMSUM_ACCUM
UNSPEC_VEC_GFMSUM_ACCUM_128
UNSPEC_VEC_SET
UNSPEC_VEC_VSUMG
UNSPEC_VEC_VSUMQ
UNSPEC_VEC_VSUM
UNSPEC_VEC_RL_MASK
UNSPEC_VEC_SLL
UNSPEC_VEC_SLB
UNSPEC_VEC_SLDB
UNSPEC_VEC_SRAL
UNSPEC_VEC_SRAB
UNSPEC_VEC_SRL
UNSPEC_VEC_SRLB
UNSPEC_VEC_SUB_U128
UNSPEC_VEC_SUBC
UNSPEC_VEC_SUBC_U128
UNSPEC_VEC_SUBE_U128
UNSPEC_VEC_SUBEC_U128
UNSPEC_VEC_TEST_MASK
UNSPEC_VEC_VFAE
UNSPEC_VEC_VFAECC
UNSPEC_VEC_VFEE
UNSPEC_VEC_VFEECC
UNSPEC_VEC_VFENE UNSPEC_VEC_VFENE
UNSPEC_VEC_VFENECC UNSPEC_VEC_VFENECC
UNSPEC_VEC_VISTR
UNSPEC_VEC_VISTRCC
UNSPEC_VEC_VSTRC
UNSPEC_VEC_VSTRCCC
UNSPEC_VEC_VCDGB
UNSPEC_VEC_VCDLGB
UNSPEC_VEC_VCGDB
UNSPEC_VEC_VCLGDB
UNSPEC_VEC_VFIDB
UNSPEC_VEC_VLDEB
UNSPEC_VEC_VLEDB
UNSPEC_VEC_VFTCIDB
UNSPEC_VEC_VFTCIDBCC
]) ])
;; ;;
...@@ -651,7 +737,7 @@ ...@@ -651,7 +737,7 @@
; Used with VFCMP to expand part of the mnemonic ; Used with VFCMP to expand part of the mnemonic
; For fp we have a mismatch: eq in the insn name - e in asm ; For fp we have a mismatch: eq in the insn name - e in asm
(define_mode_attr asm_fcmp [(CCVEQ "e") (CCVFH "h") (CCVFHE "he")]) (define_mode_attr asm_fcmp [(CCVEQ "e") (CCVFH "h") (CCVFHE "he")])
(define_mode_attr insn_cmp [(CCVEQ "eq") (CCVFH "h") (CCVFHE "he")]) (define_mode_attr insn_cmp [(CCVEQ "eq") (CCVH "h") (CCVHU "hl") (CCVFH "h") (CCVFHE "he")])
(include "vector.md") (include "vector.md")
...@@ -10614,14 +10700,26 @@ ...@@ -10614,14 +10700,26 @@
; Set and get floating point control register ; Set and get floating point control register
(define_insn "s390_sfpc" (define_insn "sfpc"
[(unspec_volatile [(match_operand:SI 0 "register_operand" "d")] [(unspec_volatile [(match_operand:SI 0 "register_operand" "d")]
UNSPECV_SFPC)] UNSPECV_SFPC)]
"TARGET_HARD_FLOAT" "TARGET_HARD_FLOAT"
"sfpc\t%0") "sfpc\t%0")
(define_insn "s390_efpc" (define_insn "efpc"
[(set (match_operand:SI 0 "register_operand" "=d") [(set (match_operand:SI 0 "register_operand" "=d")
(unspec_volatile:SI [(const_int 0)] UNSPECV_EFPC))] (unspec_volatile:SI [(const_int 0)] UNSPECV_EFPC))]
"TARGET_HARD_FLOAT" "TARGET_HARD_FLOAT"
"efpc\t%0") "efpc\t%0")
; Load count to block boundary
(define_insn "lcbb"
[(set (match_operand:SI 0 "register_operand" "=d")
(unspec:SI [(match_operand:SI 1 "address_operand" "ZQZR")
(match_operand:SI 2 "immediate_operand" "C")] UNSPEC_LCBB))
(clobber (reg:CC CC_REGNUM))]
"TARGET_Z13"
"lcbb\t%0,%1,%b2"
[(set_attr "op_type" "VRX")])
...@@ -153,6 +153,10 @@ mmvcle ...@@ -153,6 +153,10 @@ mmvcle
Target Report Mask(MVCLE) Target Report Mask(MVCLE)
mvcle use mvcle use
mzvector
Target Report Mask(ZVECTOR)
Enable the z vector language extension providing the context-sensitive vector macro.
mwarn-dynamicstack mwarn-dynamicstack
Target RejectNegative Var(s390_warn_dynamicstack_p) Target RejectNegative Var(s390_warn_dynamicstack_p)
Warn if a function uses alloca or creates an array with dynamic size Warn if a function uses alloca or creates an array with dynamic size
......
...@@ -29,5 +29,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -29,5 +29,8 @@ along with GCC; see the file COPYING3. If not see
#include <htmintrin.h> #include <htmintrin.h>
#endif #endif
#ifdef __VEC__
#include <vecintrin.h>
#endif
#endif /* _S390INTRIN_H*/ #endif /* _S390INTRIN_H*/
# Copyright (C) 2015 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
# GCC 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 Software Foundation; either version 3, or (at your option)
# any later version.
#
# GCC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
TM_H += $(srcdir)/config/s390/s390-builtins.def
TM_H += $(srcdir)/config/s390/s390-builtin-types.def
s390-c.o: $(srcdir)/config/s390/s390-c.c \
$(srcdir)/config/s390/s390-protos.h $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(TM_P_H) $(FLAGS_H) $(C_COMMON_H) $(GGC_H) \
$(TARGET_H) $(TARGET_DEF_H) $(CPPLIB_H) $(C_PRAGMA_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/s390/s390-c.c
...@@ -133,6 +133,8 @@ ...@@ -133,6 +133,8 @@
(VSTRING_FLAG_ZS 2) ; zero search (VSTRING_FLAG_ZS 2) ; zero search
(VSTRING_FLAG_CS 1)]) ; condition code set (VSTRING_FLAG_CS 1)]) ; condition code set
(include "vx-builtins.md")
; Full HW vector size moves ; Full HW vector size moves
(define_insn "mov<mode>" (define_insn "mov<mode>"
[(set (match_operand:V_128 0 "nonimmediate_operand" "=v, v,QR, v, v, v, v,v,d") [(set (match_operand:V_128 0 "nonimmediate_operand" "=v, v,QR, v, v, v, v,v,d")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment