Merge "riscv64 __get_tls()." am: e0b9474854
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2243976 Change-Id: I8dd2c4e522060992fc0f48eac5ec3e6684c8b4fd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
1d50c44f7e
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; })
|
# define __get_tls() ({ void** __val; __asm__("mrc p15, 0, %0, c13, c0, 3" : "=r"(__val)); __val; })
|
||||||
#elif defined(__i386__)
|
#elif defined(__i386__)
|
||||||
# define __get_tls() ({ void** __val; __asm__("movl %%gs:0, %0" : "=r"(__val)); __val; })
|
# 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__)
|
#elif defined(__x86_64__)
|
||||||
# define __get_tls() ({ void** __val; __asm__("mov %%fs:0, %0" : "=r"(__val)); __val; })
|
# define __get_tls() ({ void** __val; __asm__("mov %%fs:0, %0" : "=r"(__val)); __val; })
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue