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: Jim Wilson <wilson at redhat 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>
- Date: 18 Feb 2003 01:04:02 -0500
- Subject: Re: patch: Re: rfc: auto-casted vector types
- References: <2DF9AB16-42D6-11D7-93F3-000393750C1E@redhat.com>
Zack suggested using a target hook. To add a target hook, you add a new
field to the gcc_target structure in target.h, you add a new target macro
for that field to target-def.h which defaults to 0, you add that macro
to TARGET_INITIALIZER in the same file, and then you add a define to the
rs6000.c file to override the default target macro. In c-typeck.c, you
would then use (*targetm.new_field) instead of a macro. I haven't done
this myself, so I could have missed something. There are lots of existing
examples to look at, so it shouldn't be hard to figure out.
Jim