This is the mail archive of the
mailing list for the GCC project.
Re: patch: Re: rfc: auto-casted vector types
- From: Jim Wilson <wilson at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Geoff Keating <geoffk at geoffk dot org>, Nick Clifton <nickc at redhat dot com>, gcc-patches at gcc dot gnu dot org, Kumar Gala <kumar dot gala at motorola dot com>, mark at codesourcery dot com, Zack Weinberg <zack at codesourcery dot com>
- Date: 19 Feb 2003 15:21:35 -0500
- Subject: Re: patch: Re: rfc: auto-casted vector types
- References: <BC4CE95E-443B-11D7-9EC3-000393750C1E@redhat.com>
>So... instead of hacking all over the place in perhaps the .md and .c
This is the part where Nick got bogged down. The V2SI assumption is
everywhere. In the patterns in the spe.md file, in the builtin expanders in
the rs6000.c file, and in the intrinsic definitions in the spe.h header file.
There is an awful lot of stuff that needs to change if we use a different
RTL mode. This makes it a large, difficult, and risky change.
>why don't we instead cast the return types of all the builtins
>to __ev64_opaque__, and then remove the offending line Geoff pointed
>out. Like this:
Changing the intrinsic definitions in spe.h to cast the result to the right
type does sound like an easy solution to the problem. The ABI defines the
behaviour of the intrinsics, but does not define the behaviour of the gcc
builtins, so all that really matters is that we get the intrinsics right.
Graham is suggesting that we change the builtin function expanders in rs6000.c
to use the correct type. Maybe we can change the builtin function types
without having to change the RTL modes. This would mean using an opaque
vector type instead of V2SI_type_node in the rs6000.c file. This should have
the same effect as adding casts to the intrinsics. This means defining
the opaque vector type as a builtin type instead of in spe.h.