This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Altivec strangeness?


Am Mon, 2002-02-25 um 10.49 schrieb Jakub Jelinek:

> If you just want to save typing, with recent Aldy's patch: 
> static const vector signed short foo = { [0 ... 7] = 1 };

Sounds good to me. It's much better to hack and easier to read.
 
> should work (but you have to know how many elements it has, and it
> is a GNU extension).

That's not an issue because
a) I do know the number of elements
b) Code using the gcc altivec extension can be compiled only with gcc
   except for the complete bogus Motorola gcc.

> The result will be the same as { 1, 1, 1, 1, 1, 1, 1, 1 } though,
> so it will load the constant from memory as well.

For now it's okay, needs to be fixed sooner or later though.
 
-- 
Servus,
       Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]