From: Stephen Hines Date: Fri, 4 Mar 2016 20:57:22 +0000 (+0000) Subject: Switch krait to use -mcpu=cortex-a15 for assembler tool invocations. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3f91e31abc0fda2a3fccc4e7c5583f2d7635fc2;p=platform%2Fupstream%2Fllvm.git Switch krait to use -mcpu=cortex-a15 for assembler tool invocations. Summary: Using -no-integrated-as causes -mcpu=krait to be transformed into -march=armv7-a today. This precludes the assembler from using instructions like sdiv, which are present for krait. Cortex-a15 is the closest subset of functionality for krait, so we should switch the assembler to use that instead. Reviewers: cfe-commits, apazos, weimingz Subscribers: aemerson Differential Revision: http://reviews.llvm.org/D17874 llvm-svn: 262742 --- diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 285a822..72e7caa 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -8706,12 +8706,12 @@ void gnutools::Assembler::ConstructJob(Compilation &C, const JobAction &JA, Args.AddLastArg(CmdArgs, options::OPT_march_EQ); // FIXME: remove krait check when GNU tools support krait cpu - // for now replace it with -march=armv7-a to avoid a lower + // for now replace it with -mcpu=cortex-a15 to avoid a lower // march from being picked in the absence of a cpu flag. Arg *A; if ((A = Args.getLastArg(options::OPT_mcpu_EQ)) && StringRef(A->getValue()).lower() == "krait") - CmdArgs.push_back("-march=armv7-a"); + CmdArgs.push_back("-mcpu=cortex-a15"); else Args.AddLastArg(CmdArgs, options::OPT_mcpu_EQ); Args.AddLastArg(CmdArgs, options::OPT_mfpu_EQ);