public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99704] New: volatile is needed on asm statements in <cpuid.h>
@ 2021-03-22  2:37 hjl.tools at gmail dot com
  2021-03-22  2:50 ` [Bug target/99704] " hjl.tools at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2021-03-22  2:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99704
           Summary: volatile is needed on asm statements in <cpuid.h>
           Product: gcc
           Version: 9.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: crazylht at gmail dot com, ubizjak at gmail dot com
  Target Milestone: ---
            Target: i386,x86-64

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/99704] volatile is needed on asm statements in <cpuid.h>
  2021-03-22  2:37 [Bug target/99704] New: volatile is needed on asm statements in <cpuid.h> hjl.tools at gmail dot com
@ 2021-03-22  2:50 ` hjl.tools at gmail dot com
  2021-03-22  4:58 ` crazylht at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2021-03-22  2:50 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |hjl.tools at gmail dot com
   Last reconfirmed|                            |2021-03-22
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 50446
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50446&action=edit
A patch

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/99704] volatile is needed on asm statements in <cpuid.h>
  2021-03-22  2:37 [Bug target/99704] New: volatile is needed on asm statements in <cpuid.h> hjl.tools at gmail dot com
  2021-03-22  2:50 ` [Bug target/99704] " hjl.tools at gmail dot com
@ 2021-03-22  4:58 ` crazylht at gmail dot com
  2021-03-22  7:11 ` crazylht at gmail dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: crazylht at gmail dot com @ 2021-03-22  4:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
How should we handle -march=native on hybrid core?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/99704] volatile is needed on asm statements in <cpuid.h>
  2021-03-22  2:37 [Bug target/99704] New: volatile is needed on asm statements in <cpuid.h> hjl.tools at gmail dot com
  2021-03-22  2:50 ` [Bug target/99704] " hjl.tools at gmail dot com
  2021-03-22  4:58 ` crazylht at gmail dot com
@ 2021-03-22  7:11 ` crazylht at gmail dot com
  2021-03-23 12:26 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: crazylht at gmail dot com @ 2021-03-22  7:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Hongtao.liu from comment #2)
> How should we handle -march=native on hybrid core?

Nevermind, assume you're meaning the bellow parts are different on hybrid core
02H
EAX Cache and TLB Information 
EBX Cache and TLB Information.
ECX Cache and TLB Information.
EDX Cache and TLB Information.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/99704] volatile is needed on asm statements in <cpuid.h>
  2021-03-22  2:37 [Bug target/99704] New: volatile is needed on asm statements in <cpuid.h> hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2021-03-22  7:11 ` crazylht at gmail dot com
@ 2021-03-23 12:26 ` cvs-commit at gcc dot gnu.org
  2021-03-23 12:40 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-23 12:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:9c89c9e9c6b59260c7745c8714b69f94784a9c13

commit r11-7786-g9c89c9e9c6b59260c7745c8714b69f94784a9c13
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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/99704] volatile is needed on asm statements in <cpuid.h>
  2021-03-22  2:37 [Bug target/99704] New: volatile is needed on asm statements in <cpuid.h> hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2021-03-23 12:26 ` cvs-commit at gcc dot gnu.org
@ 2021-03-23 12:40 ` cvs-commit at gcc dot gnu.org
  2021-03-23 12:51 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-23 12:40 UTC (permalink / raw)
  To: gcc-bugs

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)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/99704] volatile is needed on asm statements in <cpuid.h>
  2021-03-22  2:37 [Bug target/99704] New: volatile is needed on asm statements in <cpuid.h> hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2021-03-23 12:40 ` cvs-commit at gcc dot gnu.org
@ 2021-03-23 12:51 ` cvs-commit at gcc dot gnu.org
  2021-03-23 12:53 ` cvs-commit at gcc dot gnu.org
  2021-03-23 12:54 ` hjl.tools at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-23 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:66cd00cf21b80ed3dc7678e605555e41b6ac6085

commit r9-9303-g66cd00cf21b80ed3dc7678e605555e41b6ac6085
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)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/99704] volatile is needed on asm statements in <cpuid.h>
  2021-03-22  2:37 [Bug target/99704] New: volatile is needed on asm statements in <cpuid.h> hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2021-03-23 12:51 ` cvs-commit at gcc dot gnu.org
@ 2021-03-23 12:53 ` cvs-commit at gcc dot gnu.org
  2021-03-23 12:54 ` hjl.tools at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-23 12:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:3553e057df3a7fb2524339b1681fe3153ae7d568

commit r8-10816-g3553e057df3a7fb2524339b1681fe3153ae7d568
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)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/99704] volatile is needed on asm statements in <cpuid.h>
  2021-03-22  2:37 [Bug target/99704] New: volatile is needed on asm statements in <cpuid.h> hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2021-03-23 12:53 ` cvs-commit at gcc dot gnu.org
@ 2021-03-23 12:54 ` hjl.tools at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2021-03-23 12:54 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |11.0
         Resolution|---                         |FIXED

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for GCC 11 and on GCC 8/9/10 branches.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-03-23 12:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22  2:37 [Bug target/99704] New: volatile is needed on asm statements in <cpuid.h> hjl.tools at gmail dot com
2021-03-22  2:50 ` [Bug target/99704] " hjl.tools at gmail dot com
2021-03-22  4:58 ` crazylht at gmail dot com
2021-03-22  7:11 ` crazylht at gmail dot com
2021-03-23 12:26 ` cvs-commit at gcc dot gnu.org
2021-03-23 12:40 ` cvs-commit at gcc dot gnu.org
2021-03-23 12:51 ` cvs-commit at gcc dot gnu.org
2021-03-23 12:53 ` cvs-commit at gcc dot gnu.org
2021-03-23 12:54 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).