[libc-commits] [PATCH] D143261: [libc][AArch64] Fix fullbuild when using G++/GCC
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Feb 3 07:26:06 PST 2023
sivachandra added a comment.
In D143261#4102273 <https://reviews.llvm.org/D143261#4102273>, @DavidSpickett wrote:
> I'm assuming any non clang is a gcc, going by https://libc.llvm.org/compiler_support.html.
>
> If you know people are using non clang non gcc compilers I should refactor to check for gcc first, and otherwise do something else.
I think we can safely assume non-clang implies GCC until we find a user with non-gcc/non-clang compiler trying to build the libc.
================
Comment at: libc/src/__support/threads/linux/thread.cpp:221
+#else
+ asm volatile("mov x29, sp");
+#endif
----------------
DavidSpickett wrote:
> This I maybe don't need volatile and might need to describe the side effects? If you're ok with inline asm here in general, I'll check if I need those.
Yes, this is OK. I am not an inline assembly expert, but I suspect you do need `volatile` (because the instruction is not touching any variables in C++), and that you don't need to describe side effects as it is clear that `x29` is being updated. I will let you tell me what is the most appropriate thing to do here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143261/new/
https://reviews.llvm.org/D143261
More information about the libc-commits
mailing list