mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-01 01:31:26 +00:00
[libc] Fix set_thread_ptr call in rv32 start up code
This patch changes the instruction in set_thread_ptr from ld to mv, as rv32 doesn't have the ld instruction, and mv is supported by both rv32 and rv64. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D159110
This commit is contained in:
parent
36c9afc7a8
commit
b0272d8ec3
@ -80,7 +80,7 @@ void cleanup_tls(uintptr_t addr, uintptr_t size) {
|
||||
}
|
||||
|
||||
static void set_thread_ptr(uintptr_t val) {
|
||||
LIBC_INLINE_ASM("ld tp, %0\n\t" : : "m"(val));
|
||||
LIBC_INLINE_ASM("mv tp, %0\n\t" : : "r"(val));
|
||||
}
|
||||
|
||||
using InitCallback = void(int, char **, char **);
|
||||
|
Loading…
Reference in New Issue
Block a user