r195756 - [Mips] Pass -mmsa option to the assembler.
Simon Atanasyan
simon at atanasyan.com
Tue Nov 26 03:58:05 PST 2013
Author: atanasyan
Date: Tue Nov 26 05:58:04 2013
New Revision: 195756
URL: http://llvm.org/viewvc/llvm-project?rev=195756&view=rev
Log:
[Mips] Pass -mmsa option to the assembler.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/mips-as.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=195756&r1=195755&r2=195756&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Nov 26 05:58:04 2013
@@ -6187,6 +6187,13 @@ void gnutools::Assemble::ConstructJob(Co
Args.AddLastArg(CmdArgs, options::OPT_mdsp, options::OPT_mno_dsp);
Args.AddLastArg(CmdArgs, options::OPT_mdspr2, options::OPT_mno_dspr2);
+ if (Arg *A = Args.getLastArg(options::OPT_mmsa, options::OPT_mno_msa)) {
+ // Do not use AddLastArg because not all versions of MIPS assembler
+ // support -mmsa / -mno-msa options.
+ if (A->getOption().matches(options::OPT_mmsa))
+ CmdArgs.push_back(Args.MakeArgString("-mmsa"));
+ }
+
Arg *LastPICArg = Args.getLastArg(options::OPT_fPIC, options::OPT_fno_PIC,
options::OPT_fpic, options::OPT_fno_pic,
options::OPT_fPIE, options::OPT_fno_PIE,
Modified: cfe/trunk/test/Driver/mips-as.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mips-as.c?rev=195756&r1=195755&r2=195756&view=diff
==============================================================================
--- cfe/trunk/test/Driver/mips-as.c (original)
+++ cfe/trunk/test/Driver/mips-as.c Tue Nov 26 05:58:04 2013
@@ -136,3 +136,14 @@
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-MFP64 %s
// MIPS-MFP64: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mfp64"
+//
+// RUN: %clang -target mips-linux-gnu -mno-msa -mmsa -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-MSA %s
+// MIPS-MSA: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mmsa"
+//
+// RUN: %clang -target mips-linux-gnu -mmsa -mno-msa -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-NMSA %s
+// MIPS-NMSA: as{{(.exe)?}}"
+// MIPS-NMSA-NOT: "-mmsa"
More information about the cfe-commits
mailing list