[MPlayer-dev-eng] [PATCH] cpu detection for core2

Zuxy Meng zuxy.meng at gmail.com
Mon Jun 4 03:36:23 CEST 2007


Hi,

2007/6/4, Vladimir Mosgalin <mosgalin at vm10124.spb.edu>:
> Hi Zuxy Meng!
>
>  On 2007.06.03 at 15:39:31 +0800, Zuxy Meng wrote next:
>
> > > > -march=k8 should work because without -fprefetch-loop-arrays, gcc
> > > > isn't able to generate any AMD specific instructions. But I can't
> > > > guarantee this :-) But as for Core2, isn't '-march=nocona
> > > > -mtune=pentium-m' faster?
> > >
> > > pentium-m isn't x86_64, so it would be meaningless to tune x86_64 code for
> > > it, so gcc refuses to compile with -mtune=pentium-m.
> >
> > Then we're left with no choice but k8...
>
> actually simplest -march=x86-64 works good ;) haven't compared with k8
> though.

They should yield identical code. Actually for march, x86-64 = k8 -
3dnow!, and for mtune, x86-64 == k8. (gcc manual didn't even mention
x86-64 but it's in the source.) Fore Core 2, maybe -march=nocona
-mtune=x86-64 is the best but for simplicity setting both to x86-64 is
just fine.
-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6



More information about the MPlayer-dev-eng mailing list