This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch: Re: rfc: auto-casted vector types


>So... instead of hacking all over the place in perhaps the .md and .c
>file,

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.

Jim




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]