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
riscv32: add arch headers
[musl.git]
/
arch
/
mipsn32
/
pthread_arch.h
blob
c45347ab92f6b85825e644201982bc4de42b5e5f
1
static
inline
uintptr_t
__get_tp
()
2
{
3
#if __mips_isa_rev < 2
4
register
uintptr_t
tp
__asm__
(
"$3"
);
5
__asm__
(
".word 0x7c03e83b"
:
"=r"
(
tp
) );
6
#else
7
uintptr_t
tp
;
8
__asm__
(
"rdhwr %0, $29"
:
"=r"
(
tp
) );
9
#endif
10
return
tp
;
11
}
12
13
#define TLS_ABOVE_TP
14
#define GAP_ABOVE_TP 0
15
16
#define TP_OFFSET 0x7000
17
#define DTP_OFFSET 0x8000
18
19
#define MC_PC pc