From: Andrew Waterman Date: Fri, 7 Nov 2014 01:30:28 +0000 (-0800) Subject: Fix TLS in benchmarks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dcf8a205dce59d9249bfd67c7f6145621a188c12;p=riscv-tests.git Fix TLS in benchmarks Linker relaxations were screwing up loading the thread pointer. --- 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