More altivec array initialisation troubles
Daniel Egger
degger@fhm.edu
Fri Feb 22 09:09:00 GMT 2002
Hija, this one is particularly lovely:
static const vector signed short test4[4] =
{
{1, 2, 3, 4, 5, 6, 7, 8},
{11, 12, 13, 14, 15, 16, 17, 18},
{21, 22, 23, 24, 25, 26, 27, 28},
{31, 32, 33, 34, 35, 36, 37, 38}
};
will compile to:
test4:
.short 1
.short 2
.short 3
.short 4
.zero 8
.short 11
.short 12
.short 13
.zero 10
.short 21
.short 22
.zero 12
.short 31
.zero 14
In the first row the values after the 4th short are truncated and
filled with zero, in the second after the 3rd, in the third after
the 2nd and in the fourth after the 1st.
--
Servus,
Daniel
More information about the Gcc
mailing list