From 09b60b2a63e664b3feec6c6abfa3502cf1a57f7d Mon Sep 17 00:00:00 2001 From: Richard Barton Date: Fri, 28 Nov 2014 20:39:54 +0000 Subject: [PATCH] Add -mfpu=neon-vfpv4 This enables user to architecturally specify ARMv7A + VFPv4 + NEON. Change-Id: I779b01fef5c47e5e4ac702ae24ed2f76a0e4c63f llvm-svn: 222932 --- clang/lib/Driver/Tools.cpp | 3 +++ clang/test/Driver/arm-mfpu.c | 21 +++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index b372b65..96a4b43a 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -589,6 +589,9 @@ static void getARMFPUFeatures(const Driver &D, const Arg *A, Features.push_back("+crypto"); } else if (FPU == "neon") { Features.push_back("+neon"); + } else if (FPU == "neon-vfpv4") { + Features.push_back("+neon"); + Features.push_back("+vfpv4"); } else if (FPU == "none") { Features.push_back("-vfp2"); Features.push_back("-vfp3"); diff --git a/clang/test/Driver/arm-mfpu.c b/clang/test/Driver/arm-mfpu.c index e762478..d1454ad 100644 --- a/clang/test/Driver/arm-mfpu.c +++ b/clang/test/Driver/arm-mfpu.c @@ -19,14 +19,6 @@ // CHECK-FPA: "-target-feature" "-vfp3" // CHECK-FPA: "-target-feature" "-neon" -// RUN: %clang -target arm-linux-eabi -mfpu=vfp3-d16 %s -### -o %t.o 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s -// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 %s -### -o %t.o 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s -// CHECK-VFP3-D16: "-target-feature" "+vfp3" -// CHECK-VFP3-D16: "-target-feature" "+d16" -// CHECK-VFP3-D16: "-target-feature" "-neon" - // RUN: %clang -target arm-linux-eabi -mfpu=vfp %s -### -o %t.o 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-VFP %s // CHECK-VFP: "-target-feature" "+vfp2" @@ -39,6 +31,14 @@ // CHECK-VFP3: "-target-feature" "+vfp3" // CHECK-VFP3: "-target-feature" "-neon" +// RUN: %clang -target arm-linux-eabi -mfpu=vfp3-d16 %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s +// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s +// CHECK-VFP3-D16: "-target-feature" "+vfp3" +// CHECK-VFP3-D16: "-target-feature" "+d16" +// CHECK-VFP3-D16: "-target-feature" "-neon" + // RUN: %clang -target arm-linux-eabi -mfpu=vfp4 %s -### -o %t.o 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-VFP4 %s // RUN: %clang -target arm-linux-eabi -mfpu=vfpv4 %s -### -o %t.o 2>&1 \ @@ -86,6 +86,11 @@ // RUN: | FileCheck --check-prefix=CHECK-NEON %s // CHECK-NEON: "-target-feature" "+neon" +// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv4 %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV4 %s +// CHECK-NEON-VFPV4: "-target-feature" "+neon" +// CHECK-NEON-VFPV4: "-target-feature" "+vfpv4" + // RUN: %clang -target arm-linux-eabi -msoft-float %s -### -o %t.o 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-SOFT-FLOAT %s // CHECK-SOFT-FLOAT: "-target-feature" "-neon" -- 2.7.4