diff --git a/configure b/configure index 17ee7dbc3..ac11804ee 100755 --- a/configure +++ b/configure @@ -15733,10 +15733,10 @@ printf "%s\n" "#define PNG_RISCV_RVV_API_SUPPORTED /**/" >>confdefs.h printf "%s\n" "#define PNG_RISCV_RVV_OPT 2" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-riscv-rvv: please specify 'check' or 'api', if - you want the optimizations unconditionally pass e.g. '-march=rv64gv' + you want the optimizations unconditionally pass e.g. '-march=rv64gv1p0' to the compiler." >&5 printf "%s\n" "$as_me: WARNING: --enable-riscv-rvv: please specify 'check' or 'api', if - you want the optimizations unconditionally pass e.g. '-march=rv64gv' + you want the optimizations unconditionally pass e.g. '-march=rv64gv1p0' to the compiler." >&2;};; *) as_fn_error $? "--enable-riscv-rvv=${enable_riscv_rvv}: invalid value" "$LINENO" 5 @@ -15755,13 +15755,21 @@ then printf %s "checking whether to use RISC-V RVV intrinsics... " >&6; } save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -march=rv64gv" + CFLAGS="$CFLAGS -march=rv64gv1p0" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -int main(){ - return 0; +#include +#ifndef COMPAT_HWCAP_ISA_V /* added in linux-6.5 */ +#error "COMPAT_HWCAP_ISA_V is not available" +#endif +int main() { + const float src[] = { 0.0f, 0.0f, 0.0f, 0.0f }; + uint64_t ptr[2] = {0x0908060504020100, 0xFFFFFFFF0E0D0C0A}; + vuint8m1_t a = __riscv_vreinterpret_v_u64m1_u8m1(__riscv_vle64_v_u64m1(ptr, 2)); + vfloat32m1_t val = __riscv_vle32_v_f32m1((const float*)(src), 4); + return (int)__riscv_vfmv_f_s_f32m1_f32(val); } _ACEOF if ac_fn_c_try_compile "$LINENO"