Merge "riscv64 __get_tls()."
This commit is contained in:
commit
e0b9474854
1 changed files with 2 additions and 0 deletions
|
@ -34,6 +34,8 @@
|
|||
# define __get_tls() ({ void** __val; __asm__("mrc p15, 0, %0, c13, c0, 3" : "=r"(__val)); __val; })
|
||||
#elif defined(__i386__)
|
||||
# define __get_tls() ({ void** __val; __asm__("movl %%gs:0, %0" : "=r"(__val)); __val; })
|
||||
#elif defined(__riscv)
|
||||
# define __get_tls() ({ void** __val; __asm__("mv %0, tp" : "=r"(__val)); __val; })
|
||||
#elif defined(__x86_64__)
|
||||
# define __get_tls() ({ void** __val; __asm__("mov %%fs:0, %0" : "=r"(__val)); __val; })
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue