public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
@ 2005-07-19 17:07 Ivan Yosifov
  2005-07-19 17:52 ` Jan Engelhardt
  0 siblings, 1 reply; 16+ messages in thread
From: Ivan Yosifov @ 2005-07-19 17:07 UTC (permalink / raw)
  To: linux-kernel

Hello,

If I set the CPU type to be amd64 in kernel config, the kernel is built
with -march=k8. If I set it to be k6, the kernel is built with
-march=k6. If I set the CPU type to be Pentium4, the kernel is built
with -march=i686 -mtune=pentium4. Why is not the for-P4 kernel built
with -march=pentium4 ? 
I tried building the kernel with -march=pentium4  for the sake of
experiment and got no ill effects.

Thanks,
Ivan Yosifov.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  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
  0 siblings, 1 reply; 16+ messages in thread
From: Jan Engelhardt @ 2005-07-19 17:52 UTC (permalink / raw)
  To: Ivan Yosifov; +Cc: linux-kernel

>Hello,
>
>If I set the CPU type to be amd64 in kernel config, the kernel is built
>with -march=k8. If I set it to be k6, the kernel is built with
>-march=k6. If I set the CPU type to be Pentium4, the kernel is built
>with -march=i686 -mtune=pentium4. Why is not the for-P4 kernel built
>with -march=pentium4 ? 
>I tried building the kernel with -march=pentium4  for the sake of
>experiment and got no ill effects.

-march= specifies the instruction set, -mcpu= / -mtune= the tuning factor. 
Maybe it is that the instruction set is the same on i686 and 
pentium4. cmov for example is not present in k6, and k8 is something 
completely different at all.


Jan Engelhardt
-- 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  2005-07-19 17:52 ` Jan Engelhardt
@ 2005-07-19 18:35   ` Ivan Yosifov
  2005-07-20  8:03     ` Kerin Millar
  0 siblings, 1 reply; 16+ messages in thread
From: Ivan Yosifov @ 2005-07-19 18:35 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel

On Tue, 2005-07-19 at 19:52 +0200, Jan Engelhardt wrote:
> >Hello,
> >
> >If I set the CPU type to be amd64 in kernel config, the kernel is built
> >with -march=k8. If I set it to be k6, the kernel is built with
> >-march=k6. If I set the CPU type to be Pentium4, the kernel is built
> >with -march=i686 -mtune=pentium4. Why is not the for-P4 kernel built
> >with -march=pentium4 ? 
> >I tried building the kernel with -march=pentium4  for the sake of
> >experiment and got no ill effects.
> 
> -march= specifies the instruction set, -mcpu= / -mtune= the tuning factor. 
> Maybe it is that the instruction set is the same on i686 and 
> pentium4. cmov for example is not present in k6, and k8 is something 
> completely different at all.
> 
> 
> Jan Engelhardt

-march implies -mtune and also implies thing like -msse2 for the
instruction set where applicable. 
I think -march=pentium4 is equivalent to -mmmx -msse -msse2
-mtune=pentium4 ( if I have not fogotten anything ).  
Pentium4 supports things like sse2 and mmx which AFAIK plain i686 does
not. I first thought that maybe the kernel was destabilized by such
optimizations, but k8 has all of them and more ( sse3 ). 
So, if it is ok to build the k8 kernel with -march=k8 why is it not ok
to built the p4 kernel with -march=pentium4 ? 
I may be wrong, but any way I think of it it looks like a performance
hit to build a p4 kernel with -march=i686.

Ivan Yosifov.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with  -march=i686 ?
       [not found]   ` <4s5aD-1sw-3@gated-at.bofh.it>
@ 2005-07-19 20:12     ` Bodo Eggert
  2005-07-19 20:15       ` Jan Engelhardt
  0 siblings, 1 reply; 16+ messages in thread
From: Bodo Eggert @ 2005-07-19 20:12 UTC (permalink / raw)
  To: ivan, Jan Engelhardt, linux-kernel

Ivan Yosifov <ivan@yosifov.net> wrote:

> -march implies -mtune and also implies thing like -msse2 for the
> instruction set where applicable.
> I think -march=pentium4 is equivalent to -mmmx -msse -msse2
> -mtune=pentium4 ( if I have not fogotten anything ).
> Pentium4 supports things like sse2 and mmx which AFAIK plain i686 does
> not.

AFAIK it's not possible to use SSE and MME in kernel mode, since these
registers aren't preserved (it would be expensive).
-- 
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with  -march=i686 ?
  2005-07-19 20:12     ` Bodo Eggert
@ 2005-07-19 20:15       ` Jan Engelhardt
  2005-07-19 20:19         ` Lee Revell
  0 siblings, 1 reply; 16+ messages in thread
