From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1M9l3H-0003MP-Vo for garchives@archives.gentoo.org; Thu, 28 May 2009 19:14:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9E0B6E0396; Thu, 28 May 2009 19:14:06 +0000 (UTC) Received: from smtpout.karoo.kcom.com (smtpout.karoo.kcom.com [212.50.160.34]) by pigeon.gentoo.org (Postfix) with ESMTP id 5FEFDE0396 for ; Thu, 28 May 2009 19:14:06 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.41,265,1241391600"; d="scan'208";a="97573961" Received: from unknown (HELO compaq.stroller.uk.eu.org) ([213.152.39.90]) by smtpout.karoo.kcom.com with ESMTP; 28 May 2009 20:14:05 +0100 Received: from [192.168.1.71] (unknown [192.168.1.71]) by compaq.stroller.uk.eu.org (Postfix) with ESMTP id A3C65137CD1 for ; Thu, 28 May 2009 20:14:01 +0100 (BST) Message-Id: <9837B633-4DCD-47E2-9A88-442A0FE750BC@stellar.eclipse.co.uk> From: Stroller To: gentoo-user@lists.gentoo.org In-Reply-To: <20090528131735.10e3b3ce@ilievnet.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: [gentoo-user] USE="mmx mmxext sse sse2 ssse3 3dnow 3dnowext" Date: Thu, 28 May 2009 20:13:57 +0100 References: <4E38BD16-0410-4A31-839C-290364A8D735@stellar.eclipse.co.uk> <200905260637.49384.volkerarmin@googlemail.com> <195F8064-21ED-4FBB-8C2D-78F45FBAF59A@stellar.eclipse.co.uk> <20090526173123.6af2881a@ilievnet.com> <51F59246-9E2D-42D1-9AC6-BB5E41BDAAF3@stellar.eclipse.co.uk> <20090527034704.49154a6f@ilievnet.com> <208DD9E9-EDD3-4E85-A8DE-6B08B08EDCEA@stellar.eclipse.co.uk> <20090527130041.214f5aa9@ilievnet.com> <20090528131735.10e3b3ce@ilievnet.com> X-Mailer: Apple Mail (2.935.3) X-Archives-Salt: 04b525ee-3ffe-4af8-b4cc-124637f6f81b X-Archives-Hash: 1af6de7e13aba4742c6abbe8bd336133 On 28 May 2009, at 11:17, Daniel Iliev wrote: > ... > Not the same thing. "-march=" instructs gcc to produce a binary > designed to run only on the given CPU architecture, while > USE flags instruct the build system to include or not support for a > given feature ... Actually, I _think_ in mplayer the difference is that the USE flags enable the use of hand-written assembler code which takes advantage of the MMX or whatever. I'm not 100% sure about this at all, but what's the difference in the architectures of the Pentium 2 & the Pentium 3, if not for the support for SSE? (and / or whatever) Sure they are designed differently, but surely the instruction sets of all 32-bit processors from the earliest Pentiums even to Core Duos (not Core2s) are all basically x86. Some have these extended instruction sets (EIS, I think you called them earlier in the thread) and those are the additions from one generation to the next. So if you choose -march=pentium3 it will not run on a Pentium 2 because Pentium 2s do not have SSSE, and it's the *compiler* that added the code that utilises SSE. I believe that mplayer is one of those exceptional packages which uses some assembler optimisations. These don't make any sense for most programs, because it takes too much time to write & much maintenance is loads of hassle, and assembler will make little difference. Most programs are one minute opening a new window, and the next minute are waiting for the mail server to reply and are doing lots of different tasks which are not worth hand optimising. But once mplayer has started decoding a video, then it's doing the same thing time & time again, decoding each frame of the picture - it does exactly the same thing 25 times per second for an hour or two at a time, so that may be worth optimising for if the compiler is found to be less clever than someone like John Carmack. I'm not absolutely sure that the USE flags enable hand-written assembler code, but what I do know is that: 1) ASM stands for assembler. See http://en.wikipedia.org/wiki/Asm 2) Google "mplayer asm" returns a bunch of hits. 3) MMX was marketed as "MultiMedia eXtension" 4) mplayer is a multimedia player. 5) MMX doesn't have floating point support, but SSE adds that and has dedicated functions for multiplying floating point numbers [1], which is just the sort of thing that one are useful in decoding mpegs & playing back video. Stroller. [1] http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions