Bug 95260 - Confusing comments in cpuid.h
Summary: Confusing comments in cpuid.h
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: 11.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-21 14:13 UTC by H.J. Lu
Modified: 2020-05-21 14:54 UTC (History)
1 user (show)

See Also:
Host:
Target: i386, x86-64
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2020-05-21 14:13:02 UTC
cpuid.h has

/* XFEATURE_ENABLED_MASK register bits (%eax == 13, %ecx == 0) */
                                                ^^^ This is decimal.
/* Extended State Enumeration Sub-leaf (%eax == 13, %ecx == 1) */
                                                ^^^ This is decimal.
/* PT sub leaf (%eax == 14, %ecx == 0) */
                        ^^^ This is hex.

Since Intel SDM uses hex, comments should use hex eveywhere.
Comment 1 Martin Liška 2020-05-21 14:25:34 UTC
Just a question: why do you create PRs for all these issues?
Is it because you want to backport fixes to active branches?
Comment 2 GCC Commits 2020-05-21 14:30:44 UTC
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:a74630f3207d0bec63710c8c803685a0a4956986

commit r11-552-ga74630f3207d0bec63710c8c803685a0a4956986
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu May 21 07:19:27 2020 -0700

    config/i386/cpuid.h: Use hexadecimal in comments
    
    Since Intel SDM uses hexadecimal, use hexadecimal in comments.
    
            PR target/95260
            * config/i386/cpuid.h: Use hexadecimal in comments.
Comment 3 H.J. Lu 2020-05-21 14:53:39 UTC
Fixed for GCC 11.
Comment 4 H.J. Lu 2020-05-21 14:54:08 UTC
(In reply to Martin Liška from comment #1)
> Just a question: why do you create PRs for all these issues?
> Is it because you want to backport fixes to active branches?

That would be nice.