Pull in r165878 from upstream llvm trunk:

X86: Disable long nops for all cpus prior to pentiumpro/i686.

This is the safest approach for now.  If you think long nops matter a
lot for performance, compile with -march=i686 or higher. :)

MFC after:	3 days
This commit is contained in:
Dimitry Andric 2012-10-22 17:47:37 +00:00
parent ac9caaf57f
commit bf3d102133

View File

@ -307,7 +307,9 @@ bool X86AsmBackend::writeNopData(uint64_t Count, MCObjectWriter *OW) const {
};
// This CPU doesnt support long nops. If needed add more.
if (CPU == "geode") {
// FIXME: Can we get this from the subtarget somehow?
if (CPU == "generic" || CPU == "i386" || CPU == "i486" || CPU == "i586" ||
CPU == "pentium" || CPU == "pentium-mmx" || CPU == "geode") {
for (uint64_t i = 0; i < Count; ++i)
OW->Write8(0x90);
return true;