about summary refs log tree commit diff
path: root/src/thread/i386/tls.s
blob: 6e01adf244a4c8da74decab12d8f433de9ebfbed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.text
.global ___tls_get_addr
.type ___tls_get_addr,@function
___tls_get_addr:
	mov %gs:4,%edx
	mov (%eax),%ecx
	cmp %ecx,(%edx)
	jc 1f
	mov 4(%eax),%eax
	add (%edx,%ecx,4),%eax
	ret
1:	push %eax
	call __tls_get_addr
	pop %edx
	ret