From 4c0088718ebca4166f87606d5fd811a4190750e6 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 25 Jan 2022 00:01:06 +0100 Subject: [PATCH] arch/Config.in.x86: add skylake CPU variants Both skylake and skylake-avx512 were added in gcc 6.x. According to https://en.wikipedia.org/wiki/Skylake_(microarchitecture) the early Skylake processors indeed did not have AVX512 support, while the later ones did, hence the separate gcc options. Due to this being the first CPU we support with AVX512, this commit adds BR2_X86_CPU_HAS_AVX512. Signed-off-by: Thomas Petazzoni Signed-off-by: Yann E. MORIN --- arch/Config.in.x86 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/Config.in.x86 b/arch/Config.in.x86 index d5d84715b8..6b18580ae4 100644 --- a/arch/Config.in.x86 +++ b/arch/Config.in.x86 @@ -19,6 +19,8 @@ config BR2_X86_CPU_HAS_AVX bool config BR2_X86_CPU_HAS_AVX2 bool +config BR2_X86_CPU_HAS_AVX512 + bool choice prompt "Target Architecture Variant" @@ -259,6 +261,18 @@ config BR2_x86_broadwell select BR2_X86_CPU_HAS_AVX select BR2_X86_CPU_HAS_AVX2 select BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9 +config BR2_x86_skylake + bool "skylake" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 + select BR2_X86_CPU_HAS_AVX + select BR2_X86_CPU_HAS_AVX2 + select BR2_ARCH_NEEDS_GCC_AT_LEAST_6 config BR2_x86_atom bool "atom" select BR2_X86_CPU_HAS_MMX @@ -287,6 +301,19 @@ config BR2_x86_silvermont select BR2_X86_CPU_HAS_SSE4 select BR2_X86_CPU_HAS_SSE42 select BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9 +config BR2_x86_skylake_avx512 + bool "skylake-avx512" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 + select BR2_X86_CPU_HAS_AVX + select BR2_X86_CPU_HAS_AVX2 + select BR2_X86_CPU_HAS_AVX512 + select BR2_ARCH_NEEDS_GCC_AT_LEAST_6 config BR2_x86_k6 bool "k6" depends on !BR2_x86_64 @@ -414,10 +441,12 @@ config BR2_GCC_TARGET_ARCH default "core-avx2" if BR2_x86_core_avx2 default "haswell" if BR2_x86_haswell default "broadwell" if BR2_x86_broadwell + default "skylake" if BR2_x86_skylake default "atom" if BR2_x86_atom default "bonnel" if BR2_x86_bonnel default "westmere" if BR2_x86_westmere default "silvermont" if BR2_x86_silvermont + default "skylake-avx512" if BR2_x86_skylake_avx512 default "k8" if BR2_x86_opteron default "k8-sse3" if BR2_x86_opteron_sse3 default "barcelona" if BR2_x86_barcelona