diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-03-28 08:38:53 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-03-28 08:38:53 +0000 |
commit | f4320ab08da5e4c927ef326c68d5081f5f2a2268 (patch) | |
tree | c3a2849d6487823874f1896bf6955aa3fe9730e2 /lib/Driver/Tools.cpp | |
parent | edaf281379e0aa712caf984ee33388e5f414e18d (diff) |
Add support for gcc-compatible -mmfcrf -mno-mfcrf PPC options
gcc provides -mmfcrf and -mno-mfcrf for controlling what we call
the mfocrf target feature. Also, PPC is now making use of the
static function AddTargetFeature used by the Mips Driver code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index fa3128bbd5..1c455eda4a 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1097,11 +1097,17 @@ void Clang::AddPPCTargetArgs(const ArgList &Args, } // Allow override of the Altivec feature. - if (Args.hasFlag(options::OPT_fno_altivec, options::OPT_faltivec, false)) { - CmdArgs.push_back("-target-feature"); - CmdArgs.push_back("-altivec"); - } + AddTargetFeature(Args, CmdArgs, + options::OPT_faltivec, options::OPT_fno_altivec, + "altivec"); + + // Note that gcc calls this mfcrf and LLVM calls this mfocrf. + AddTargetFeature(Args, CmdArgs, + options::OPT_mmfcrf, options::OPT_mno_mfcrf, + "mfocrf"); + // It is really only possible to turn qpx off because turning qpx on is tied + // to using the a2q CPU. if (Args.hasFlag(options::OPT_mno_qpx, options::OPT_mqpx, false)) { CmdArgs.push_back("-target-feature"); CmdArgs.push_back("-qpx"); |