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
This commit is contained in:
dim 2011-04-17 20:44:02 +00:00
parent 090e4af4fe
commit 34f2672a90

View File

@ -1133,7 +1133,8 @@ bool X86TargetInfo::setFeatureEnabled(llvm::StringMap<bool> &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<bool> &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")