[MPlayer-dev-eng] altivec patch 1/5: missing vec_splat in vec_clip

Luca Barbato lu_zero at gentoo.org
Thu Feb 9 10:03:47 CET 2006


Romain Dolbeau wrote:
> Luca Barbato wrote:
> 
>> Ugly but working macro, please benchmark it against load&splat.
> 
> Yuck. This seems to me completely unacceptable, as
> it makes for unportable, unreadable, likely-to-be-faulty,
> possibly future-unproof code, that additionaly won't
> compile with anything but a handful of gccs (and yes,
> xlc can be used on most if not all of the altivec code
> once you take out the gcc-only includes).

There is a simpler but maybe longer solution, that one is an ugly 
workaround just to check if load and splat is that bad, if you think 
that is a bug you know the lovely gcc bts and I'd love to see a reply 
from them =)

I don't know why gcc should assume you don't want a load single element 
and it has to automagically expand {a} to {a,a,a,a} and then use load 
vector...

> 
> If the non-splated macro works on the original, reference
> implementation of the AltiVec intrinsics (i.e. the
> Apple/motorola [before they became freescale] gcc),
> then that should be the actual implementation, with
> #define'd, documented workaround for the others, broken
> gcc out there.
> 

I'd rather have code working on the current mantained compilers and that 
seems to mean gcc-fsf and xlc ...

lu




More information about the MPlayer-dev-eng mailing list