[MPlayer-dev-eng] ppc runtime-cpu-detection fails with gcc 3.3

Luca Barbato lu_zero at gentoo.org
Sat Feb 25 22:25:55 CET 2006


Alan Curry wrote:
> 
> Do you mean that Apple has a compiler that not only doesn't recognize the
> upstream -m flags, but also _ignores_ unrecognized -m flags, allowing the
> mistake to go undetected? Ouch.
> 

guess why I don't like gcc-apple...

> Furthermore, I've made a new discovery (thanks to Andrea's work on the Amiga)
> that is bad for runtime-cpudetection. When runtime-cpudetection is enabled,
> we compile everything with -maltivec -mabi=altivec. -maltivec is necessary to
> get at the functions in <altivec.h>, and I'm not sure what -mabi=altivec
> actually does...

runtime cpudetection on a world with 2 main groups of cpu and just only
one feature that is radically different isn't really that needed...
just provide one g3 and one g4 to pick and you'll be happy.

> This is a sign that runtime-cpudetection for altivec currently works only by
> luck. We're using -maltivec and expecting the altivec instructions to appear
> only where vec_*() functions are explicitly called. That's a bad assumption,
> and it's only going to get worse as gcc gets smarter and becomes capable of
> using altivec instructions to implement ordinary C loops (autovectorization).

I guess that's due -O4 and the other optimization and maybe the amiga
gcc always enables vectorizer.

> Then there's the possibility of ditching the C language extensions and just
> writing the altivec code with asm() like the MMX guys do...
> 

No, please...

-- 

Luca Barbato

Gentoo/linux Developer		Gentoo/PPC Operational Leader
http://dev.gentoo.org/~lu_zero




More information about the MPlayer-dev-eng mailing list