[cfe-commits] r129665 - /cfe/trunk/lib/Basic/Targets.cpp

Michael J. Spencer bigcheesegs at gmail.com
Sun Apr 17 12:22:03 PDT 2011


Author: mspencer
Date: Sun Apr 17 14:22:03 2011
New Revision: 129665

URL: http://llvm.org/viewvc/llvm-project?rev=129665&view=rev
Log:
Make -mno-mmx imply -mno-3dnow. This is what gcc does, and it makes sense.
Also, fold the sse4 and sse4.1 cases together.

Patch by Alexander Best!

Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=129665&r1=129664&r2=129665&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Sun Apr 17 14:22:03 2011
@@ -1146,7 +1146,8 @@
       Features["avx"] = true;
   } else {
     if (Name == "mmx")
-      Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] =
+      Features["mmx"] = Features["3dnow"] = Features["3dnowa"] =
+        Features["sse"] = Features["sse2"] = Features["sse3"] =
         Features["ssse3"] = Features["sse41"] = Features["sse42"] = false;
     else if (Name == "sse")
       Features["sse"] = Features["sse2"] = Features["sse3"] =
@@ -1159,12 +1160,10 @@
         Features["sse42"] = false;
     else if (Name == "ssse3")
       Features["ssse3"] = Features["sse41"] = Features["sse42"] = false;
-    else if (Name == "sse4")
+    else if (Name == "sse4" || Name == "sse4.1")
       Features["sse41"] = Features["sse42"] = false;
     else if (Name == "sse4.2")
       Features["sse42"] = false;
-    else if (Name == "sse4.1")
-      Features["sse41"] = Features["sse42"] = false;
     else if (Name == "3dnow")
       Features["3dnow"] = Features["3dnowa"] = false;
     else if (Name == "3dnowa")





More information about the cfe-commits mailing list