Author: hans
Date: Fri Aug 11 09:30:46 2017
New Revision: 310726

URL: http://llvm.org/viewvc/llvm-project?rev=310726&view=rev
Log:
Revert r310074 (see PR34067 #4)

Added:
    cfe/branches/release_50/test/CodeGen/mips-madd4.c
      - copied unchanged from r310073, 
cfe/branches/release_50/test/CodeGen/mips-madd4.c
Modified:
    cfe/branches/release_50/   (props changed)
    cfe/branches/release_50/include/clang/Driver/Options.td
    cfe/branches/release_50/lib/Basic/Targets.cpp
    cfe/branches/release_50/lib/Driver/ToolChains/Arch/Mips.cpp
    cfe/branches/release_50/test/Preprocessor/init.c

Propchange: cfe/branches/release_50/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 11 09:30:46 2017
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309226,309263,309327,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310057,310158,310191,310359,310691-310692,310694,310700
+/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309226,309263,309327,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310158,310191,310359,310691-310692,310694,310700
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_50/include/clang/Driver/Options.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/include/clang/Driver/Options.td?rev=310726&r1=310725&r2=310726&view=diff
==============================================================================
--- cfe/branches/release_50/include/clang/Driver/Options.td (original)
+++ cfe/branches/release_50/include/clang/Driver/Options.td Fri Aug 11 09:30:46 
2017
@@ -2019,6 +2019,10 @@ def mdspr2 : Flag<["-"], "mdspr2">, Grou
 def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_Group>;
 def msingle_float : Flag<["-"], "msingle-float">, Group<m_Group>;
 def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_Group>;
+def mmadd4 : Flag<["-"], "mmadd4">, Group<m_Group>,
+  HelpText<"Enable the generation of 4-operand madd.s, madd.d and related 
instructions.">;
+def mno_madd4 : Flag<["-"], "mno-madd4">, Group<m_Group>,
+  HelpText<"Disable the generation of 4-operand madd.s, madd.d and related 
instructions.">;
 def mmsa : Flag<["-"], "mmsa">, Group<m_Group>,
   HelpText<"Enable MSA ASE (MIPS only)">;
 def mno_msa : Flag<["-"], "mno-msa">, Group<m_Group>,

Modified: cfe/branches/release_50/lib/Basic/Targets.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/lib/Basic/Targets.cpp?rev=310726&r1=310725&r2=310726&view=diff
==============================================================================
--- cfe/branches/release_50/lib/Basic/Targets.cpp (original)
+++ cfe/branches/release_50/lib/Basic/Targets.cpp Fri Aug 11 09:30:46 2017
@@ -8050,6 +8050,7 @@ class MipsTargetInfo : public TargetInfo
     NoDSP, DSP1, DSP2
   } DspRev;
   bool HasMSA;
+  bool DisableMadd4;
 
 protected:
   bool HasFP64;
@@ -8060,7 +8061,7 @@ public:
       : TargetInfo(Triple), IsMips16(false), IsMicromips(false),
         IsNan2008(false), IsSingleFloat(false), IsNoABICalls(false),
         CanUseBSDABICalls(false), FloatABI(HardFloat), DspRev(NoDSP),
-        HasMSA(false), HasFP64(false) {
+        HasMSA(false), DisableMadd4(false), HasFP64(false) {
     TheCXXABI.set(TargetCXXABI::GenericMIPS);
 
     setABI((getTriple().getArch() == llvm::Triple::mips ||
@@ -8306,6 +8307,9 @@ public:
     if (HasMSA)
       Builder.defineMacro("__mips_msa", Twine(1));
 
+    if (DisableMadd4)
+      Builder.defineMacro("__mips_no_madd4", Twine(1));
+
     Builder.defineMacro("_MIPS_SZPTR", Twine(getPointerWidth(0)));
     Builder.defineMacro("_MIPS_SZINT", Twine(getIntWidth()));
     Builder.defineMacro("_MIPS_SZLONG", Twine(getLongWidth()));
@@ -8468,6 +8472,8 @@ public:
         DspRev = std::max(DspRev, DSP2);
       else if (Feature == "+msa")
         HasMSA = true;
+      else if (Feature == "+nomadd4")
+        DisableMadd4 = true;
       else if (Feature == "+fp64")
         HasFP64 = true;
       else if (Feature == "-fp64")

Modified: cfe/branches/release_50/lib/Driver/ToolChains/Arch/Mips.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/lib/Driver/ToolChains/Arch/Mips.cpp?rev=310726&r1=310725&r2=310726&view=diff
==============================================================================
--- cfe/branches/release_50/lib/Driver/ToolChains/Arch/Mips.cpp (original)
+++ cfe/branches/release_50/lib/Driver/ToolChains/Arch/Mips.cpp Fri Aug 11 
09:30:46 2017
@@ -297,6 +297,8 @@ void mips::getMIPSTargetFeatures(const D
 
   AddTargetFeature(Args, Features, options::OPT_mno_odd_spreg,
                    options::OPT_modd_spreg, "nooddspreg");
+  AddTargetFeature(Args, Features, options::OPT_mno_madd4, options::OPT_mmadd4,
+                   "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");

Modified: cfe/branches/release_50/test/Preprocessor/init.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/test/Preprocessor/init.c?rev=310726&r1=310725&r2=310726&view=diff
==============================================================================
--- cfe/branches/release_50/test/Preprocessor/init.c (original)
+++ cfe/branches/release_50/test/Preprocessor/init.c Fri Aug 11 09:30:46 2017
@@ -4686,6 +4686,16 @@
 // RUN:   | FileCheck -match-full-lines -check-prefix MIPS-MSA %s
 // MIPS-MSA:#define __mips_msa 1
 //
+// RUN: %clang_cc1 -target-feature +nomadd4 \
+// RUN:   -E -dM -triple=mips-none-none < /dev/null \
+// RUN:   | FileCheck -match-full-lines -check-prefix MIPS-NOMADD4 %s
+// MIPS-NOMADD4:#define __mips_no_madd4 1
+//
+// RUN: %clang_cc1 \
+// RUN:   -E -dM -triple=mips-none-none < /dev/null \
+// RUN:   | FileCheck -match-full-lines -check-prefix MIPS-MADD4 %s
+// MIPS-MADD4-NOT:#define __mips_no_madd4 1
+//
 // RUN: %clang_cc1 -target-cpu mips32r3 -target-feature +nan2008 \
 // RUN:   -E -dM -triple=mips-none-none < /dev/null \
 // RUN:   | FileCheck -match-full-lines -check-prefix MIPS-NAN2008 %s


_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to