This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: Re: rfc: auto-casted vector types
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, gcc-patches at gcc dot gnu dot org, Kumar Gala <kumar dot gala at motorola dot com>, Jim Wilson <wilson at redhat dot com>, mark at codesourcery dot com
- Date: Tue, 18 Feb 2003 14:19:59 -0800
- Subject: Re: patch: Re: rfc: auto-casted vector types
- References: <26F2B670-438D-11D7-93F3-000393750C1E@redhat.com>
Aldy Hernandez <aldyh@redhat.com> writes:
> I have addressed everyone's suggestions. I have also included a
> testcase.
Still not quite right on the target hook stuff:
> + @findex TARGET_VECTOR_TYPES_COMPATIBLE
> + @item TARGET_VECTOR_TYPES_COMPATIBLE(@var{tree1}, @var{tree2})
> + Define this macro to return nonzero if no cast is needed when copying
> + a vector value of type @var{tree1} to a vector value of type
> + @var{tree2}.
Kill this chunk entirely.
> + @deftypefn {Target Hook} bool TARGET_VECTOR_TYPES_COMPATIBLE (tree
> @var{type1}, tree @var{type2})
> + This target hook returns @code{true} if two vector types can be copied
> + without an explicit cast.
> + @end deftypefn
And incorporate its wording here:
This target hook should return @code{true} if no cast is
needed when copying a vector value of type @var{type1} into a
vector lvalue of type @var{type2}. The default is that there are no
such types.
Except it looks, inspecting the callers, to be the other way around.
(Which probably doesn't matter, since the relations are symmetric.)
> + extern bool rs6000_spe_vector_types_compatible PARAMS ((tree, tree));
This function can and should now be made static.
> + /* Allow SPE vector types to be inter-converted. */
> + #define TARGET_VECTOR_TYPES_COMPATIBLE
> rs6000_spe_vector_types_compatible
Make this definition with the other target-hook defines, in rs6000.c.
zw