[07/14] S/390: arch13: New vector builtins - preparation

Message ID 1554204061-30488-8-git-send-email-krebbel@linux.ibm.com
State New
Headers show
Series
  • S/390: Add support for new cpu architecture - arch13.
Related show

Commit Message

Andreas Krebbel April 2, 2019, 11:20 a.m.
gcc/ChangeLog:

2019-04-02  Andreas Krebbel  <krebbel@linux.ibm.com>

	* config/s390/s390-builtins.def (B_VXE2): New builtin flag definition.
	* config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Increment
	vector builtin version number in __VEC__.
---
 gcc/config/s390/s390-builtins.def | 8 ++++++--
 gcc/config/s390/s390-c.c          | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

-- 
2.7.4

Patch

diff --git a/gcc/config/s390/s390-builtins.def b/gcc/config/s390/s390-builtins.def
index ed81b8b..5f5f05c 100644
--- a/gcc/config/s390/s390-builtins.def
+++ b/gcc/config/s390/s390-builtins.def
@@ -271,6 +271,7 @@ 
 #undef B_HTM
 #undef B_VX
 #undef B_VXE
+#undef B_VXE2
 #undef B_DEP
 
 #undef BFLAGS_MASK_INIT
@@ -279,8 +280,9 @@ 
 #define B_INT   (1 << 0)  /* Internal builtins.  This builtin cannot be used in user programs.  */
 #define B_HTM   (1 << 1)  /* Builtins requiring the transactional execution facility.  */
 #define B_VX    (1 << 2)  /* Builtins requiring the z13 vector extensions.  */
-#define B_VXE   (1 << 3)  /* Builtins requiring the arch12 vector extensions.  */
-#define B_DEP   (1 << 4)  /* Builtin has been deprecated and a warning should be issued.  */
+#define B_VXE   (1 << 3)  /* Builtins requiring the z14 vector extensions.  */
+#define B_VXE2  (1 << 4)  /* Builtins requiring the arch13 vector extensions.  */
+#define B_DEP   (1 << 5)  /* Builtin has been deprecated and a warning should be issued.  */
 
 /* B_DEF defines a standard (not overloaded) builtin
    B_DEF (<builtin name>, <RTL expander name>, <function attributes>, <builtin flags>, <operand flags, see above>, <fntype>)
@@ -2863,3 +2865,5 @@  B_DEF      (s390_vftcidbcc,             vftciv2df_intcc,    0,
 OB_DEF     (s390_vec_fp_test_data_class,s390_vec_fp_test_data_class_flt,s390_vec_fp_test_data_class_dbl,B_VX,BT_FN_OV4SI_OV4SI_INT_INTPTR)
 OB_DEF_VAR (s390_vec_fp_test_data_class_flt,s390_vftcisbcc, B_VXE,              O2_U12,             BT_OV_BV4SI_V4SF_USHORT_INTPTR)          /* vftcisb */
 OB_DEF_VAR (s390_vec_fp_test_data_class_dbl,s390_vftcidbcc, 0,                  O2_U12,             BT_OV_BV2DI_V2DF_USHORT_INTPTR)          /* vftcidb */
+
+/* arch 13 builtins */
diff --git a/gcc/config/s390/s390-c.c b/gcc/config/s390/s390-c.c
index fc9ad67..97debdc 100644
--- a/gcc/config/s390/s390-c.c
+++ b/gcc/config/s390/s390-c.c
@@ -326,7 +326,7 @@  s390_cpu_cpp_builtins_internal (cpp_reader *pfile,
   s390_def_or_undef_macro (pfile, MASK_OPT_VX, old_opts, opts,
 			   "__VX__", "__VX__");
   s390_def_or_undef_macro (pfile, MASK_ZVECTOR, old_opts, opts,
-			   "__VEC__=10302", "__VEC__");
+			   "__VEC__=10303", "__VEC__");
   s390_def_or_undef_macro (pfile, MASK_ZVECTOR, old_opts, opts,
 			   "__vector=__attribute__((vector_size(16)))",
 			   "__vector__");