From: Richard Barton Date: Fri, 28 Nov 2014 20:39:59 +0000 (+0000) Subject: Add additional arguments for -mfpu options X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b0dcc160a92930c8fecc51a057a838f7e3fafef;p=platform%2Fupstream%2Fllvm.git Add additional arguments for -mfpu options Add neon-vfpv3 to allow specifying both at the same time. This is not an option that GCC supports, but follows the same track and should be non-controversial. Change-Id: Id9ec157c835937d7d11ad0f49dbe5171fac17658 llvm-svn: 222933 --- diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 96a4b43a..067efe6 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-vfpv3") { + Features.push_back("+vfpv3"); + Features.push_back("+neon"); } else if (FPU == "neon-vfpv4") { Features.push_back("+neon"); Features.push_back("+vfpv4"); diff --git a/clang/test/Driver/arm-mfpu.c b/clang/test/Driver/arm-mfpu.c index d1454ad..06e7364 100644 --- a/clang/test/Driver/arm-mfpu.c +++ b/clang/test/Driver/arm-mfpu.c @@ -86,6 +86,11 @@ // RUN: | FileCheck --check-prefix=CHECK-NEON %s // CHECK-NEON: "-target-feature" "+neon" +// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv3 %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV3 %s +// CHECK-NEON-VFPV3: "-target-feature" "+vfpv3" +// CHECK-NEON-VFPV3: "-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"