[Bug c/87171] -march=native doesn't detect flags correctly on G4560
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Sep 1 13:38:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87171
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, your CPU doesn't support AVX, which is why xsave* is turned off:
#define XCR_AVX_ENABLED_MASK \
(XSTATE_SSE | XSTATE_YMM)
if (has_osxsave)
asm (".byte 0x0f; .byte 0x01; .byte 0xd0"
: "=a" (eax), "=d" (edx)
: "c" (XCR_XFEATURE_ENABLED_MASK));
else
eax = 0;
/* Check if AVX registers are supported. */
if ((eax & XCR_AVX_ENABLED_MASK) != XCR_AVX_ENABLED_MASK)
{
has_avx = 0;
has_avx2 = 0;
has_fma = 0;
has_fma4 = 0;
has_f16c = 0;
has_xop = 0;
has_xsave = 0;
has_xsaveopt = 0;
has_xsaves = 0;
has_xsavec = 0;
}
Is XSAVE* useful for anything when AVX isn't enabled?
More information about the Gcc-bugs
mailing list