On Wed, Aug 14, 2013 at 9:01 AM, Jan Hubicka <hubi...@ucw.cz> wrote:
>> > 2013-08-07  Xinliang David Li  <davi...@google.com>
>> >
>> >         * config/i386/i386.h: Adjust macro definition.
>> >         * config/i386/i386.opt: Define two new options.
>> >         * config/i386/x86-tune.def: Add arch selector field in macros.
>> >         * config/i386/i386.h: include x86-tune.def.
>> >         * config/i386/i386.c (ix86_option_override_internal):
>> >         Refactor the code.
>> >         (parse_mtune_ctrl_str): New function.
>> >         (set_ix86_tune_features): New function.
>> >         (ix86_function_specific_restore): Call the new helper function.
> OK.
>> +/* Helper function to set ix86_tune_features. IX86_TUNE is the
>> +   processor type.  */
>> +
>> +static void
>> +set_ix86_tune_features (enum processor_type ix86_tune, bool dump)
>> +{
>> +  unsigned int ix86_tune_mask = 1u << ix86_tune;
>> +  int i;
>> +
>> +  for (i = 0; i < X86_TUNE_LAST; ++i)
>> +    {
>> +      if (ix86_tune_no_default)
>> +        ix86_tune_features[i] = 0;
>> +      else
>> +        ix86_tune_features[i] = !!(initial_ix86_tune_features[i] & 
>> ix86_tune_mask);
> Perhaps != 0?

This part is copied from the original version -- so I will leave it
alone here ;)

>> Index: doc/invoke.texi
>> ===================================================================
>> --- doc/invoke.texi   (revision 201645)
>> +++ doc/invoke.texi   (working copy)
>> @@ -637,6 +637,7 @@ Objective-C and Objective-C++ Dialects}.
>>
>>  @emph{i386 and x86-64 Options}
>>  @gccoptlist{-mtune=@var{cpu-type}  -march=@var{cpu-type} @gol
>> +-mtune-ctrl=@var{feature-list} -mdump-tune-features -mno-default @gol
>>  -mfpmath=@var{unit} @gol
>>  -masm=@var{dialect}  -mno-fancy-math-387 @gol
>>  -mno-fp-ret-in-387  -msoft-float @gol
>> @@ -14429,6 +14430,24 @@ supported architecture, using the approp
>>  the file containing the CPU detection code should be compiled without
>>  these options.
>>
>> +@item -mdump-tune-features
>> +@opindex mdump-tune-features
>> +This option instructs GCC to dump the names of the x86 performance
>> +tuning features and default settings. The names can be used in
>> +@option{-mtune-ctrl=@var{feature-list}}.
>> +
>> +@item -mtune-ctrl=@var{feature-list}
>> +@opindex mtune-ctrl=@var{feature-list}
>> +This option is used to do fine grain control of x86 code generation 
>> features.
>> +@var{feature-list} is a comma separated list of @var{feature} names. See 
>> also
>> +@option{-mdump-tune-features}. When specified, the @var{feature} will be 
>> turned
>> +on if it is not preceded with @code{^}, otherwise, it will be turned off.
>> +
>> +@item -mno-default
>> +@opindex mno-default
>> +This option instructs GCC to turn off all tunable features. See also
>> +@option{-mtune-ctrl=@var{feature-list}} and @option{-mdump-tune-features}.
>
> Perhaps we shall at least explicitely document that this is intended for 
> devleopment
> only and may lead to ICEs.

Ok will do.

thanks,

David

>
> Honza
>> +
>>  @item -mcld
>>  @opindex mcld
>>  This option instructs GCC to emit a @code{cld} instruction in the prologue
>

Reply via email to