tlsdesc.s 441 字节
Newer Older
R
Rich Felker 已提交
1 2 3 4 5 6 7
.text
.global __tlsdesc_static
.type __tlsdesc_static,@function
__tlsdesc_static:
	mov 4(%eax),%eax
	ret

8 9
.hidden __tls_get_new

R
Rich Felker 已提交
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
.global __tlsdesc_dynamic
.type __tlsdesc_dynamic,@function
__tlsdesc_dynamic:
	mov 4(%eax),%eax
	push %edx
	mov %gs:4,%edx
	push %ecx
	mov (%eax),%ecx
	cmp %ecx,(%edx)
	jc 1f
	mov 4(%eax),%eax
	add (%edx,%ecx,4),%eax
2:	pop %ecx
	sub %gs:0,%eax
	pop %edx
	ret
1:	push %eax
27
	call __tls_get_new
R
Rich Felker 已提交
28 29
	pop %ecx
	jmp 2b