#define B_VXE2 (1 << 4) /* Builtins requiring the z15 vector extensions. */
#define B_DEP (1 << 5) /* Builtin has been deprecated and a warning should be issued. */
#define B_NNPA (1 << 6) /* Builtins requiring the NNPA Facility. */
+#define B_VXE3 (1 << 7) /* Builtins requiring the arch15 vector extensions. */
+#define B_ARCH15 (1 << 8) /* Builtins requiring arch15. */
/* B_DEF defines a standard (not overloaded) builtin
B_DEF (<builtin name>, <RTL expander name>, <function attributes>, <builtin flags>, <operand flags, see above>, <fntype>)
return error_mark_node;
}
+ if (!TARGET_VXE3 && (ob_flags & B_VXE3))
+ {
+ error_at (loc, "%qF requires arch15 or higher", ob_fndecl);
+ return error_mark_node;
+ }
+
ob_fcode -= S390_BUILTIN_MAX;
for (b_arg_chain = TYPE_ARG_TYPES (TREE_TYPE (ob_fndecl));
return error_mark_node;
}
+ if (!TARGET_VXE3
+ && bflags_overloaded_builtin_var[last_match_index] & B_VXE3)
+ {
+ error_at (loc, "%qs matching variant requires arch15 or higher",
+ IDENTIFIER_POINTER (DECL_NAME (ob_fndecl)));
+ return error_mark_node;
+ }
+
if (bflags_overloaded_builtin_var[last_match_index] & B_DEP)
warning_at (loc, 0, "%qs matching variant is deprecated",
IDENTIFIER_POINTER (DECL_NAME (ob_fndecl)));
error ("Builtin %qF requires z15 or higher", fndecl);
return const0_rtx;
}
+
+ if ((bflags & B_VXE3) && !TARGET_VXE3)
+ {
+ error ("Builtin %qF requires arch15 or higher", fndecl);
+ return const0_rtx;
+ }
}
if (fcode >= S390_OVERLOADED_BUILTIN_VAR_OFFSET
&& fcode < S390_ALL_BUILTIN_MAX)
} "-march=arch13 -mzarch" ]
}
+# Same as above but for the arch15 vector enhancement facility. Test
+# is performed with the vector divide instruction.
+proc check_effective_target_s390_vxe3 { } {
+ if ![istarget s390*-*-*] then {
+ return 0;
+ }
+
+ return [check_runtime s390_check_vxe3 {
+ int main (void)
+ {
+ asm ("vd %%v24, %%v26, %%v28, 2, 0" : : : "v24", "v26", "v28");
+ return 0;
+ }
+ } "-march=arch15 -mzarch" ]
+}
+
# Same as above but for the arch14 NNPA facility.
proc check_effective_target_s390_nnpa { } {
if ![istarget s390*-*-*] then {