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, i386]: Implement -mcmpxchg16b and -msahf options


> Jan Hubicka wrote:
> >>+@item -mcmpxchg16b
> >>+@opindex -mcmpxchg16b
> >>+This option will enable GCC to use CMPXCHG16B instruction in generated 
> >>code.
> >>    
> >
> >Perhaps little extra information can be put here.  Average user looking
> >for flags to speed up his application will have no idea what CMPXCHG16B
> >is used for and thus we can save his time spent by looking for docs or
> >unnecesary benchmarking if his 3d FPS now runs cooler.
> 
> Jan, thanks for pointing me to Wikipedia reference. I have added the 
> text from wikipedia entry to both items, with a crossreference to Atomic 
> Builtins.

If the patch is not commited yet, perhaps
> +This option will enable GCC to use SAHF instruction in generated code.  Early
> +Intel CPUs with Intel 64 lacked LAHF and SAHF instructions supported by AMD64
> +until introduction of Pentium 4 G1 step in December 2005.  LAHF and SAHF are
> +load and store instructions, respectively, for certain status flags.  These
> +instructions are used for virtualization and floating-point condition handling.

I would leave out the virtualization - GCC won't use it in this context
so it is a bit misleading. It might be nice to make clear that sahf use
is very limited, since fcomi can be used in wast majority cases. But
this is all just nitpicking.

Thanks,
Honza


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