[Bug target/99704] volatile is needed on asm statements in <cpuid.h>

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 23 12:40:44 GMT 2021


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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:6ee221e98e6a9363fe962b1babbe92eba286fa18

commit r10-9523-g6ee221e98e6a9363fe962b1babbe92eba286fa18
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Mar 21 19:47:24 2021 -0700

    x86: Add __volatile__ to __cpuid and __cpuid_count

    Since CPUID instruction may return different values on hybrid core.
    volatile is needed on asm statements in <cpuid.h>.

            PR target/99704
            * config/i386/cpuid.h (__cpuid): Add __volatile__.
            (__cpuid_count): Likewise.

    (cherry picked from commit 9c89c9e9c6b59260c7745c8714b69f94784a9c13)


More information about the Gcc-bugs mailing list