From e8a11169a1d70bd48255a821590b09d629ff16cf Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 10 Apr 2022 00:53:31 +0300 Subject: [PATCH] Added Rocket Lake, Alder Lake, Sapphire Rapids and Zen 3 instruction sets. (#147) --- src/tools/builtin.py | 4 ++-- src/tools/features/instruction-set-feature.jam | 5 +++-- src/tools/gcc.jam | 4 ++++ src/tools/gcc.py | 4 ++++ src/tools/intel-darwin.jam | 5 +++-- src/tools/intel-vxworks.jam | 4 ++-- src/tools/msvc.jam | 5 +++-- src/tools/msvc.py | 4 ++-- 8 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/tools/builtin.py b/src/tools/builtin.py index 493354bfb..283423c43 100644 --- a/src/tools/builtin.py +++ b/src/tools/builtin.py @@ -288,11 +288,11 @@ def register_globals (): 'pentium3m', 'pentium-m', 'pentium4', 'pentium4m', 'prescott', 'nocona', 'core2', 'corei7', 'corei7-avx', 'core-avx-i', 'conroe', 'conroe-xe', 'conroe-l', 'allendale', 'merom', 'merom-xe', 'kentsfield', 'kentsfield-xe', 'penryn', 'wolfdale', 'yorksfield', 'nehalem', 'sandy-bridge', 'ivy-bridge', 'haswell', 'broadwell', 'skylake', 'skylake-avx512', 'cannonlake', - 'icelake-client', 'icelake-server', 'cascadelake', 'cooperlake', 'tigerlake', + 'icelake-client', 'icelake-server', 'cascadelake', 'cooperlake', 'tigerlake', 'rocketlake', 'alderlake', 'sapphirerapids', 'atom', 'k6', 'k6-2', 'k6-3', 'athlon', 'athlon-tbird', 'athlon-4', 'athlon-xp', 'athlon-mp', 'k8', 'opteron', 'athlon64', 'athlon-fx', 'k8-sse3', 'opteron-sse3', 'athlon64-sse3', 'amdfam10', 'barcelona', 'bdver1', 'bdver2', 'bdver3', 'btver1', - 'btver2', 'znver1', 'znver2', + 'btver2', 'znver1', 'znver2', 'znver3', 'winchip-c6', 'winchip2', 'c3', 'c3-2', 'c7', diff --git a/src/tools/features/instruction-set-feature.jam b/src/tools/features/instruction-set-feature.jam index 003c674f4..ad3aadb83 100644 --- a/src/tools/features/instruction-set-feature.jam +++ b/src/tools/features/instruction-set-feature.jam @@ -27,11 +27,12 @@ feature.feature instruction-set pentium3m pentium-m pentium4 pentium4m prescott nocona core2 corei7 corei7-avx core-avx-i conroe conroe-xe conroe-l allendale merom merom-xe kentsfield kentsfield-xe penryn wolfdale yorksfield nehalem sandy-bridge ivy-bridge haswell broadwell skylake skylake-avx512 cannonlake - icelake-client icelake-server cascadelake cooperlake tigerlake + icelake-client icelake-server cascadelake cooperlake tigerlake rocketlake alderlake + sapphirerapids atom k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3 athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 btver1 - btver2 znver1 znver2 + btver2 znver1 znver2 znver3 winchip-c6 winchip2 c3 c3-2 c7 diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index 47a113223..3991a9158 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -1173,6 +1173,9 @@ cpu-flags gcc OPTIONS : x86 : icelake-server : -march=icelake-server ; cpu-flags gcc OPTIONS : x86 : cascadelake : -march=skylake-avx512 -mavx512vnni ; cpu-flags gcc OPTIONS : x86 : cooperlake : -march=cooperlake ; cpu-flags gcc OPTIONS : x86 : tigerlake : -march=tigerlake ; +cpu-flags gcc OPTIONS : x86 : rocketlake : -march=rocketlake ; +cpu-flags gcc OPTIONS : x86 : alderlake : -march=alderlake ; +cpu-flags gcc OPTIONS : x86 : sapphirerapids : -march=sapphirerapids ; cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ; cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ; cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ; @@ -1199,6 +1202,7 @@ cpu-flags gcc OPTIONS : x86 : btver1 : -march=btver1 ; cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ; cpu-flags gcc OPTIONS : x86 : znver1 : -march=znver1 ; cpu-flags gcc OPTIONS : x86 : znver2 : -march=znver2 ; +cpu-flags gcc OPTIONS : x86 : znver3 : -march=znver3 ; cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ; cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ; cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ; diff --git a/src/tools/gcc.py b/src/tools/gcc.py index 020efb6f5..737d97938 100644 --- a/src/tools/gcc.py +++ b/src/tools/gcc.py @@ -780,6 +780,9 @@ cpu_flags('gcc', 'OPTIONS', 'x86', 'icelake-server', ['-march=icelake-server']) cpu_flags('gcc', 'OPTIONS', 'x86', 'cascadelake', ['-march=skylake-avx512', '-mavx512vnni']) cpu_flags('gcc', 'OPTIONS', 'x86', 'cooperlake', ['-march=cooperlake']) cpu_flags('gcc', 'OPTIONS', 'x86', 'tigerlake', ['-march=tigerlake']) +cpu_flags('gcc', 'OPTIONS', 'x86', 'rocketlake', ['-march=rocketlake']) +cpu_flags('gcc', 'OPTIONS', 'x86', 'alderlake', ['-march=alderlake']) +cpu_flags('gcc', 'OPTIONS', 'x86', 'sapphirerapids', ['-march=sapphirerapids']) cpu_flags('gcc', 'OPTIONS', 'x86', 'k6', ['-march=k6']) cpu_flags('gcc', 'OPTIONS', 'x86', 'k6-2', ['-march=k6-2']) cpu_flags('gcc', 'OPTIONS', 'x86', 'k6-3', ['-march=k6-3']) @@ -805,6 +808,7 @@ cpu_flags('gcc', 'OPTIONS', 'x86', 'btver1', ['-march=btver1']) cpu_flags('gcc', 'OPTIONS', 'x86', 'btver2', ['-march=btver2']) cpu_flags('gcc', 'OPTIONS', 'x86', 'znver1', ['-march=znver1']) cpu_flags('gcc', 'OPTIONS', 'x86', 'znver2', ['-march=znver2']) +cpu_flags('gcc', 'OPTIONS', 'x86', 'znver3', ['-march=znver3']) cpu_flags('gcc', 'OPTIONS', 'x86', 'winchip-c6', ['-march=winchip-c6']) cpu_flags('gcc', 'OPTIONS', 'x86', 'winchip2', ['-march=winchip2']) cpu_flags('gcc', 'OPTIONS', 'x86', 'c3', ['-march=c3']) diff --git a/src/tools/intel-darwin.jam b/src/tools/intel-darwin.jam index 87474e8f4..63f2b5d0f 100644 --- a/src/tools/intel-darwin.jam +++ b/src/tools/intel-darwin.jam @@ -138,10 +138,11 @@ flags intel-darwin.compile OPTIONS space : -O1 ; # no specific spa merom-xe kentsfield kentsfield-xe penryn wolfdale yorksfield nehalem sandy-bridge ivy-bridge haswell broadwell skylake skylake-avx512 cannonlake icelake-client - icelake-server cascadelake cooperlake tigerlake ; + icelake-server cascadelake cooperlake tigerlake rocketlake + alderlake sapphirerapids ; .cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3 athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 - bdver4 btver1 btver2 znver1 znver2 ; + bdver4 btver1 btver2 znver1 znver2 znver3 ; .cpu-type-x86-64 = $(.cpu-type-em64t) $(.cpu-type-amd64) ; flags intel-darwin.compile OPTIONS $(.cpu-type-x86-64)/32 : -m32 ; # -mcmodel=small ; diff --git a/src/tools/intel-vxworks.jam b/src/tools/intel-vxworks.jam index de50613db..9ec050fc1 100644 --- a/src/tools/intel-vxworks.jam +++ b/src/tools/intel-vxworks.jam @@ -117,10 +117,10 @@ flags intel-vxworks.compile INCLUDES ; yorksfield nehalem sandy-bridge ivy-bridge haswell broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake cooperlake - tigerlake ; + tigerlake rocketlake alderlake sapphirerapids ; .cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3 athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 btver1 btver2 - znver1 znver2 ; + znver1 znver2 znver3 ; .cpu-type-x86-64 = $(.cpu-type-em64t) $(.cpu-type-amd64) ; #flags intel-vxworks.compile OPTIONS $(.cpu-type-x86-64)/32 : -m32 ; # -mcmodel=small ; diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index cf6cc7a95..be44f8aaf 100644 --- a/src/tools/msvc.jam +++ b/src/tools/msvc.jam @@ -2144,10 +2144,11 @@ for local arch in [ MATCH "^\\.cpus-on-(.*)" : [ VARNAMES $(__name__) ] ] merom-xe kentsfield kentsfield-xe penryn wolfdale yorksfield nehalem sandy-bridge ivy-bridge haswell broadwell skylake skylake-avx512 cannonlake icelake-client - icelake-server cascadelake cooperlake tigerlake ; + icelake-server cascadelake cooperlake tigerlake rocketlake + alderlake sapphirerapids ; .cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3 athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 - bdver4 btver1 btver2 znver1 znver2 ; + bdver4 btver1 btver2 znver1 znver2 znver3 ; .cpu-type-g7 = pentium4 pentium4m athlon athlon-tbird athlon-4 athlon-xp athlon-mp $(.cpu-type-em64t) $(.cpu-type-amd64) ; .cpu-type-itanium = itanium itanium1 merced ; diff --git a/src/tools/msvc.py b/src/tools/msvc.py index 7c1bdf0f1..396eed58e 100644 --- a/src/tools/msvc.py +++ b/src/tools/msvc.py @@ -1256,9 +1256,9 @@ __cpu_type_g6 = ['i686', 'pentiumpro', 'pentium2', 'pentium3', 'pentium3m' __cpu_type_em64t = ['prescott', 'nocona', 'core2', 'corei7', 'corei7-avx', 'core-avx-i', 'conroe', 'conroe-xe', 'conroe-l', 'allendale', 'merom', 'merom-xe', 'kentsfield', 'kentsfield-xe', 'penryn', 'wolfdale', 'yorksfield', 'nehalem', 'sandy-bridge', 'ivy-bridge', 'haswell', 'broadwell', 'skylake', 'skylake-avx512', 'cannonlake', - 'icelake-client', 'icelake-server', 'cascadelake', 'cooperlake', 'tigerlake' ] + 'icelake-client', 'icelake-server', 'cascadelake', 'cooperlake', 'tigerlake', 'rocketlake', 'alderlake', 'sapphirerapids' ] __cpu_type_amd64 = ['k8', 'opteron', 'athlon64', 'athlon-fx', 'k8-sse3', 'opteron-sse3', 'athlon64-sse3', 'amdfam10', 'barcelona', - 'bdver1', 'bdver2', 'bdver3', 'btver1', 'btver2', 'znver1', 'znver2' ] + 'bdver1', 'bdver2', 'bdver3', 'btver1', 'btver2', 'znver1', 'znver2', 'znver3' ] __cpu_type_g7 = ['pentium4', 'pentium4m', 'athlon', 'athlon-tbird', 'athlon-4', 'athlon-xp' 'athlon-mp'] + __cpu_type_em64t + __cpu_type_amd64 __cpu_type_itanium = ['itanium', 'itanium1', 'merced']