Browse Source

On ARM64, check for SVE support

tags/v0.3.22^2
Martin Kroeker GitHub 3 years ago
parent
commit
f07f4db1ce
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      c_check

+ 16
- 0
c_check View File

@@ -240,6 +240,21 @@ if [ "$architecture" = "riscv64" ]; then
rm -rf "$tmpd"
fi

no_sve=0
if [ "$architecture" = "arm64" ]; then
tmpd=`mktemp -d`
tmpf="$tmpd/a.c"
printf "#include <arm_sve.h>\n\n int main(void){}\n">> "$tmpf"
args=" -march=armv8-a+sve -c -o $tmpf.o $tmpf"
no_sve=0
{
$compiler_name $flags $args >/dev/null 2>&1
} || {
no_sve=1
}
rm -rf "$tmpd"
fi

c11_atomics=0
case "$data" in
*HAVE_C11*)
@@ -379,6 +394,7 @@ done
printf "HAVE_MSA=1\n"
printf "MSA_FLAGS=%s\n" "$msa_flags"
}
[ "$no_sve" -eq 1 ] && printf "NO_SVE=1\n"
[ "$no_rv64gv" -eq 1 ] && printf "NO_RV64GV=1\n"
[ "$no_avx512" -eq 1 ] && printf "NO_AVX512=1\n"
[ "$no_avx2" -eq 1 ] && printf "NO_AVX2=1\n"


Loading…
Cancel
Save