diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2014-11-06 17:30:28 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2014-11-06 17:30:28 -0800 |
commit | dcf8a205dce59d9249bfd67c7f6145621a188c12 (patch) | |
tree | cb42491db0ef37ebac686df6c6a45b5531607bc9 /benchmarks | |
parent | 7febd37556e28c92610fea90ecb138efddc1fe97 (diff) | |
download | riscv-tests-dcf8a205dce59d9249bfd67c7f6145621a188c12.zip riscv-tests-dcf8a205dce59d9249bfd67c7f6145621a188c12.tar.gz riscv-tests-dcf8a205dce59d9249bfd67c7f6145621a188c12.tar.bz2 |
Fix TLS in benchmarks
Linker relaxations were screwing up loading the thread pointer.
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/common/crt.S | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/benchmarks/common/crt.S b/benchmarks/common/crt.S index e35608e..24e3580 100644 --- a/benchmarks/common/crt.S +++ b/benchmarks/common/crt.S @@ -114,8 +114,11 @@ _start: sll sp, sp, STKSHIFT add sp, sp, tp + # offset thread pointer by thread pointer bias lui t0, %tprel_hi(tls_start) + add t0, t0, tp, %tprel_add(tls_start) add t0, t0, %tprel_lo(tls_start) + sub t0, t0, tp sub tp, tp, t0 la t0, _init |