about summary refs log tree commit diff
path: root/sysdeps/loongarch/tlsdesc.sym
diff options
context:
space:
mode:
authormengqinggang <mengqinggang@loongson.cn>2024-07-05 10:40:33 +0800
committercaiyinyu <caiyinyu@loongson.cn>2024-08-09 09:06:17 +0800
commit5662433c38c1925bd937cd50232fe4251bc20d04 (patch)
tree9174165f8bc3fa9ebc36db7938cd433d7e214902 /sysdeps/loongarch/tlsdesc.sym
parentd5f1da2a8a889e4868615f9b155ca67f10d46b5b (diff)
downloadglibc-5662433c38c1925bd937cd50232fe4251bc20d04.tar.gz
glibc-5662433c38c1925bd937cd50232fe4251bc20d04.tar.xz
glibc-5662433c38c1925bd937cd50232fe4251bc20d04.zip
LoongArch: Add cfi instructions for _dl_tlsdesc_dynamic
In _dl_tlsdesc_dynamic, there are three 'addi.d sp, sp, -size'
instructions to allocate stack size for Float/LSX/LASX registers.
Every 'addi.d sp, sp, -size' needs a cfi_adjust_cfa_offset because
of sp is used to compute CFA. But only one 'addi.d sp, sp, -size'
will be run according to HWCAP value. And all cfi_adjust_cfa_offset
will be executed in stack unwinding, it result in incorrect CFA.

Change _dl_tlsdesc_dynamic to _dl_tlsdesc_dynamic,
_dl_tlsdesc_dynamic_lsx and _dl_tlsdesc_dynamic_lasx.
Conflicting cfi instructions can be distributed to the three functions.
And cfi instructions can correspond to stack down instructions.
Diffstat (limited to 'sysdeps/loongarch/tlsdesc.sym')
-rw-r--r--sysdeps/loongarch/tlsdesc.sym9
1 files changed, 0 insertions, 9 deletions
diff --git a/sysdeps/loongarch/tlsdesc.sym b/sysdeps/loongarch/tlsdesc.sym
index 213d0b3074..9f80fceca6 100644
--- a/sysdeps/loongarch/tlsdesc.sym
+++ b/sysdeps/loongarch/tlsdesc.sym
@@ -4,12 +4,6 @@
 #include <link.h>
 #include <dl-tlsdesc.h>
 
-#define SHARED 1
-
-#include <ldsodefs.h>
-
-#define GLRO_offsetof(name) offsetof (struct rtld_global_ro, _##name)
-
 --
 
 -- Abuse tls.h macros to derive offsets relative to the thread register.
@@ -23,6 +17,3 @@ DTV_COUNTER		offsetof(dtv_t, counter)
 TLS_DTV_UNALLOCATED	TLS_DTV_UNALLOCATED
 TLS_DTV_OFFSET		TLS_DTV_OFFSET
 SIZE_OF_TCB		sizeof(tcbhead_t)
-GLRO_DL_HWCAP_OFFSET    GLRO_offsetof (dl_hwcap)
-HWCAP_LOONGARCH_LSX	HWCAP_LOONGARCH_LSX
-HWCAP_LOONGARCH_LASX	HWCAP_LOONGARCH_LASX