This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: generic vectors: how should they work?
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: James E Wilson <wilson at specifixinc dot com>
- Cc: Janis Johnson <janis187 at us dot ibm dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 01 Sep 2004 16:40:38 -0400
- Subject: Re: generic vectors: how should they work?
- References: <20040901003511.GA8377@us.ibm.com> <41362D1C.2020906@specifixinc.com>
>>>>> James E Wilson writes:
James> I think the biggest hole is the lack of an operator to extract an
James> element from a vector. If you want target independent code to extract
James> an element from a vector, then you have to use a union. However, once
James> you use a union, you no longer have vector operations, and can't use the
James> hardware vector instructions. Instead, what happens is that the vector
James> gets forced into a stack slot so we can index into it. Maybe we could
James> reuse the array syntax for this, e.g vector[0] to extract the first
James> element of the vector?
Honza submitted a patch to implement additional init/set/extract
expanders, but the second patch never was reviewed.
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg00050.html
David