projects
/
riscv-tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7febd37
)
Fix TLS in benchmarks
author
Andrew Waterman
<waterman@cs.berkeley.edu>
Fri, 7 Nov 2014 01:30:28 +0000
(17:30 -0800)
committer
Andrew Waterman
<waterman@cs.berkeley.edu>
Fri, 7 Nov 2014 01:30:28 +0000
(17:30 -0800)
Linker relaxations were screwing up loading the thread pointer.
benchmarks/common/crt.S
patch
|
blob
|
history
diff --git
a/benchmarks/common/crt.S
b/benchmarks/common/crt.S
index e35608e0d56c50fa435e7b1ebf0c504985f7582e..24e35804867a16a75b7b106feac44e734e88e04a 100644
(file)
--- 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