Correctly identify Skylake CPUs on Darwin. (#13377)

* Correctly identify Skylake CPUs on Darwin.

* Add a test for haswell on Mojave.
This commit is contained in:
Chris Green 2019-10-24 12:44:58 -05:00 committed by Greg Becker
parent f65f2450df
commit 0913328812
4 changed files with 12 additions and 1 deletions

View File

@ -117,6 +117,10 @@ def sysctl(*args):
info['flags'] += ' sse4_2'
if 'avx1.0' in info['flags']:
info['flags'] += ' avx'
if 'clfsopt' in info['flags']:
info['flags'] += ' clflushopt'
if 'xsave' in info['flags']:
info['flags'] += ' xsavec xsaveopt'
return info

View File

@ -0,0 +1,5 @@
machdep.cpu.vendor: GenuineIntel
machdep.cpu.model: 70
machdep.cpu.brand_string: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C
machdep.cpu.leaf7_features: RDWRFSGS TSC_THREAD_OFFSET BMI1 AVX2 SMEP BMI2 ERMS INVPCID FPU_CSDS MDCLEAR IBRS STIBP L1DF SSBD

View File

@ -29,7 +29,8 @@
'linux-rhel6-piledriver',
'linux-centos7-power8le',
'darwin-mojave-ivybridge',
'darwin-mojave-broadwell',
'darwin-mojave-haswell',
'darwin-mojave-skylake',
'bgq-rhel6-power7'
])
def expected_target(request, monkeypatch):
@ -156,6 +157,7 @@ def test_architecture_family(target_name, expected_family):
('skylake', 'sse3'),
('power8', 'altivec'),
('broadwell', 'sse4.1'),
('skylake', 'clflushopt'),
('aarch64', 'neon')
])
def test_features_query(target_name, feature):