x86: Update model values for Raptorlake.

Message ID 20230814043747.2877403-1-lili.cui@intel.com
State Unresolved
Headers
Series x86: Update model values for Raptorlake. |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Li, Pan2 via Gcc-patches Aug. 14, 2023, 4:37 a.m. UTC
  Committed as obvious, and backported to GCC13.

Lili.


Update model values for Raptorlake according to SDM.

gcc/ChangeLog

	* common/config/i386/cpuinfo.h (get_intel_cpu): Add model value 0xba
	to Raptorlake.
---
 gcc/common/config/i386/cpuinfo.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Jonathan Wakely Aug. 14, 2023, 2:19 p.m. UTC | #1
On 14/08/23 04:37 +0000, Pan Li via Gcc-patches wrote:
>Committed as obvious, and backported to GCC13.

Did you try building it on gcc-13?

     case 0x97:
     case 0x9a:
     case 0xbf:
       /* Alder Lake.  */
     case 0xb7:
     case 0xba:
     case 0xbf:
       /* Raptor Lake.  */


This fails:

In file included from /home/test/src/gcc-13/gcc/config/i386/driver-i386.cc:31:
/home/test/src/gcc-13/gcc/common/config/i386/cpuinfo.h: In function ‘const char* get_intel_cpu(__processor_model*, __processor_model2*, unsigned int*)’:
/home/test/src/gcc-13/gcc/common/config/i386/cpuinfo.h:543:5: error: duplicate case value
   543 |     case 0xbf:
       |     ^~~~
/home/test/src/gcc-13/gcc/common/config/i386/cpuinfo.h:539:5: note: previously used here
   539 |     case 0xbf:
       |     ^~~~

Please fix or revert.


