[libc-commits] [PATCH] D143261: [libc][AArch64] Fix fullbuild when using G++/GCC
David Spickett via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Feb 6 03:10:35 PST 2023
DavidSpickett marked an inline comment as done.
DavidSpickett added a comment.
> Checking a clang build, it is there so maybe I am wrong but I will do some more investigation.
I looked into what this compiles down to and it turns out that with frame pointers on AArch64, there's always going to be a `mov x29, sp` somewhere before calling start_thread. Whether we add one or not. clang could remove the `__arm_wsr64` call in some circumstances but in this one it does not. Even if it did remove it here, there would be another mov to achieve the same thing.
https://godbolt.org/z/6vK8GEvfj
1 extra instruction is not an issue, it documents what we're doing nicely and puts the mov nearer to the start_thread call for anyone (like me) who went looking for it.
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