From 1dbf2bef7934cee9829d875f11968d6ff1fee77f Mon Sep 17 00:00:00 2001 From: mengqinggang Date: Wed, 8 May 2024 10:06:15 +0800 Subject: LoongArch: Add support for TLS Descriptors This is mostly based on AArch64 and RISC-V implementation. Add R_LARCH_TLS_DESC32 and R_LARCH_TLS_DESC64 relocations. For _dl_tlsdesc_dynamic function slow path, temporarily save and restore all vector registers. --- sysdeps/loongarch/configure.ac | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sysdeps/loongarch/configure.ac') diff --git a/sysdeps/loongarch/configure.ac b/sysdeps/loongarch/configure.ac index 28a8ae5486..24fee55dcc 100644 --- a/sysdeps/loongarch/configure.ac +++ b/sysdeps/loongarch/configure.ac @@ -65,3 +65,19 @@ rm -f conftest*]) if test $libc_cv_loongarch_vec_asm = no; then AC_MSG_ERROR([binutils version is too old, use 2.41 or newer version]) fi + +AC_CACHE_CHECK([for vector support in compiler], + libc_cv_loongarch_vec_com, [ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +void foo (void) +{ + asm volatile ("vldi $vr0, 1" ::: "$vr0"); + asm volatile ("xvldi $xr0, 1" ::: "$xr0"); +} +]])], + [libc_cv_loongarch_vec_com=yes], + [libc_cv_loongarch_vec_com=no])]) +if test "$libc_cv_loongarch_vec_com" = yes ; +then + AC_DEFINE(HAVE_LOONGARCH_VEC_COM) +fi -- cgit 1.4.1