Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux