r271672 - RAS extensions are part of ARMv8.2.

Sjoerd Meijer via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 3 07:08:20 PDT 2016


Author: sjoerdmeijer
Date: Fri Jun  3 09:08:20 2016
New Revision: 271672

URL: http://llvm.org/viewvc/llvm-project?rev=271672&view=rev
Log:
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

Added:
    cfe/trunk/test/Driver/aarch64-ras.c
    cfe/trunk/test/Driver/arm-ras.c
Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=271672&r1=271671&r2=271672&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Jun  3 09:08:20 2016
@@ -2282,12 +2282,14 @@ static bool DecodeAArch64Features(const
                              .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);

Added: cfe/trunk/test/Driver/aarch64-ras.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/aarch64-ras.c?rev=271672&view=auto
==============================================================================
--- cfe/trunk/test/Driver/aarch64-ras.c (added)
+++ cfe/trunk/test/Driver/aarch64-ras.c Fri Jun  3 09:08:20 2016
@@ -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"

Added: cfe/trunk/test/Driver/arm-ras.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arm-ras.c?rev=271672&view=auto
==============================================================================
--- cfe/trunk/test/Driver/arm-ras.c (added)
+++ cfe/trunk/test/Driver/arm-ras.c Fri Jun  3 09:08:20 2016
@@ -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"




More information about the cfe-commits mailing list