From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261172AbVGTLmR (ORCPT ); Wed, 20 Jul 2005 07:42:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261178AbVGTLmR (ORCPT ); Wed, 20 Jul 2005 07:42:17 -0400 Received: from pne-smtpout1-sn2.hy.skanova.net ([81.228.8.83]:63451 "EHLO pne-smtpout1-sn2.hy.skanova.net") by vger.kernel.org with ESMTP id S261172AbVGTLmQ (ORCPT ); Wed, 20 Jul 2005 07:42:16 -0400 Message-ID: <42DE3890.2040501@telia.com> Date: Wed, 20 Jul 2005 13:42:08 +0200 From: Simon Strandman User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: sv, en-us, en MIME-Version: 1.0 To: linux-kernel@vger.kernel.org Subject: Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ? References: <1121792852.11857.6.camel@home.yosifov.net> <1121852642.18129.39.camel@localhost> <1121851507.10454.3.camel@home.yosifov.net> <200507201338.08179.vda@ilport.com.ua> In-Reply-To: <200507201338.08179.vda@ilport.com.ua> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Denis Vlasenko skrev: >On Wednesday 20 July 2005 12:25, Ivan Yosifov wrote: > > >>>>>Also, I believe that the -march=pentium4 option /was/ actually used up >>>>>until kernel 2.6.10 where it was dropped because of a risk that some >>>>>versions of gcc would cause the kernel to use SSE registers for data >>>>>movement (which is a no-no). >>>>> >>>>> >>>>> >>>>You seem right. I fetched a 2.6.9 tarball and it is really built with >>>>-march=pentium4. Do you know which are versions of gcc in question ? >>>> >>>> >>>> >>>No, I'm afraid not. I only know that the advice came from Richard >>>Henderson who (I think) is one of the core glibc hackers. You can see >>>the point at which it was introduced by Linus in the ChangeLog (2nd >>>message from last): >>> >>>http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.10 >>> >>> >>Seems to be this one: >> >> >> Don't use "-march=pentium3" for gcc tuning. >> >> rth tells me that some versions of gcc may end up using the >> SSE registers for data movement when you do that. >> >> Use "-march=i686 -mtune=xxxx" instead. >> >> (We do the same thing for march=pentium2/4 too, just for >> consistency). >> >> >>The way it is worded it seems that it is a problem with *some* versions >>of gcc only on p3, not p4. >> >> > >Why do you care? I bet that differences between i686 code and pentium4 code >are well below noise level. >-- >vda > For x86_64 the flags -mno-sse -mno-mmx -mno-sse2 -mno-3dnow are always used for compilation. Why is'nt the same thing done for x86 instead of using -march=i686 -mtune=?. -march=athlon and -march=k6 includes -m3dnow and -mmmx, are those ok for the kernel but -msse isn't? -- Simon Strandman