From 34f2672a905032e05414032bd2669880fe72ddb4 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 17 Apr 2011 20:44:02 +0000 Subject: For clang, make -mno-mmx imply -mno-3dnow. This is what gcc does. Submitted by: arundel Obtained from: http://llvm.org/viewvc/llvm-project?view=rev&revision=129665 --- contrib/llvm/tools/clang/lib/Basic/Targets.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'contrib/llvm/tools/clang/lib/Basic/Targets.cpp') diff --git a/contrib/llvm/tools/clang/lib/Basic/Targets.cpp b/contrib/llvm/tools/clang/lib/Basic/Targets.cpp index 55321f24..08a9208 100644 --- a/contrib/llvm/tools/clang/lib/Basic/Targets.cpp +++ b/contrib/llvm/tools/clang/lib/Basic/Targets.cpp @@ -1133,7 +1133,8 @@ bool X86TargetInfo::setFeatureEnabled(llvm::StringMap &Features, 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"] = @@ -1146,12 +1147,10 @@ bool X86TargetInfo::setFeatureEnabled(llvm::StringMap &Features, 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") -- cgit v1.1