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:

Reply via email to