mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
Fix native arch builds on loongarch64
Adds support for LSX and LASX closes https://github.com/official-stockfish/Stockfish/pull/5600 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
60351b9df9
commit
93869d5d0a
@@ -26,6 +26,17 @@ check_znver_1_2() {
|
||||
[ "$vendor_id" = "AuthenticAMD" ] && [ "$cpu_family" = "23" ] && znver_1_2=true
|
||||
}
|
||||
|
||||
# Set the file CPU loongarch64 architecture
|
||||
set_arch_loongarch64() {
|
||||
if check_flags 'lasx'; then
|
||||
true_arch='loongarch64-lasx'
|
||||
elif check_flags 'lsx'; then
|
||||
true_arch='lonngarch64-lsx'
|
||||
else
|
||||
true_arch='loongarch64'
|
||||
fi
|
||||
}
|
||||
|
||||
# Set the file CPU x86_64 architecture
|
||||
set_arch_x86_64() {
|
||||
if check_flags 'avx512vnni' 'avx512dq' 'avx512f' 'avx512bw' 'avx512vl'; then
|
||||
@@ -90,6 +101,10 @@ case $uname_s in
|
||||
true_arch="$true_arch-neon"
|
||||
fi
|
||||
;;
|
||||
'loongarch64'*)
|
||||
file_os='linux'
|
||||
set_arch_loongarch64
|
||||
;;
|
||||
*) # Unsupported machine type, exit with error
|
||||
printf 'Unsupported machine type: %s\n' "$uname_m"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user