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


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


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