This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Vector constant question
- From: Stan Shebs <shebs at apple dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 11 Dec 2001 17:11:15 -0800
- Subject: Vector constant question
I've been working on support for AltiVec vector constants, getting
generally good results by adapting compound literal handling for
arrays, and have it working in some simple cases now.
One place where I'm using array code is in expr.c:store_constructor,
on the theory that a vector looks like a short fixed-length array.
Unfortunately the ARRAY_TYPE case wants the tree node to have a
TYPE_DOMAIN value, but for vectors that field is defined as
TYPE_DEBUG_REPRESENTATION_TYPE and is thus unavailable. I think
I want to use the array store_constructor code, because it has
lots of IQ that makes sense for vector setup. Does this make
sense, and if so, should I adapt the array code to only look
at the domain if it's an actual array and fake it if it's a vector,
or would it better to clone and strip the array code to make a
dedicated case for vectors?
Stan