aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2014-01-25 16:35:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2014-01-25 16:35:56 +0000
commit43349674f185519631d480b0a6c325d2052b63a9 (patch)
tree84295c1a7ff2f08ccda7e8aa0e8cd556ceb3ade6 /contrib
parentcd827392010a7597bea043525b14a7f0b6659938 (diff)
downloadsrc-43349674f185519631d480b0a6c325d2052b63a9.tar.gz
src-43349674f185519631d480b0a6c325d2052b63a9.zip
Pull in r195679 from upstream llvm trunk:
Don't use nopl in cpus that don't support it. Patch by Mikulas Patocka. I added the test. I checked that for cpu names that gas knows about, it also doesn't generate nopl. The modified cpus: i686 - there are i686-class CPUs that don't have nopl: Via c3, Transmeta Crusoe, Microsoft VirtualBox - see https://bbs.archlinux.org/viewtopic.php?pid=775414 k6, k6-2, k6-3, winchip-c6, winchip2 - these are 586-class CPUs via c3 c3-2 - see https://bugs.archlinux.org/task/19733 as a proof that Via c3 and c3-Nehemiah don't have nopl PR: bin/185777 MFC after: 3 days
Notes
Notes: svn path=/head/; revision=261162
Diffstat (limited to 'contrib')
-rw-r--r--contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp b/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
index 598ddee56d21..c995aada179b 100644
--- a/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
+++ b/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
@@ -308,8 +308,12 @@ bool X86AsmBackend::writeNopData(uint64_t Count, MCObjectWriter *OW) const {
// This CPU doesnt support long nops. If needed add more.
// FIXME: Can we get this from the subtarget somehow?
+ // FIXME: We could generated something better than plain 0x90.
if (CPU == "generic" || CPU == "i386" || CPU == "i486" || CPU == "i586" ||
- CPU == "pentium" || CPU == "pentium-mmx" || CPU == "geode") {
+ CPU == "pentium" || CPU == "pentium-mmx" || CPU == "i686" ||
+ CPU == "k6" || CPU == "k6-2" || CPU == "k6-3" || CPU == "geode" ||
+ CPU == "winchip-c6" || CPU == "winchip2" || CPU == "c3" ||
+ CPU == "c3-2") {
for (uint64_t i = 0; i < Count; ++i)
OW->Write8(0x90);
return true;