diff mbox

PATCH: Update host_detect_local_cpu for new Intel processors

Message ID 20150124025048.GA22664@gmail.com
State New
Headers show

Commit Message

H.J. Lu Jan. 24, 2015, 2:50 a.m. UTC
On Fri, Jan 23, 2015 at 06:37:01PM -0800, H.J. Lu wrote:
> The new Silvermont aswell and Broadwell model numbers are in
> 
> http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf
> 
> This patch updates host_detect_local_cpu to check new Silvermont, Haswell
> and Broadwell model numbers.  OK for trunk and 4.9 branch?
> 
> Thanks.
> 

There are more model numbers in CHAPTER 35 MODEL-SPECIFIC REGISTERS (MSRS):

http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf

OK for trunk and 4.9 branch?

Thanks.


H.J.
---
2015-01-23   H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/driver-i386.c (host_detect_local_cpu): Check new
	Silvermont, Haswell, Broadwell and Knights Landing model numbers.

Comments

Uros Bizjak Jan. 24, 2015, 10:13 a.m. UTC | #1
On Sat, Jan 24, 2015 at 3:50 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Jan 23, 2015 at 06:37:01PM -0800, H.J. Lu wrote:
>> The new Silvermont aswell and Broadwell model numbers are in
>>
>> http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf
>>
>> This patch updates host_detect_local_cpu to check new Silvermont, Haswell
>> and Broadwell model numbers.  OK for trunk and 4.9 branch?
>>
>> Thanks.
>>
>
> There are more model numbers in CHAPTER 35 MODEL-SPECIFIC REGISTERS (MSRS):
>
> http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf
>
> OK for trunk and 4.9 branch?
>
> Thanks.
>
>
> H.J.
> ---
> 2015-01-23   H.J. Lu  <hongjiu.lu@intel.com>
>
>         * config/i386/driver-i386.c (host_detect_local_cpu): Check new
>         Silvermont, Haswell, Broadwell and Knights Landing model numbers.

Please also update /libgcc/config/i386/cpuinfo.c and relevant testsuite files.

Uros.
Uros Bizjak Jan. 24, 2015, 10:16 a.m. UTC | #2
On Sat, Jan 24, 2015 at 11:13 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Sat, Jan 24, 2015 at 3:50 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Fri, Jan 23, 2015 at 06:37:01PM -0800, H.J. Lu wrote:
>>> The new Silvermont aswell and Broadwell model numbers are in
>>>
>>> http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf
>>>
>>> This patch updates host_detect_local_cpu to check new Silvermont, Haswell
>>> and Broadwell model numbers.  OK for trunk and 4.9 branch?
>>>
>>> Thanks.
>>>
>>
>> There are more model numbers in CHAPTER 35 MODEL-SPECIFIC REGISTERS (MSRS):
>>
>> http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf
>>
>> OK for trunk and 4.9 branch?
>>
>> Thanks.
>>
>>
>> H.J.
>> ---
>> 2015-01-23   H.J. Lu  <hongjiu.lu@intel.com>
>>
>>         * config/i386/driver-i386.c (host_detect_local_cpu): Check new
>>         Silvermont, Haswell, Broadwell and Knights Landing model numbers.
>
> Please also update /libgcc/config/i386/cpuinfo.c and relevant testsuite files.

Huh, complete AVX512 handling is missing in the above file. Adding Kirill to CC:

Uros.
H.J. Lu Jan. 24, 2015, 1:02 p.m. UTC | #3
On Sat, Jan 24, 2015 at 2:16 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Sat, Jan 24, 2015 at 11:13 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> On Sat, Jan 24, 2015 at 3:50 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Fri, Jan 23, 2015 at 06:37:01PM -0800, H.J. Lu wrote:
>>>> The new Silvermont aswell and Broadwell model numbers are in
>>>>
>>>> http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf
>>>>
>>>> This patch updates host_detect_local_cpu to check new Silvermont, Haswell
>>>> and Broadwell model numbers.  OK for trunk and 4.9 branch?
>>>>
>>>> Thanks.
>>>>
>>>
>>> There are more model numbers in CHAPTER 35 MODEL-SPECIFIC REGISTERS (MSRS):
>>>
>>> http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf
>>>
>>> OK for trunk and 4.9 branch?
>>>
>>> Thanks.
>>>
>>>
>>> H.J.
>>> ---
>>> 2015-01-23   H.J. Lu  <hongjiu.lu@intel.com>
>>>
>>>         * config/i386/driver-i386.c (host_detect_local_cpu): Check new
>>>         Silvermont, Haswell, Broadwell and Knights Landing model numbers.
>>
>> Please also update /libgcc/config/i386/cpuinfo.c and relevant testsuite files.
>
> Huh, complete AVX512 handling is missing in the above file. Adding Kirill to CC:
>
> Uros.

Yes, model 0x4d is Sky Lake.  Kirill, I don't think we want to tune it like KNL.
I think it is closer to Broadwell than KNL.  Before we have -mtune=skylake, we
should make -mtune=native as -mtune=broadwell on Sky Lake.
diff mbox

Patch

diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index c731c50..c69149d 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -703,7 +703,10 @@  const char *host_detect_local_cpu (int argc, const char **argv)
 	  cpu = "bonnell";
 	  break;
 	case 0x37:
+	case 0x4a:
 	case 0x4d:
+	case 0x5a:
+	case 0x5d:
 	  /* Silvermont.  */
 	  cpu = "silvermont";
 	  break;
@@ -738,11 +741,22 @@  const char *host_detect_local_cpu (int argc, const char **argv)
 	  cpu = "ivybridge";
 	  break;
 	case 0x3c:
+	case 0x3f:
 	case 0x45:
 	case 0x46:
 	  /* Haswell.  */
 	  cpu = "haswell";
 	  break;
+	case 0x3d:
+	case 0x4f:
+	case 0x56:
+	  /* Broadwell.  */
+	  cpu = "broadwell";
+	  break;
+	case 0x57:
+	  /* Knights Landing.  */
+	  cpu = "knl";
+	  break;
 	default:
 	  if (arch)
 	    {