[PATCH] D35254: [mips][mt][7/7] Add driver option for the MIPS MT ASE.
Simon Dardis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 12 14:13:34 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL307847: [mips][mt][7/7] Add driver option for the MIPS MT ASE. (authored by sdardis).
Repository:
rL LLVM
https://reviews.llvm.org/D35254
Files:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/Driver/ToolChains/Arch/Mips.cpp
cfe/trunk/test/Driver/mips-features.c
Index: cfe/trunk/include/clang/Driver/Options.td
===================================================================
--- cfe/trunk/include/clang/Driver/Options.td
+++ cfe/trunk/include/clang/Driver/Options.td
@@ -2027,6 +2027,10 @@
HelpText<"Enable MSA ASE (MIPS only)">;
def mno_msa : Flag<["-"], "mno-msa">, Group<m_Group>,
HelpText<"Disable MSA ASE (MIPS only)">;
+def mmt : Flag<["-"], "mmt">, Group<m_Group>,
+ HelpText<"Enable MT ASE (MIPS only)">;
+def mno_mt : Flag<["-"], "mno-mt">, Group<m_Group>,
+ HelpText<"Disable MT ASE (MIPS only)">;
def mfp64 : Flag<["-"], "mfp64">, Group<m_Group>,
HelpText<"Use 64-bit floating point registers (MIPS only)">;
def mfp32 : Flag<["-"], "mfp32">, Group<m_Group>,
Index: cfe/trunk/test/Driver/mips-features.c
===================================================================
--- cfe/trunk/test/Driver/mips-features.c
+++ cfe/trunk/test/Driver/mips-features.c
@@ -70,6 +70,18 @@
// RUN: | FileCheck --check-prefix=CHECK-NOMMSA %s
// CHECK-NOMMSA: "-target-feature" "-msa"
//
+// -mmt
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mno-mt -mmt 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-MMT %s
+// CHECK-MMT: "-target-feature" "+mt"
+//
+// -mno-mt
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mmt -mno-mt 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NOMMT %s
+// CHECK-NOMMT: "-target-feature" "-mt"
+//
// -modd-spreg
// RUN: %clang -target mips-linux-gnu -### -c %s -mno-odd-spreg -modd-spreg 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-MODDSPREG %s
Index: cfe/trunk/lib/Driver/ToolChains/Arch/Mips.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains/Arch/Mips.cpp
+++ cfe/trunk/lib/Driver/ToolChains/Arch/Mips.cpp
@@ -301,6 +301,7 @@
"nomadd4");
AddTargetFeature(Args, Features, options::OPT_mlong_calls,
options::OPT_mno_long_calls, "long-calls");
+ AddTargetFeature(Args, Features, options::OPT_mmt, options::OPT_mno_mt,"mt");
}
mips::NanEncoding mips::getSupportedNanEncoding(StringRef &CPU) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35254.106303.patch
Type: text/x-patch
Size: 2134 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170712/717251f4/attachment-0001.bin>
More information about the cfe-commits
mailing list