This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: rfc: auto-casted vector types
- From: Jim Wilson <wilson at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: GCC Mailinglist <gcc at gcc dot gnu dot org>, Nick Clifton <nickc at redhat dot com>
- Date: 17 Feb 2003 17:25:12 -0500
- Subject: Re: rfc: auto-casted vector types
- References: <5D76D718-3F96-11D7-B31E-000393750C1E@redhat.com>
Aldy Hernandez <aldyh@redhat.com> writes:
> The PPC E500 API specifies that vector types of type __ev64_opaque__
> (V2SImode) can interconvert with other vector types without a cast.
Is there any publicly available documentation? My copy of the draft docs
say they are Motorola confidential. If there is documentation available,
it would be useful to point to it somewhere.
I tried searching the Motorola web site. I found Altivec PIM documentation,
but no SPE PIM documentation.
> * doc/tm.texi: Document TARGET_VECTOR_TYPES_COMPATIBLE.
> * c-typeck.c (comptypes): Take into account
> TARGET_VECTOR_TYPES_COMPATIBLE.
> (convert_for_assignment): Same.
> ...
The patch looks pretty reasonable to me also. I agree with Zack's suggestions.
It might be useful to note in the comments in the rs6000 file that the
current implementation has a known flaw. It pretends that V2SI is the opaque
vector type. This means that it accidentally allows conversions to/from the
V2SI vector type without explicit casts. In order to fix this, we need to
use a different otherwise unused vector type for the opaque vector type.
Nick started on a patch to do this, but didn't have enough time to finish it.
Jim