aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/MCTargetDesc
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-10-13 17:28:35 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-10-13 17:28:35 +0000
commit126afcbf654e42dc3f659a1a66bfa8a784e7bd46 (patch)
treec9ed2f8a8bd02a5784d2341ab7e8677a22ebcdc3 /lib/Target/X86/MCTargetDesc
parentd86296a4aea7ebac9c8ef8ba92642b64545dec95 (diff)
downloadexternal_llvm-126afcbf654e42dc3f659a1a66bfa8a784e7bd46.zip
external_llvm-126afcbf654e42dc3f659a1a66bfa8a784e7bd46.tar.gz
external_llvm-126afcbf654e42dc3f659a1a66bfa8a784e7bd46.tar.bz2
X86: Disable long nops for all cpus prior to pentiumpro/i686.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165878 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/MCTargetDesc')
-rw-r--r--lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp b/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
index 3809f3d..0ca1209 100644
--- a/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
+++ b/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;