From ef3b1915da5423251662b2e80786194610f5a756 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 17 Jul 2017 17:46:47 +0000 Subject: [SystemZ] Add support for IBM z14 processor (2/3) This patch extends the -fzvector language feature to enable the new "vector float" data type when compiling at -march=z14. This matches the updated extension definition implemented by other compilers for the platform, which is indicated to applications by pre-defining __VEC__ to 10302 (instead of 10301). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308198 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/DeclSpec.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/Sema/DeclSpec.cpp') diff --git a/lib/Sema/DeclSpec.cpp b/lib/Sema/DeclSpec.cpp index a55cdcccee..e4e84fcec9 100644 --- a/lib/Sema/DeclSpec.cpp +++ b/lib/Sema/DeclSpec.cpp @@ -1082,8 +1082,10 @@ void DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) { !S.getLangOpts().ZVector) S.Diag(TSTLoc, diag::err_invalid_vector_double_decl_spec); } else if (TypeSpecType == TST_float) { - // vector float is unsupported for ZVector. - if (S.getLangOpts().ZVector) + // vector float is unsupported for ZVector unless we have the + // vector-enhancements facility 1 (ISA revision 12). + if (S.getLangOpts().ZVector && + !S.Context.getTargetInfo().hasFeature("arch12")) S.Diag(TSTLoc, diag::err_invalid_vector_float_decl_spec); } else if (TypeSpecWidth == TSW_long) { // vector long is unsupported for ZVector and deprecated for AltiVec. -- cgit v1.2.1