diff options
author | dim <dim@FreeBSD.org> | 2012-10-22 17:47:37 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-10-22 17:47:37 +0000 |
commit | ca71b68ea40c83f641d6485e027368568f244197 (patch) | |
tree | c99847ebc9aaeb2a3282f4ec64851e860b7b7427 /contrib/llvm/lib/Target/X86 | |
parent | b8bfa388090b60333be20a9273bc20718edad200 (diff) | |
download | FreeBSD-src-ca71b68ea40c83f641d6485e027368568f244197.zip FreeBSD-src-ca71b68ea40c83f641d6485e027368568f244197.tar.gz |
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
Diffstat (limited to 'contrib/llvm/lib/Target/X86')
-rw-r--r-- | contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp b/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp index c89d1af..c4b75a6 100644 --- a/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp +++ b/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp @@ -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; |