summaryrefslogtreecommitdiffhomepage
path: root/arch/nt64/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-09-16 23:01:35 -0400
committermidipix <writeonce@midipix.org>2016-09-16 23:01:35 -0400
commitb511dbe488cc7faffe6300812c10af7d7293d9a0 (patch)
tree1271d882ed07935fc5bd35993bd439ebefb54d1f /arch/nt64/src
parent13724e65ab6ca7132e138e4a8d39ec927efa0177 (diff)
downloadmmglue-b511dbe488cc7faffe6300812c10af7d7293d9a0.tar.bz2
mmglue-b511dbe488cc7faffe6300812c10af7d7293d9a0.tar.xz
__emutls_get_address(): unify cases, fix dsoidx-based pointer arithmetic.
Diffstat (limited to 'arch/nt64/src')
-rw-r--r--arch/nt64/src/crt_tls.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/nt64/src/crt_tls.c b/arch/nt64/src/crt_tls.c
index 15183d3..a3375d8 100644
--- a/arch/nt64/src/crt_tls.c
+++ b/arch/nt64/src/crt_tls.c
@@ -18,10 +18,6 @@ void * __emutls_get_address (struct __emutls_object * obj)
{
int dsoidx = obj->align & 0xFFFF0000;
struct __tlca * tlca = (struct __tlca *)__psx_tlca();
-
- if (dsoidx)
- return (*tlca->pthread_dtls)[dsoidx >> 16] + obj->offset;
- else
- return tlca->pthread_tls + obj->offset;
+ return tlca->pthread_dtls[dsoidx >> 16] + obj->offset;
}