[PATCH] [ARMv8] Add new -mfpu option for crypto extensions

Amara Emerson amara.emerson at arm.com
Thu Sep 19 06:08:08 PDT 2013


This change adds a new -mfpu option for the driver to support the ARMv8 cryptography extensions. The option is crypto-neon-fp-armv8 and is the same as the one used by gcc.

Review appreciated.

http://llvm-reviews.chandlerc.com/D1726

Files:
  test/Driver/arm-mfpu.c
  lib/Driver/Tools.cpp

Index: test/Driver/arm-mfpu.c
===================================================================
--- test/Driver/arm-mfpu.c
+++ test/Driver/arm-mfpu.c
@@ -56,6 +56,11 @@
 // CHECK-NEON-FP-ARMV8: "-target-feature" "+fp-armv8"
 // CHECK-NEON-FP-ARMV8: "-target-feature" "+neon"
 
+// RUN: %clang -target armv8-linux-gnueabihf -mfpu=crypto-neon-fp-armv8 %s -### 2>&1 \
+// RUN:   | FileCheck --check-prefix=CHECK-CRYPTO-NEON-FP-ARMV8 %s
+// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+crypto"
+// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+fp-armv8"
+
 // RUN: %clang -target arm-linux-gnueabihf %s -### 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-HF %s
 // CHECK-HF: "-target-cpu" "arm1136jf-s"
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -596,6 +596,9 @@
   } else if (FPU == "neon-fp-armv8") {
     Features.push_back("+fp-armv8");
     Features.push_back("+neon");
+  } else if (FPU == "crypto-neon-fp-armv8") {
+    Features.push_back("+crypto");
+    Features.push_back("+fp-armv8");
   } else if (FPU == "neon") {
     Features.push_back("+neon");
   } else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1726.1.patch
Type: text/x-patch
Size: 1184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130919/58e60bdc/attachment.bin>


More information about the cfe-commits mailing list