[AArch64] Add command-line options for ARMv8.2-A
This adds new values for the -march option (armv8.2a and armv8.2-a,
which are aliases of each other), and new suffixes for the -march and
-mcpu options (+fp16 and +nofp16), to allow targeting the ARMv8.2-A
architecture and it's optional half-precision floating-point extension.
Differential Revision: http://reviews.llvm.org/D15022
llvm-svn: 254160
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 3bd2ffb..9ae9348 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -2031,10 +2031,12 @@
.Case("simd", "+neon")
.Case("crc", "+crc")
.Case("crypto", "+crypto")
+ .Case("fp16", "+fullfp16")
.Case("nofp", "-fp-armv8")
.Case("nosimd", "-neon")
.Case("nocrc", "-crc")
.Case("nocrypto", "-crypto")
+ .Case("nofp16", "-fullfp16")
.Default(nullptr);
if (result)
Features.push_back(result);
@@ -2080,6 +2082,8 @@
// ok, no additional features.
} else if (Split.first == "armv8.1-a" || Split.first == "armv8.1a") {
Features.push_back("+v8.1a");
+ } else if (Split.first == "armv8.2-a" || Split.first == "armv8.2a" ) {
+ Features.push_back("+v8.2a");
} else {
return false;
}