| 1 |
.text |
| 2 |
.global __tlsdesc_static |
| 3 |
.hidden __tlsdesc_static |
| 4 |
.type __tlsdesc_static,%function |
| 5 |
__tlsdesc_static: |
| 6 |
ld a0,8(a0) |
| 7 |
jr t0 |
| 8 |
|
| 9 |
.global __tlsdesc_dynamic |
| 10 |
.hidden __tlsdesc_dynamic |
| 11 |
.type __tlsdesc_dynamic,%function |
| 12 |
__tlsdesc_dynamic: |
| 13 |
add sp,sp,-16 |
| 14 |
sd t1,(sp) |
| 15 |
sd t2,8(sp) |
| 16 |
|
| 17 |
ld t2,-8(tp) # t2=dtv |
| 18 |
|
| 19 |
ld a0,8(a0) # a0=&{modidx,off} |
| 20 |
ld t1,8(a0) # t1=off |
| 21 |
ld a0,(a0) # a0=modidx |
| 22 |
sll a0,a0,3 # a0=8*modidx |
| 23 |
|
| 24 |
add a0,a0,t2 # a0=dtv+8*modidx |
| 25 |
ld a0,(a0) # a0=dtv[modidx] |
| 26 |
add a0,a0,t1 # a0=dtv[modidx]+off |
| 27 |
sub a0,a0,tp # a0=dtv[modidx]+off-tp |
| 28 |
|
| 29 |
ld t1,(sp) |
| 30 |
ld t2,8(sp) |
| 31 |
add sp,sp,16 |
| 32 |
jr t0 |