You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should works but it fails for GLIB 2.38 on AArch64.
Invalid or unknown abi 16 for function "_ZGVnN4v_cosf" (Function { name: "_ZGVnN4v_cosf", mangled_name: Some("_ZGVnN4v_cosf"), link_name: None, signature: TypeId(ItemId(2060)), kind: Function, linkage: External })
GLIBC 2.38 release note:
Vector math library libmvec support has been added to AArch64. It
requires GCC version >= 10.1.0. It can be disabled via
"--disable-mathvec", however that is not a supported configuration as
it changes the ABI. The symbol names follow the AArch64 vector ABI,
they are declared in math.h and have to be called manually at this point.
Full source code of bits/math-vector.h:
/* Platform-specific SIMD declarations of math functions. Copyright (C) 2023 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */#ifndef_MATH_H# error "Never include <bits/math-vector.h> directly;\
include <math.h> instead."
#endif/* Get default empty definitions for simd declarations. */#include<bits/libm-simd-decl-stubs.h>#if__GNUC_PREREQ(9, 0)
# define__ADVSIMD_VEC_MATH_SUPPORTEDtypedef__Float32x4_t__f32x4_t;
typedef__Float64x2_t__f64x2_t;
#elif__glibc_clang_prereq(8, 0)
# define__ADVSIMD_VEC_MATH_SUPPORTEDtypedef__attribute__ ((__neon_vector_type__ (4))) float__f32x4_t;
typedef__attribute__ ((__neon_vector_type__ (2))) double__f64x2_t;
#endif#if__GNUC_PREREQ(10, 0) ||__glibc_clang_prereq(11, 0)
# define__SVE_VEC_MATH_SUPPORTEDtypedef__SVFloat32_t__sv_f32_t;
typedef__SVFloat64_t__sv_f64_t;
typedef__SVBool_t__sv_bool_t;
#endif/* If vector types and vector PCS are unsupported in the working compiler, no choice but to omit vector math declarations. */#ifdef__ADVSIMD_VEC_MATH_SUPPORTED# define__vpcs __attribute__ ((__aarch64_vector_pcs__))
__vpcs__f32x4_t_ZGVnN4v_cosf (__f32x4_t);
__vpcs__f32x4_t_ZGVnN4v_expf (__f32x4_t);
__vpcs__f32x4_t_ZGVnN4v_logf (__f32x4_t);
__vpcs__f32x4_t_ZGVnN4v_sinf (__f32x4_t);
__vpcs__f64x2_t_ZGVnN2v_cos (__f64x2_t);
__vpcs__f64x2_t_ZGVnN2v_exp (__f64x2_t);
__vpcs__f64x2_t_ZGVnN2v_log (__f64x2_t);
__vpcs__f64x2_t_ZGVnN2v_sin (__f64x2_t);
# undef __ADVSIMD_VEC_MATH_SUPPORTED
#endif/* __ADVSIMD_VEC_MATH_SUPPORTED */#ifdef__SVE_VEC_MATH_SUPPORTED__sv_f32_t_ZGVsMxv_cosf (__sv_f32_t, __sv_bool_t);
__sv_f32_t_ZGVsMxv_expf (__sv_f32_t, __sv_bool_t);
__sv_f32_t_ZGVsMxv_logf (__sv_f32_t, __sv_bool_t);
__sv_f32_t_ZGVsMxv_sinf (__sv_f32_t, __sv_bool_t);
__sv_f64_t_ZGVsMxv_cos (__sv_f64_t, __sv_bool_t);
__sv_f64_t_ZGVsMxv_exp (__sv_f64_t, __sv_bool_t);
__sv_f64_t_ZGVsMxv_log (__sv_f64_t, __sv_bool_t);
__sv_f64_t_ZGVsMxv_sin (__sv_f64_t, __sv_bool_t);
# undef __SVE_VEC_MATH_SUPPORTED
#endif/* __SVE_VEC_MATH_SUPPORTED */
"ABI 16" is AArch64 vectorcall. Is it supported by Rust?
It should works but it fails for GLIB 2.38 on AArch64.
GLIBC 2.38 release note:
Full source code of
bits/math-vector.h
:"ABI 16" is AArch64 vectorcall. Is it supported by Rust?
Maybe we should find someway to undefine
__ADVSIMD_VEC_MATH_SUPPORTED
?Related downstream issue: pgcentralfoundation/pgrx#1429
The text was updated successfully, but these errors were encountered: