From: Paul Floyd Date: Sun, 10 May 2026 13:10:58 +0000 (+0200) Subject: arm64: change configure dotprod test to a run test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd8a547aa8a4ee5ae0133b576c6146dbbba554f3;p=thirdparty%2Fvalgrind.git arm64: change configure dotprod test to a run test We were testing for dotprod with AC_COMPILE_IFELSE. That's wrong, it just checks that the compiler accepts -march=armv8.2-a+dotprod and that the assembler handles dotprod opcodes. Changed it to AC_RUN_IFELSE which additionally checks that the binary runs. Valgrind should be checking for this in VG_(machine_get_hwcaps), storing it in VexArchInfo and checking it in guest_arm64_toIR.c (it looks like we check it but don't store 'dp' in vai.hwcaps and in general VEX doesnt check whether it should try to decode these extensions). --- diff --git a/configure.ac b/configure.ac index 6a8d7272a..82d8240c1 100644 --- a/configure.ac +++ b/configure.ac @@ -4074,15 +4074,15 @@ CFLAGS="$save_CFLAGS" AM_CONDITIONAL(BUILD_ARMV82_TESTS, test x$ac_have_armv82_feature = xyes) -# Does the C compiler support the armv82-a+dotprod flag and assembler dotprod instructions +# Does the compiler and CPU support the armv82-a+dotprod flag and assembler dotprod instructions # Note, this doesn't generate a C-level symbol. It generates a # automake-level symbol (BUILD_ARMV82_DOTPROD_TESTS), used in test Makefile.am's -AC_MSG_CHECKING([if gcc supports the armv82-a+dotprod feature flag and assembler supports dotprod instructions]) +AC_MSG_CHECKING([if armv82-a+dotprod is supported for tests]) save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -march=armv8.2-a+dotprod -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ -int main() +CFLAGS="$CFLAGS -march=armv8.2-a+dotprod" +AC_RUN_IFELSE([AC_LANG_SOURCE([[ +int main(void) { __asm__ __volatile__("sdot v1.4s, v2.16b, v3.16b"); return 0;