All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Strandman <simon.strandman@telia.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
Date: Wed, 20 Jul 2005 13:42:08 +0200	[thread overview]
Message-ID: <42DE3890.2040501@telia.com> (raw)
In-Reply-To: <200507201338.08179.vda@ilport.com.ua>

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:
>>
>><torvalds@ppc970.osdl.org>
>>	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 <simon.strandman@telia.com>


  parent reply	other threads:[~2005-07-20 11:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-19 17:07 Noob question. Why is the for-pentium4 kernel built with -march=i686 ? Ivan Yosifov
2005-07-19 17:52 ` Jan Engelhardt
2005-07-19 18:35   ` Ivan Yosifov
2005-07-20  8:03     ` Kerin Millar
2005-07-20  7:57       ` Jan Engelhardt
2005-07-20  8:23       ` Ivan Yosifov
2005-07-20  9:21         ` Jan Engelhardt
2005-07-20  9:44         ` Kerin Millar
2005-07-20  9:25           ` Ivan Yosifov
2005-07-20 10:38             ` Denis Vlasenko
2005-07-20 11:33               ` Ivan Yosifov
2005-07-20 11:42               ` Simon Strandman [this message]
2005-07-20 14:29                 ` Dave Neuer
     [not found] <4s3M3-ph-15@gated-at.bofh.it>
     [not found] ` <4s4y2-Rt-17@gated-at.bofh.it>
     [not found]   ` <4s5aD-1sw-3@gated-at.bofh.it>
2005-07-19 20:12     ` Bodo Eggert
2005-07-19 20:15       ` Jan Engelhardt
2005-07-19 20:19         ` Lee Revell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42DE3890.2040501@telia.com \
    --to=simon.strandman@telia.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.