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 1M9vhX-0001iF-8E for garchives@archives.gentoo.org; Fri, 29 May 2009 06:36:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8D74FE04B7; Fri, 29 May 2009 06:36:21 +0000 (UTC) Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by pigeon.gentoo.org (Postfix) with ESMTP id 2AC2DE04B7 for ; Fri, 29 May 2009 06:36:21 +0000 (UTC) Received: by ewy9 with SMTP id 9so5541416ewy.34 for ; Thu, 28 May 2009 23:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=zKOnqpTtYUlhWR/VxV1Z/3ZF20AT/ftWbiwBYwOPrdk=; b=kQyCY4FSKYC3sGzZ4g5kU6i/ghZl/1XwcBtNVjt/mS/WMQ7WDpHxFN61PaStY6BR8K U6tFSMRlJx6TCArYO5z4bZKcjXXZwadzPUPJ5XmsDnyaNDkjf5M27eI+VHLZg3YvXs/B m8xzeD/csx5+ZnznkbH5PmBVluzm9vHccVvlA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=UP+7MIZxcZa5LHCq+WJHCPiwruXm2DQmwDR3pxpcBFkc9YnuK3OQfZbXAfnnA0uYIg Xucmw9/VsQHh3ufAywcbBcUly2DY0+huFkBQrBe2MHpZNif23NSMzuB2nfvni/vacjfY cnbeuJyJty2UK8GoUGW30Rd8RIE4CUpRSPwUY= Received: by 10.210.114.1 with SMTP id m1mr3776893ebc.4.1243578980580; Thu, 28 May 2009 23:36:20 -0700 (PDT) Received: from energy.localnet (energy.heim10.tu-clausthal.de [139.174.197.94]) by mx.google.com with ESMTPS id 23sm1253263ewy.92.2009.05.28.23.36.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 May 2009 23:36:19 -0700 (PDT) From: Volker Armin Hemmann To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] USE="mmx mmxext sse sse2 ssse3 3dnow 3dnowext" Date: Fri, 29 May 2009 08:36:15 +0200 User-Agent: KMail/1.11.90 (Linux/2.6.29.4r4; KDE/4.2.87; x86_64; ; ) References: <4E38BD16-0410-4A31-839C-290364A8D735@stellar.eclipse.co.uk> <047506CD-647D-472E-A96B-96C278C31F51@stellar.eclipse.co.uk> <871vq85vcf.fsf@newton.gmurray.org.uk> In-Reply-To: <871vq85vcf.fsf@newton.gmurray.org.uk> 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 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200905290836.15586.volkerarmin@googlemail.com> X-Archives-Salt: eb006069-b772-4979-a601-249ed5c7dbed X-Archives-Hash: 4df78b756869e3f3c1ea2f7fcf56e83b On Freitag 29 Mai 2009, Graham Murray wrote: > Stroller writes: > > But, surely "-march=" also instructs gcc to support the additional > > instructions. Suggest you re-read Daniel's post that I was replying > > to. > > > > What's the difference between supporting the "certain set of > > instructions" with "-march=" and doing so with USEs? > > > > Or doesn't "-march=" support additional "certain sets of > > instructions". What does it do, then? > > I am not sure, > > $ gcc -Q --help=target -march=core2 > The following options are target specific: > -m128bit-long-double [disabled] > -m32 [enabled] > -m3dnow [disabled] > -m3dnowa [disabled] > -m64 [disabled] > -m80387 [enabled] > -m96bit-long-double [enabled] > -mabm [disabled] > -maccumulate-outgoing-args [disabled] > -maes [disabled] > -malign-double [disabled] > -malign-functions= > -malign-jumps= > -malign-loops= > -malign-stringops [enabled] > -march= core2 > -masm= > -mavx [disabled] > -mbranch-cost= > -mcld [disabled] > -mcmodel= > -mcx16 [disabled] > -mfancy-math-387 [enabled] > -mfma [disabled] > -mforce-drap [disabled] > -mfp-ret-in-387 [enabled] > -mfpmath= > -mfused-madd [enabled] > -mglibc [enabled] > -mhard-float [enabled] > -mieee-fp [enabled] > -mincoming-stack-boundary= > -minline-all-stringops [disabled] > -minline-stringops-dynamically [disabled] > -mintel-syntax [disabled] > -mlarge-data-threshold= > -mmmx [disabled] > -mms-bitfields [disabled] > -mno-align-stringops [disabled] > -mno-fancy-math-387 [disabled] > -mno-fused-madd [disabled] > -mno-push-args [disabled] > -mno-red-zone [disabled] > -mno-sse4 [enabled] > -momit-leaf-frame-pointer [disabled] > -mpc > -mpclmul [disabled] > -mpopcnt [disabled] > -mpreferred-stack-boundary= > -mpush-args [enabled] > -mrecip [disabled] > -mred-zone [enabled] > -mregparm= > -mrtd [disabled] > -msahf [disabled] > -msoft-float [disabled] > -msse [disabled] > -msse2 [disabled] > -msse2avx [disabled] > -msse3 [disabled] > -msse4 [disabled] > -msse4.1 [disabled] > -msse4.2 [disabled] > -msse4a [disabled] > -msse5 [disabled] > -msseregparm [disabled] > -mssse3 [disabled] > -mstack-arg-probe [disabled] > -mstackrealign [enabled] > -mstringop-strategy= > -mtls-dialect= > -mtls-direct-seg-refs [enabled] > -mtune= > -muclibc [disabled] > -mveclibabi= and man gcc says: --help={class|[^]qualifier}[,...] Print (on the standard output) a description of the command line options understood by the compiler that fit into all specified classes and qualifiers. These are the supported classes: target This will display target-specific options. Unlike the --target-help option however, target-specific options of the linker and assembler will not be displayed. This is because those tools do not currently support the extended --help= syntax. Which leads to the conclusion, that it only shows options that can be set. Not options how they are really set (besides a few that are enabled by the architecture). If you leave -march=core2 out. you will probably get the same result. for example: -mfpmath=unit Generate floating point arithmetics for selected unit unit. The choices for unit are: 387 Use the standard 387 floating point coprocessor present majority of chips and emulated otherwise. Code compiled with this option will run almost everywhere. The temporary results are computed in 80bit precision instead of precision specified by the type resulting in slightly different results compared to most of other chips. See -ffloat-store for more detailed description. This is the default choice for i386 compiler. sse Use scalar floating point instructions present in the SSE instruction set. This instruction set is supported by Pentium3 and newer chips, in the AMD line by Athlon-4, Athlon-xp and Athlon-mp chips. The earlier version of SSE instruction set supports only single precision arithmetics, thus the double and extended precision arithmetics is still done using 387. Later version, present only in Pentium4 and the future AMD x86-64 chips supports double precision arithmetics too. For the i386 compiler, you need to use -march=cpu-type, -msse or -msse2 switches to enable SSE extensions and make this option effective. For the x86-64 compiler, these extensions are enabled by default. The resulting code should be considerably faster in the majority of cases and avoid the numerical instability problems of 387 code, but may break some existing code that expects temporaries to be 80bit. This is the default choice for the x86-64 compiler. as you can see from the man excerpt, if the help showed enabled options, mfpmath=sse should be there. It isn't. ...