https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81709

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Anatol from comment #6)
> > I don't believe compiler needs to do all that.
> 
> I might miss something, could you please share why?
> 
> The check for FXSAVE can be a compile time: if compiled for Pentium II tune
> or later then use FXSAVE otherwise use FSAVE.
> 
> if (tune >= 'pentium II')

It should check ISA for SSE, AVX, AVX512, MPX, ...

>   FXSAVE
> else
>   FSAVE
>   ... save whatever FSAVE did not save ...
> end

On newer processors, XSAVE is needed which uses EAX/EDX.

Reply via email to