Skip to content

Commit

Permalink
core-target-clones: add Arrowlake and Pantherlake CPU support
Browse files Browse the repository at this point in the history
Newer compilers support these attributes, so change for them and use
them where appropriate.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
  • Loading branch information
ColinIanKing committed Feb 29, 2024
1 parent 409201d commit 6777bc1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile.config
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,7 @@ cpufeatures: \
TARGET_CLONES_SSE4_1 TARGET_CLONES_SSE4_2 TARGET_CLONES_SKYLAKE_AVX512 \
TARGET_CLONES_COOPERLAKE TARGET_CLONES_TIGERLAKE TARGET_CLONES_SAPPHIRERAPIDS \
TARGET_CLONES_ALDERLAKE TARGET_CLONES_ROCKETLAKE TARGET_CLONES_GRANITERAPIDS \
TARGET_CLONES_ARROWLAKE TARGET_CLONES_PANTHERLAKE \
TARGET_CLONES_POWER9 VLA_ARG VECMATH

ALIGNED_64:
Expand Down Expand Up @@ -1357,6 +1358,12 @@ TARGET_CLONES_ROCKETLAKE:
TARGET_CLONES_GRANITERAPIDS:
$(call check,test-target-clones,HAVE_TARGET_CLONES_GRANITERAPIDS,target_clones arch=graniterapids attribute (x86),,,'"default$(comma)arch=graniterapids"')

TARGET_CLONES_ARROWLAKE:
$(call check,test-target-clones,HAVE_TARGET_CLONES_ARROWLAKE,target_clones arch=arrowlake attribute (x86),,,'"default$(comma)arch=arrowlake"')

TARGET_CLONES_PANTHERLAKE:
$(call check,test-target-clones,HAVE_TARGET_CLONES_PANTHERLAKE,target_clones arch=pantherlake attribute (x86),,,'"default$(comma)arch=pantherlake"')

TARGET_CLONES_POWER9:
$(call check,test-target-clones,HAVE_TARGET_CLONES_POWER9,target_clones cpu=power attribute (power9),,,'"default$(comma)cpu=power9"')

Expand Down
17 changes: 17 additions & 0 deletions core-target-clones.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@
#define TARGET_CLONE_GRANITERAPIDS
#endif

#if defined(HAVE_TARGET_CLONES_PANTHERLAKE) && \
defined(HAVE_COMPILER_GCC_OR_MUSL)
#define TARGET_CLONE_PANTHERLAKE "arch=pantherlake",
#define TARGET_CLONE_USE
#else
#define TARGET_CLONE_PANTHERLAKE
#endif

#if defined(HAVE_TARGET_CLONES_ARROWLAKE) && \
defined(HAVE_COMPILER_GCC_OR_MUSL)
#define TARGET_CLONE_ARROWLAKE "arch=arrowlake",
#define TARGET_CLONE_USE
#else
#define TARGET_CLONE_ARROWLAKE
#endif

#define TARGET_CLONES_ALL \
TARGET_CLONE_AVX \
Expand All @@ -163,6 +178,8 @@
TARGET_CLONE_ALDERLAKE \
TARGET_CLONE_ROCKETLAKE \
TARGET_CLONE_GRANITERAPIDS \
TARGET_CLONE_ARROWLAKE \
TARGET_CLONE_PANTHERLAKE \
"default"

#if defined(TARGET_CLONE_USE)
Expand Down

0 comments on commit 6777bc1

Please sign in to comment.