2014-06-20 15:49:56 +00:00
|
|
|
diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S
|
|
|
|
index ded5471..7d28496 100644
|
|
|
|
--- a/sysdeps/aarch64/dl-tlsdesc.S
|
|
|
|
+++ b/sysdeps/aarch64/dl-tlsdesc.S
|
|
|
|
@@ -140,7 +140,7 @@ _dl_tlsdesc_undefweak:
|
|
|
|
cfi_startproc
|
|
|
|
.align 2
|
|
|
|
_dl_tlsdesc_dynamic:
|
|
|
|
-# define NSAVEXREGPAIRS 2
|
|
|
|
+# define NSAVEXREGPAIRS 3
|
|
|
|
stp x29, x30, [sp,#-(32+16*NSAVEXREGPAIRS)]!
|
|
|
|
cfi_adjust_cfa_offset (32+16*NSAVEXREGPAIRS)
|
|
|
|
mov x29, sp
|
|
|
|
@@ -151,6 +151,10 @@ _dl_tlsdesc_dynamic:
|
|
|
|
stp x1, x2, [sp, #32+16*0]
|
|
|
|
stp x3, x4, [sp, #32+16*1]
|
|
|
|
|
|
|
|
+ /* Work around GCC rescheduling compares across tlsdesc calls. */
|
|
|
|
+ mrs x30, nzcv
|
|
|
|
+ stp xzr, x30, [sp, #32+16*2]
|
|
|
|
+
|
|
|
|
mrs x4, tpidr_el0
|
2015-07-28 05:08:07 +00:00
|
|
|
/* The ldar here happens after the load from [x0] at the call site
|
|
|
|
(that is generated by the compiler as part of the TLS access ABI),
|
2014-06-20 15:49:56 +00:00
|
|
|
@@ -169,6 +173,8 @@ _dl_tlsdesc_dynamic:
|
|
|
|
1:
|
|
|
|
ldp x1, x2, [sp, #32+16*0]
|
|
|
|
ldp x3, x4, [sp, #32+16*1]
|
|
|
|
+ ldp xzr, x30, [sp, #32+16*2]
|
|
|
|
+ msr nzcv, x30
|
|
|
|
|
|
|
|
ldp x29, x30, [sp], #(32+16*NSAVEXREGPAIRS)
|
2015-07-28 05:08:07 +00:00
|
|
|
cfi_adjust_cfa_offset (-32-16*NSAVEXREGPAIRS)
|