[libc-commits] [PATCH] D159110: [libc] Fix set_thread_ptr call in rv32 start up code

Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 30 07:31:20 PDT 2023


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb0272d8ec349: [libc] Fix set_thread_ptr call in rv32 start up code (authored by Mikhail R. Gadelha <mikhail at igalia.com>).

Changed prior to commit:
  https://reviews.llvm.org/D159110?vs=554514&id=554715#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159110/new/

https://reviews.llvm.org/D159110

Files:
  libc/startup/linux/riscv64/start.cpp


Index: libc/startup/linux/riscv64/start.cpp
===================================================================
--- libc/startup/linux/riscv64/start.cpp
+++ libc/startup/linux/riscv64/start.cpp
@@ -80,7 +80,7 @@
 }
 
 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 **);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159110.554715.patch
Type: text/x-patch
Size: 418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230830/5c8a8a61/attachment-0001.bin>


More information about the libc-commits mailing list