diff options
Diffstat (limited to 'ld/testsuite/ld-csky/tls-ld-v1.s')
-rw-r--r-- | ld/testsuite/ld-csky/tls-ld-v1.s | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ld/testsuite/ld-csky/tls-ld-v1.s b/ld/testsuite/ld-csky/tls-ld-v1.s new file mode 100644 index 0000000..e0a8e76 --- /dev/null +++ b/ld/testsuite/ld-csky/tls-ld-v1.s @@ -0,0 +1,34 @@ + .global __tls_get_addr + .text + .align 2 + .global foo + .type foo, @function +foo: + subi sp, sp, 8 + st.w gb, (sp) + st.w r15, (sp, 4) + bsr .L2 +.L2: + lrw gb, .L2@GOTPC + addu gb, gb, r15 + lrw r7, __tls_get_addr@PLT + addu r7, r7, gb + ld.w r7, (r7) + bsr .LTLS0 +.LTLS0: + lrw r2, var@TLSLDM32 + addu r2, r15 + jsr r7 + lrw r7, var@TLSLDO32 + addu r2, r2, r7 + ld.w r15, (sp, 4) + ld.w gb, (sp) + addi sp, sp, 8 + jmp r15 + .size foo, .-foo + .section .tbss,"awT",@nobits + .align 2 + .type var, @object + .size var, 4 +var: + .fill 4, 1 |