>Lili.
>
>
>Update model values for Raptorlake according to SDM.
>
>gcc/ChangeLog
>
>	* common/config/i386/cpuinfo.h (get_intel_cpu): Add model value 0xba
>	to Raptorlake.
>---
> gcc/common/config/i386/cpuinfo.h | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h
>index ae48bc17771..dd7f0f6abfd 100644
>--- a/gcc/common/config/i386/cpuinfo.h
>+++ b/gcc/common/config/i386/cpuinfo.h
>@@ -537,6 +537,7 @@ get_intel_cpu (struct __processor_model *cpu_model,
>     case 0x9a:
>       /* Alder Lake.  */
>     case 0xb7:
>+    case 0xba:
>     case 0xbf:
>       /* Raptor Lake.  */
>     case 0xaa:
  
Jonathan Wakely Aug. 14, 2023, 2:25 p.m. UTC | #2
On 14/08/23 15:19 +0100, Jonathan Wakely wrote:
>On 14/08/23 04:37 +0000, Pan Li via Gcc-patches wrote:
>>Committed as obvious, and backported to GCC13.
>
>Did you try building it on gcc-13?
>
>    case 0x97:
>    case 0x9a:
>    case 0xbf:
>      /* Alder Lake.  */
>    case 0xb7:
>    case 0xba:
>    case 0xbf:
>      /* Raptor Lake.  */
>
>
>This fails:
>
>In file included from /home/test/src/gcc-13/gcc/config/i386/driver-i386.cc:31:
>/home/test/src/gcc-13/gcc/common/config/i386/cpuinfo.h: In function ‘const char* get_intel_cpu(__processor_model*, __processor_model2*, unsigned int*)’:
>/home/test/src/gcc-13/gcc/common/config/i386/cpuinfo.h:543:5: error: duplicate case value
>  543 |     case 0xbf:
>      |     ^~~~
>/home/test/src/gcc-13/gcc/common/config/i386/cpuinfo.h:539:5: note: previously used here
>  539 |     case 0xbf:
>      |     ^~~~
>
>Please fix or revert.


The backported patch is not the same as the trunk one, it adds two new
cases not one. But one of them is a duplicate of one you already added
in January 2022, in 4bd5297f665fd3ba5691297c016809f3501e7fba

No matter how obvious a patch is, if it touches code (not just
comments or docs) please don't commit without even building it once.

Also, backports should typically say something in the git commit
message, e.g. using git gcc-backport (or git cherry-pick -x) will
automatically add:

(cherry picked from commit 003016a40844701c48851020df672b70f3446bdb)

to the commit message.





>>Lili.
>>
>>
>>Update model values for Raptorlake according to SDM.
>>
>>gcc/ChangeLog
>>
>>	* common/config/i386/cpuinfo.h (get_intel_cpu): Add model value 0xba
>>	to Raptorlake.
>>---
>>gcc/common/config/i386/cpuinfo.h | 1 +
>>1 file changed, 1 insertion(+)
>>
>>diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h
>>index ae48bc17771..dd7f0f6abfd 100644
>>--- a/gcc/common/config/i386/cpuinfo.h
>>+++ b/gcc/common/config/i386/cpuinfo.h
>>@@ -537,6 +537,7 @@ get_intel_cpu (struct __processor_model *cpu_model,
>>    case 0x9a:
>>      /* Alder Lake.  */
>>    case 0xb7:
>>+    case 0xba:
>>    case 0xbf:
>>      /* Raptor Lake.  */
>>    case 0xaa:
  
Li, Pan2 via Gcc-patches Aug. 15, 2023, 2:14 a.m. UTC | #3
Sorry, I should have built the patch while backporting, and thanks for your report and suggestions.
I'll backport another patch to fix the problems after finishing bootstraps, probably in couple hours.

Thank you!
Lili.

> -----Original Message-----
> From: Jonathan Wakely <jwakely@redhat.com>
> Sent: Monday, August 14, 2023 10:26 PM
> To: Cui, Lili <lili.cui@intel.com>
> Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao <hongtao.liu@intel.com>
> Subject: Re: [PATCH] x86: Update model values for Raptorlake.
> 
> On 14/08/23 15:19 +0100, Jonathan Wakely wrote:
> >On 14/08/23 04:37 +0000, Pan Li via Gcc-patches wrote:
> >>Committed as obvious, and backported to GCC13.
> >
> >Did you try building it on gcc-13?
> >
> >    case 0x97:
> >    case 0x9a:
> >    case 0xbf:
> >      /* Alder Lake.  */
> >    case 0xb7:
> >    case 0xba:
> >    case 0xbf:
> >      /* Raptor Lake.  */
> >
> >
> >This fails:
> >
> >In file included from /home/test/src/gcc-13/gcc/config/i386/driver-
> i386.cc:31:
> >/home/test/src/gcc-13/gcc/common/config/i386/cpuinfo.h: In function ‘const
> char* get_intel_cpu(__processor_model*, __processor_model2*, unsigned
> int*)’:
> >/home/test/src/gcc-13/gcc/common/config/i386/cpuinfo.h:543:5: error:
> duplicate case value
> >  543 |     case 0xbf:
> >      |     ^~~~
> >/home/test/src/gcc-13/gcc/common/config/i386/cpuinfo.h:539:5: note:
> previously used here
> >  539 |     case 0xbf:
> >      |     ^~~~
> >
> >Please fix or revert.
> 
> 
> The backported patch is not the same as the trunk one, it adds two new cases
> not one. But one of them is a duplicate of one you already added in January
> 2022, in 4bd5297f665fd3ba5691297c016809f3501e7fba
> 
> No matter how obvious a patch is, if it touches code (not just comments or
> docs) please don't commit without even building it once.
> 
> Also, backports should typically say something in the git commit message, e.g.
> using git gcc-backport (or git cherry-pick -x) will automatically add:
> 
> (cherry picked from commit 003016a40844701c48851020df672b70f3446bdb)
> 
> to the commit message.
> 
> 
> 
> 
> 
> >>Lili.
> >>
> >>
> >>Update model values for Raptorlake according to SDM.
> >>
> >>gcc/ChangeLog
> >>
> >>	* common/config/i386/cpuinfo.h (get_intel_cpu): Add model value
> 0xba
> >>	to Raptorlake.
> >>---
> >>gcc/common/config/i386/cpuinfo.h | 1 +
> >>1 file changed, 1 insertion(+)
> >>
> >>diff --git a/gcc/common/config/i386/cpuinfo.h
> >>b/gcc/common/config/i386/cpuinfo.h
> >>index ae48bc17771..dd7f0f6abfd 100644
> >>--- a/gcc/common/config/i386/cpuinfo.h
> >>+++ b/gcc/common/config/i386/cpuinfo.h
> >>@@ -537,6 +537,7 @@ get_intel_cpu (struct __processor_model
> *cpu_model,
> >>    case 0x9a:
> >>      /* Alder Lake.  */
> >>    case 0xb7:
> >>+    case 0xba:
> >>    case 0xbf:
> >>      /* Raptor Lake.  */
> >>    case 0xaa:
  

Patch

diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h
index ae48bc17771..dd7f0f6abfd 100644
--- a/gcc/common/config/i386/cpuinfo.h
+++ b/gcc/common/config/i386/cpuinfo.h
@@ -537,6 +537,7 @@  get_intel_cpu (struct __processor_model *cpu_model,
     case 0x9a:
       /* Alder Lake.  */
     case 0xb7:
+    case 0xba:
     case 0xbf:
       /* Raptor Lake.  */
     case 0xaa: