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] RFC, start to add attribute target support to powerpc


On Thu, 7 Oct 2010, Michael Meissner wrote:

> I looked at the options stuff, and figured we needed a combination of Variable
> and TargetSave, so I added TargetVariable.  It would be nice if we could move
> the x86 to use TargetVariable instead of TargetSave, and delete TargetSave.

Yes, this looks like a good way of doing things that fits in well with the 
general options infrastructure.  Thanks for working out how to integrate 
this with .opt files and gcc_options.

>  @item
> +A variable record to define a variable used to store option
> +information.  These records have two fields: the string
> +@samp{TargetVariable}, and a declaration of the type and name of the
> +variable, optionally with an initializer (but without any trailing
> +@samp{;}).  @samp{TargetVariable} are a combination of @samp{Variable}
> +and @samp{TargetSave} records in that the variable is defined in the
> +@code{gcc_options} structure, but these variables are also stored in
> +@code{cl_target_option} structure.  The variables are saved in the
> +target save code and restored in the target restore code.
> +
> +records have two fields: the string @samp{TargetSave}, and a
> +declaration type to go in the @code{cl_target_option} structure.

A cut-and-paste problem here with the second partial paragraph?

-- 
Joseph S. Myers
joseph@codesourcery.com


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