Skip to content

Commit 86ad99f

Browse files
Fix access to tp register for LLVM in syscalls.c (#2791)
The old syntax for accessing the tp register was not recognised by LLVM. --------- Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
1 parent 0631cfb commit 86ad99f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.gitlab-ci/scripts/report_benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"dhrystone_single": 22407,
2424
"coremark_dual": 981777,
2525
"coremark_single": 1294524,
26-
"dhrystone_cv32a65x": 30056,
27-
"dhrystone_cv32a60x": 37474,
26+
"dhrystone_cv32a65x": 28825,
27+
"dhrystone_cv32a60x": 36631,
2828
}
2929

3030
for arg in sys.argv[1:]:

verif/tests/custom/common/syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
extern volatile uint64_t tohost;
1616
extern volatile uint64_t fromhost;
1717

18+
register void *thread_pointer asm("tp");
19+
1820
// tohost is 64 bits wide, irrespective of XLEN. The structure expected in Spike is:
1921
// - tohost[63:56] == device (syscall: 0)
2022
// - tohost[55:48] == command (syscall: 0)
@@ -134,7 +136,6 @@ int __attribute__((weak)) main(int argc, char** argv)
134136

135137
static void init_tls()
136138
{
137-
register void* thread_pointer asm("tp");
138139
extern char _tdata_begin, _tdata_end, _tbss_end;
139140
size_t tdata_size = &_tdata_end - &_tdata_begin;
140141
memcpy(thread_pointer, &_tdata_begin, tdata_size);

0 commit comments

Comments
 (0)