From 48af2a9e662f0d7ad0b6faa5cc9b25365cb21197 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Wed, 11 Jan 2012 11:21:31 +0000 Subject: Fix -mfpu parsing on ARM. - Support gcc-compatible vfpv3 name in addition to vfp3. - Support vfpv3-d16. - Disable neon feature for -mfpu=vfp* (yes, we were emitting Neon instructions for those!). llvm-svn: 147943 --- clang/lib/Driver/Tools.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'clang/lib/Driver/Tools.cpp') diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index a241712da96..1edc4414964 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -660,12 +660,23 @@ void Clang::AddARMTargetArgs(const ArgList &Args, CmdArgs.push_back("-vfp3"); CmdArgs.push_back("-target-feature"); CmdArgs.push_back("-neon"); + } else if (FPU == "vfp3-d16" || FPU == "vfpv3-d16") { + CmdArgs.push_back("-target-feature"); + CmdArgs.push_back("+vfp3"); + CmdArgs.push_back("-target-feature"); + CmdArgs.push_back("+d16"); + CmdArgs.push_back("-target-feature"); + CmdArgs.push_back("-neon"); } else if (FPU == "vfp") { CmdArgs.push_back("-target-feature"); CmdArgs.push_back("+vfp2"); - } else if (FPU == "vfp3") { + CmdArgs.push_back("-target-feature"); + CmdArgs.push_back("-neon"); + } else if (FPU == "vfp3" || FPU == "vfpv3") { CmdArgs.push_back("-target-feature"); CmdArgs.push_back("+vfp3"); + CmdArgs.push_back("-target-feature"); + CmdArgs.push_back("-neon"); } else if (FPU == "neon") { CmdArgs.push_back("-target-feature"); CmdArgs.push_back("+neon"); -- cgit v1.2.3