From: Sjoerd Meijer Date: Fri, 3 Jun 2016 14:08:20 +0000 (+0000) Subject: RAS extensions are part of ARMv8.2. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=334678de6907bd37087c33d54accac52a94bd9ce;p=clang RAS extensions are part of ARMv8.2. This patch enables +ras +noras to AArch64 in clang. Patch by: Roger Ferrer Ibanez and Oliver Stannard Differential Revision: http://reviews.llvm.org/D20283 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271672 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 38cccf590f..47ee150981 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2282,12 +2282,14 @@ static bool DecodeAArch64Features(const Driver &D, StringRef text, .Case("crypto", "+crypto") .Case("fp16", "+fullfp16") .Case("profile", "+spe") + .Case("ras", "+ras") .Case("nofp", "-fp-armv8") .Case("nosimd", "-neon") .Case("nocrc", "-crc") .Case("nocrypto", "-crypto") .Case("nofp16", "-fullfp16") .Case("noprofile", "-spe") + .Case("noras", "-ras") .Default(nullptr); if (result) Features.push_back(result); diff --git a/test/Driver/aarch64-ras.c b/test/Driver/aarch64-ras.c new file mode 100644 index 0000000000..fe038eaf15 --- /dev/null +++ b/test/Driver/aarch64-ras.c @@ -0,0 +1,7 @@ +// RUN: %clang -target aarch64-none-none-eabi -march=armv8a+ras -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RAS %s +// RUN: %clang -target aarch64-none-none-eabi -mcpu=generic+ras -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RAS %s +// CHECK-RAS: "-target-feature" "+ras" + +// RUN: %clang -target aarch64-none-none-eabi -march=armv8a+noras -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-NORAS %s +// RUN: %clang -target aarch64-none-none-eabi -mcpu=generic+noras -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-NORAS %s +// CHECK-NORAS: "-target-feature" "-ras" diff --git a/test/Driver/arm-ras.c b/test/Driver/arm-ras.c new file mode 100644 index 0000000000..6d2168c160 --- /dev/null +++ b/test/Driver/arm-ras.c @@ -0,0 +1,7 @@ +// RUN: %clang -target arm-none-none-eabi -march=armv8a+ras -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RAS %s +// RUN: %clang -target arm-none-none-eabi -mcpu=generic+ras -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RAS %s +// CHECK-RAS: "-target-feature" "+ras" + +// RUN: %clang -target arm-none-none-eabi -march=armv8a+noras -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-NORAS %s +// RUN: %clang -target arm-none-none-eabi -mcpu=generic+noras -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-NORAS %s +// CHECK-NORAS: "-target-feature" "-ras"