[libc-commits] [PATCH] D121091: [libc] Align the stack pointer in the start function.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Mar 7 09:31:51 PST 2022
sivachandra added inline comments.
================
Comment at: libc/loader/linux/x86_64/start.cpp:96
+ // tread on argc, argv etc.
+ __asm__ __volatile__("andq $0xfffffffffffffff0, %%rsp\n\t" ::: "%rsp");
+ __asm__ __volatile__("andq $0xfffffffffffffff0, %%rbp\n\t" ::: "%rbp");
----------------
jeffbailey wrote:
> Would __attribute__((aligned)) not work here? If not, it would be nice to say why
Added comment now explaining why an attribute will not help.
================
Comment at: libc/test/loader/linux/CMakeLists.txt:60
+if(NOT (${LIBC_TARGET_ARCHITECTURE} STREQUAL "x86_64"))
+ return()
----------------
jeffbailey wrote:
> It might be nice to have this be a constexpr of tls_enabled or similar for arch bringup.
Can you explain how you envision this constexpr to be used? Is it CMake variable or a variable in the source code?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121091/new/
https://reviews.llvm.org/D121091
More information about the libc-commits
mailing list