diff options
author | Richard Henderson <rth@redhat.com> | 2003-01-22 00:41:59 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2003-01-22 00:41:59 +0000 |
commit | 8b0c8155b226b3baa54c9d27ae02e6687e131a43 (patch) | |
tree | d31ebdd9356a45b24b4a1ccc6c5af93baa695570 /ld/testsuite/ld-alpha/tlspic1.s | |
parent | 811daac4022c49191e0988db4a5401f54beb3a00 (diff) | |
download | gdb-8b0c8155b226b3baa54c9d27ae02e6687e131a43.zip gdb-8b0c8155b226b3baa54c9d27ae02e6687e131a43.tar.gz gdb-8b0c8155b226b3baa54c9d27ae02e6687e131a43.tar.bz2 |
New TLS tests for Alpha.
Diffstat (limited to 'ld/testsuite/ld-alpha/tlspic1.s')
-rw-r--r-- | ld/testsuite/ld-alpha/tlspic1.s | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/ld/testsuite/ld-alpha/tlspic1.s b/ld/testsuite/ld-alpha/tlspic1.s new file mode 100644 index 0000000..822f36d --- /dev/null +++ b/ld/testsuite/ld-alpha/tlspic1.s @@ -0,0 +1,87 @@ + .section ".tdata", "awT", @progbits + .globl sg1, sg2, sg3, sg4, sg5, sg6, sg7, sg8 + .globl sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8 + .hidden sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8 +sg1: .long 17 +sg2: .long 18 +sg3: .long 19 +sg4: .long 20 +sg5: .long 21 +sg6: .long 22 +sg7: .long 23 +sg8: .long 24 +sl1: .long 65 +sl2: .long 66 +sl3: .long 67 +sl4: .long 68 +sl5: .long 69 +sl6: .long 70 +sl7: .long 71 +sl8: .long 72 +sh1: .long 257 +sh2: .long 258 +sh3: .long 259 +sh4: .long 260 +sh5: .long 261 +sh6: .long 262 +sh7: .long 263 +sh8: .long 264 + .text + .globl fn1 + .ent fn1 +fn1: + .frame $sp, 16, $26, 0 + ldgp $gp, 0($27) + subq $sp, 16, $sp + stq $26, 0($sp) + stq $9, 8($sp) + .prologue 1 + + rduniq + mov $0, $9 + + /* GD */ + lda $16, sg1($gp) !tlsgd!1 + ldq $27, __tls_get_addr($gp) !literal!1 + jsr $26, ($27), __tls_get_addr !lituse_tlsgd!1 + ldgp $gp, 0($26) + + /* GD against hidden symbol */ + lda $16, sh2($gp) !tlsgd!2 + ldq $27, __tls_get_addr($gp) !literal!2 + jsr $26, ($27), __tls_get_addr !lituse_tlsgd!2 + ldgp $gp, 0($26) + + /* LD */ + lda $16, sl1($gp) !tlsldm!3 + ldq $27, __tls_get_addr($gp) !literal!3 + jsr $26, ($27), __tls_get_addr !lituse_tlsldm!3 + ldgp $gp, 0($26) + lda $1, sl1+1($0) !dtprel + + /* LD with 4 variables */ + lda $16, sh1($gp) !tlsldm!4 + ldq $27, __tls_get_addr($gp) !literal!4 + jsr $26, ($27), __tls_get_addr !lituse_tlsldm!4 + ldgp $gp, 0($26) + lda $1, sh1($0) !dtprel + lda $1, sH1+2($0) !dtprel + ldah $1, sh5+3($0) !dtprelhi + lda $1, sh5+3($1) !dtprello + ldq $1, sH5+1($gp) !gotdtprel + addq $1, $0, $1 + + /* IE against global */ + ldq $1, sg2($gp) !gottprel + addq $1, $9, $1 + + /* IE against local and hidden */ + ldq $1, sl2($gp) !gottprel + ldq $2, sh2($gp) !gottprel + addq $1, $9, $1 + addq $2, $9, $2 + + ldq $26, 0($sp) + addq $sp, 16, $sp + ret + .end fn1 |