This is the mail archive of the gcc-bugs@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]

[Bug target/85100] __builtin_cpu_supports avx does not verify OS supports it


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

--- Comment #9 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Thu Mar 29 13:14:06 2018
New Revision: 258954

URL: https://gcc.gnu.org/viewcvs?rev=258954&root=gcc&view=rev
Log:
i386: Enable AVX/AVX512 features only if supported by OSXSAVE

Enable AVX and AVX512 features only if their states are supported by
OSXSAVE.

        PR target/85100
        * config/i386/cpuinfo.c (XCR_XFEATURE_ENABLED_MASK): New.
        (XSTATE_FP): Likewise.
        (XSTATE_SSE): Likewise.
        (XSTATE_YMM): Likewise.
        (XSTATE_OPMASK): Likewise.
        (XSTATE_ZMM): Likewise.
        (XSTATE_HI_ZMM): Likewise.
        (XCR_AVX_ENABLED_MASK): Likewise.
        (XCR_AVX512F_ENABLED_MASK): Likewise.
        (get_available_features): Enable AVX and AVX512 features only
        if their states are supported by OSXSAVE.

Modified:
    trunk/libgcc/ChangeLog
    trunk/libgcc/config/i386/cpuinfo.c

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