repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
deduplicate __pthread_self thread pointer adjustment out of each arch
[musl.git]
/
arch
/
or1k
/
pthread_arch.h
blob
f75ea7e4e534e2726670de8a2b4e9842534cf0e9
1
static
inline
uintptr_t
__get_tp
()
2
{
3
#ifdef __clang__
4
uintptr_t
tp
;
5
__asm__
(
"l.ori %0, r10, 0"
:
"=r"
(
tp
) );
6
#else
7
register
uintptr_t
tp
__asm__
(
"r10"
);
8
__asm__
(
""
:
"=r"
(
tp
) );
9
#endif
10
return
tp
;
11
}
12
13
#define TLS_ABOVE_TP
14
#define GAP_ABOVE_TP 0
15
16
#define MC_PC regs.pc