Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2012 17:47:37 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241895 - head/contrib/llvm/lib/Target/X86/MCTargetDesc
Message-ID:  <201210221747.q9MHlbdr060603@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Mon Oct 22 17:47:37 2012
New Revision: 241895
URL: http://svn.freebsd.org/changeset/base/241895

Log:
  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

Modified:
  head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp

Modified: head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
==============================================================================
--- head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp	Mon Oct 22 17:23:32 2012	(r241894)
+++ head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp	Mon Oct 22 17:47:37 2012	(r241895)
@@ -307,7 +307,9 @@ bool X86AsmBackend::writeNopData(uint64_
   };
 
   // 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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210221747.q9MHlbdr060603>