From: Jan Engelhardt @ 2005-07-19 20:15 UTC (permalink / raw)
  To: 7eggert; +Cc: ivan, linux-kernel


>AFAIK it's not possible to use SSE and MME in kernel mode, since these
>registers aren't preserved (it would be expensive).

Floating point is anyway a no-no in the kernel. 



Jan Engelhardt
-- 
| Alphagate Systems, http://alphagate.hopto.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with  -march=i686 ?
  2005-07-19 20:15       ` Jan Engelhardt
@ 2005-07-19 20:19         ` Lee Revell
  0 siblings, 0 replies; 16+ messages in thread
From: Lee Revell @ 2005-07-19 20:19 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: 7eggert, ivan, linux-kernel

On Tue, 2005-07-19 at 22:15 +0200, Jan Engelhardt wrote:
> >AFAIK it's not possible to use SSE and MME in kernel mode, since these
> >registers aren't preserved (it would be expensive).
> 
> Floating point is anyway a no-no in the kernel. 

However, there are a few exceptions like mmx_memcpy.

Lee


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  2005-07-20  8:03     ` Kerin Millar
@ 2005-07-20  7:57       ` Jan Engelhardt
  2005-07-20  8:23       ` Ivan Yosifov
  1 sibling, 0 replies; 16+ messages in thread
From: Jan Engelhardt @ 2005-07-20  7:57 UTC (permalink / raw)
  To: Kerin Millar; +Cc: linux-kernel


>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).

In that case, -mno-sse should have been used.



Jan Engelhardt
-- 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  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
  0 siblings, 2 replies; 16+ messages in thread
From: Kerin Millar @ 2005-07-20  8:03 UTC (permalink / raw)
  To: linux-kernel

On Tue, 19 Jul 2005 21:35:51 +0300, Ivan Yosifov wrote:

<snip>

> -march implies -mtune and also implies thing like -msse2 for the
> instruction set where applicable. 
> I think -march=pentium4 is equivalent to -mmmx -msse -msse2
> -mtune=pentium4 ( if I have not fogotten anything ).  
> Pentium4 supports things like sse2 and mmx which AFAIK plain i686 does
> not. I first thought that maybe the kernel was destabilized by such
> optimizations, but k8 has all of them and more ( sse3 ). 
> So, if it is ok to build the k8 kernel with -march=k8 why is it not ok
> to built the p4 kernel with -march=pentium4 ? 
> I may be wrong, but any way I think of it it looks like a performance
> hit to build a p4 kernel with -march=i686.
> 

Well, it may seem logical to think that but proving it is another matter
entirely. The flags that you refer to (-mmmx, -msse and -msse2) enable
support for vector extensions through various built-in functions. But this
does not necessarily mean that the code is somehow transformed to make use
of these functions, nor that the compiler decides to makes effective use
of these extensions via the optimisation process. As far as I'm aware,
only >=gcc-4.0 has support for auto-vectorisation although I am not
certain as to how effective it is. Jakub Jellinek has some wise words to
say on the topic in general:

https://www.redhat.com/archives/fedora-devel-list/2005-January/msg00742.html

Where genuine performance tests are conducted the results are not always
in accordance with what one might expect. Only hours ago I was reading a
LFS thread where someone had noted poorer performance using the "prescott"
target as opposed to "i386" for example. That Red Hat also choose to use
-march=i386 is interesting (as noted in the link above, with the exception
of the kernel and glibc) ...

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).

Cheers,

--Kerin Millar


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  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
  1 sibling, 2 replies; 16+ messages in thread
From: Ivan Yosifov @ 2005-07-20  8:23 UTC (permalink / raw)
  To: Kerin Millar; +Cc: linux-kernel

On Wed, 2005-07-20 at 09:03 +0100, Kerin Millar wrote:
> On Tue, 19 Jul 2005 21:35:51 +0300, Ivan Yosifov wrote:
> 
> <snip>
> 
> > -march implies -mtune and also implies thing like -msse2 for the
> > instruction set where applicable. 
> > I think -march=pentium4 is equivalent to -mmmx -msse -msse2
> > -mtune=pentium4 ( if I have not fogotten anything ).  
> > Pentium4 supports things like sse2 and mmx which AFAIK plain i686 does
> > not. I first thought that maybe the kernel was destabilized by such
> > optimizations, but k8 has all of them and more ( sse3 ). 
> > So, if it is ok to build the k8 kernel with -march=k8 why is it not ok
> > to built the p4 kernel with -march=pentium4 ? 
> > I may be wrong, but any way I think of it it looks like a performance
> > hit to build a p4 kernel with -march=i686.
> > 
> 
> Well, it may seem logical to think that but proving it is another matter
> entirely. The flags that you refer to (-mmmx, -msse and -msse2) enable
> support for vector extensions through various built-in functions. But this
> does not necessarily mean that the code is somehow transformed to make use
> of these functions, nor that the compiler decides to makes effective use
> of these extensions via the optimisation process. As far as I'm aware,
> only >=gcc-4.0 has support for auto-vectorisation although I am not
> certain as to how effective it is. Jakub Jellinek has some wise words to
> say on the topic in general:
> 
> https://www.redhat.com/archives/fedora-devel-list/2005-January/msg00742.html

Interesting. 

> 
> Where genuine performance tests are conducted the results are not always
> in accordance with what one might expect. Only hours ago I was reading a
> LFS thread where someone had noted poorer performance using the "prescott"
> target as opposed to "i386" for example. That Red Hat also choose to use
> -march=i386 is interesting (as noted in the link above, with the exception
> of the kernel and glibc) ...
> 
> 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 ?

> Cheers,
> 
> --Kerin Millar
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  2005-07-20  8:23       ` Ivan Yosifov
@ 2005-07-20  9:21         ` Jan Engelhardt
  2005-07-20  9:44         ` Kerin Millar
  1 sibling, 0 replies; 16+ messages in thread
