[macstl-dev] Integrating Linux changes,
or that funny return type issue
Glen Low
glen.low at pixelglow.com
Sat Jun 4 00:37:51 WST 2005
Michael:
I've integrated most of your changes but not having a YDL box handy I
can't really test. I'm definitely supporting only gcc >= 3.4.2 on
Linux because of the vector bool issues.
I noticed one of the first changes you made related to mainline 3.3
ickiness with return values within templates. I'm wondering whether
it still holds for 3.4.2 and above; please try to compile:
namespace macstl
{
namespace impl
{
template <unsigned int v0, unsigned int v1, unsigned
int v2, unsigned int v3> struct generator
{
__vector unsigned int operator() () const
{
#if defined(USE_C99_VEC_INIT_IN_TEMPL)
return (__vector unsigned int) {v0,
v1, v2, v3};
#elif defined
(USE_MOT_VEC_INIT_IN_TEMPL)
// most compilers choke on this, not
realizing v0 - v3 ARE constant expressions!!
return (__vector unsigned int) (v0,
v1, v2, v3);
#else
union union_type
{
unsigned int val [4];
__vector unsigned int vec;
};
static const union_type un = {v0,
v1, v2, v3};
return un.vec;
#endif
}
};
}
}
On mainline 3.3, the "__vector unsigned int operator() () const" line
caused major unpleasantness IIRC.
Also there was another spot where you changed
vec_splat_u32 (-16)
to
vec_splat_u32 (0xF0)
Does that really not work on mainline gcc 3.4.2? (Since briefly
looking at the Altivec PIM, the argument should really be -16 to 15
only.)
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
aim: pixglen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pixelglow.com/lists/archive/macstl-dev/attachments/20050604/e35a0edf/attachment-0001.html
More information about the macstl-dev
mailing list