aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-csky/tls-ie-v1.s
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-csky/tls-ie-v1.s')
-rw-r--r--ld/testsuite/ld-csky/tls-ie-v1.s29
1 files changed, 29 insertions, 0 deletions
diff --git a/ld/testsuite/ld-csky/tls-ie-v1.s b/ld/testsuite/ld-csky/tls-ie-v1.s
new file mode 100644
index 0000000..7c72362
--- /dev/null
+++ b/ld/testsuite/ld-csky/tls-ie-v1.s
@@ -0,0 +1,29 @@
+ .text
+ .section .tbss,"awT",@nobits
+ .align 2
+ .type var, @object
+ .size var, 4
+var:
+ .word 0
+
+ .text
+ .align 2
+ .global _start
+ .type _start, @function
+_start:
+ subi sp, sp, 8
+ st.w r15, (sp)
+ bsr .LTLS0
+.LTLS0:
+ lrw r7, var@GOTTPOFF
+ addu r7, r15
+ ld.w r7, (r7)
+ bsr __read_tp
+ addu r7, r7, r2
+ ld.w r2, (r7)
+ ld.w r15, (sp)
+ addi sp, sp, 8
+ jmp r15
+__read_tp:
+ movi r2, 0
+ jmp r15