From: Jan Engelhardt @ 2005-07-20  9:21 UTC (permalink / raw)
  To: Ivan Yosifov; +Cc: Kerin Millar, linux-kernel


>> https://www.redhat.com/archives/fedora-devel-list/2005-January/msg00742.html
>
>Interesting. 

This may seem reasonable for a Linux distribution, but less for those who 
compile kernelballs just for themselves.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  2005-07-20  9:44         ` Kerin Millar
@ 2005-07-20  9:25           ` Ivan Yosifov
  2005-07-20 10:38             ` Denis Vlasenko
  0 siblings, 1 reply; 16+ messages in thread
From: Ivan Yosifov @ 2005-07-20  9:25 UTC (permalink / raw)
  To: Kerin Millar; +Cc: linux-kernel


> <snip>
> 
> > > 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.

Cheers,
Ivan Yosifov.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  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
  1 sibling, 1 reply; 16+ messages in thread
From: Kerin Millar @ 2005-07-20  9:44 UTC (permalink / raw)
  To: ivan; +Cc: linux-kernel

On Wed, 2005-07-20 at 11:23 +0300, Ivan Yosifov wrote:
> On Wed, 2005-07-20 at 09:03 +0100, Kerin Millar wrote:
> > On Tue, 19 Jul 2005 21:35:51 +0300, Ivan Yosifov wrote:
> > 

<snip>

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

Cheers,

--Kerin Millar


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  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
  0 siblings, 2 replies; 16+ messages in thread
From: Denis Vlasenko @ 2005-07-20 10:38 UTC (permalink / raw)
  To: ivan, Kerin Millar; +Cc: linux-kernel

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  2005-07-20 10:38             ` Denis Vlasenko
@ 2005-07-20 11:33               ` Ivan Yosifov
  2005-07-20 11:42               ` Simon Strandman
  1 sibling, 0 replies; 16+ messages in thread
From: Ivan Yosifov @ 2005-07-20 11:33 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: Kerin Millar, linux-kernel

On Wed, 2005-07-20 at 13:38 +0300, Denis Vlasenko wrote:
> 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.

Ah, well.

I was curious why p4 got special treatment other CPUs ( like amd ) do
not.

Cheers,
Ivan Yosifov.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  2005-07-20 10:38             ` Denis Vlasenko
  2005-07-20 11:33               ` Ivan Yosifov
@ 2005-07-20 11:42               ` Simon Strandman
  2005-07-20 14:29                 ` Dave Neuer
  1 sibling, 1 reply; 16+ messages in thread
From: Simon Strandman @ 2005-07-20 11:42 UTC (permalink / raw)
  To: linux-kernel

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>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
  2005-07-20 11:42               ` Simon Strandman
@ 2005-07-20 14:29                 ` Dave Neuer
  0 siblings, 0 replies; 16+ messages in thread
From: Dave Neuer @ 2005-07-20 14:29 UTC (permalink / raw)
  To: Simon Strandman; +Cc: linux-kernel

On 7/20/05, Simon Strandman <simon.strandman@telia.com> wrote:
> Denis Vlasenko skrev:
> 
> >
> >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?
> 

As Kerin pointed out, gcc 4.0 supports auto-vectorization, so in
theory, these options might provide better performance on some
compilers. Apparently SSE is not enabled by default any more for P4
because of a known bug w/ some compilers. People using gcc > 4.0 can
obviously override it.

Really, w/out the presence of auto-vectorization support in the
compiler none of the vector extensions are necessary. The only things
that really matter are -mcpu and -mtune: what instruction set your CPU
supports and the optimum instruction scheduling characteristics for
your CPU, respectively.

Dave

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2005-07-20 14:30 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox