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

Luca Barbato lu_zero at gentoo.org
Thu Feb 9 23:30:25 CET 2006


Alan Curry wrote:

> The advantage to the current way is that the same macro can be used with any
> vector type whereas the long form intializer {x,x,x,x,x,x,x,x} would only be
> good for shorts. vec_clip won't be so neatly generalized anymore. I assume
> any such modifications should be confined within #if GCC (or a check added to
> configure, to #define HAVE_BROKEN_VECTOR_LITERALS)

wrong

 (cast){something} != (cast)(something)

you may try in gcc-apple {...} and see that the result is the same. The
(...) seems got rejected since doesn't fit that much in C and the {...}
is supported by both since it's just C99.

> 
> So is it a deliberate but undocumented difference? Has it been discussed on
> gcc's mailing list at any point? I've learned that when I think I've found a
> compiler bug, I should think again...
> 

No, looks like the AVV() macro could be not necessary anymore (before
the (castme){} format ICEd gcc-apple) and is a bit wrong in certain cases.

Yet another macro for your happyness (yes, is ugly, no I'm not proposing
it, but I'm running out of ideas)

Next will be vec_clip_u16 vec_clip_u8 etc...

lu


-- 

Luca Barbato

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

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ugly
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060209/a3931f25/attachment.txt>


More information about the MPlayer-dev-eng mailing list