aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
Diffstat (limited to 'ports')
-rw-r--r--ports/ChangeLog.tile4
-rw-r--r--ports/sysdeps/tile/__tls_get_addr.S2
2 files changed, 6 insertions, 0 deletions
diff --git a/ports/ChangeLog.tile b/ports/ChangeLog.tile
index 0be6192..c3a027d 100644
--- a/ports/ChangeLog.tile
+++ b/ports/ChangeLog.tile
@@ -1,3 +1,7 @@
+2012-09-06 Chris Metcalf <cmetcalf@tilera.com>
+
+ * sysdeps/tile/__tls_get_addr.S: Fix TLS module initialization bug.
+
2012-08-27 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/tile/kernel-features.h
diff --git a/ports/sysdeps/tile/__tls_get_addr.S b/ports/sysdeps/tile/__tls_get_addr.S
index 74e4fa2..6de79ba 100644
--- a/ports/sysdeps/tile/__tls_get_addr.S
+++ b/ports/sysdeps/tile/__tls_get_addr.S
@@ -76,6 +76,8 @@ ENTRY (__tls_get_addr)
ADD_PTR r28, r28, r27 /* pointer into module array */
}
LD_PTR r26, r28 /* r26 = module TLS pointer */
+ CMPEQI r25, r26, -1 /* check r26 == TLS_DTV_UNALLOCATED */
+ BNEZ r25, .Lslowpath
{
ADD_PTR r0, r26, r29
jrp lr