[libc-commits] [PATCH] D121091: [libc] Align the stack pointer in the start function.
Jeff Bailey via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Mar 7 07:42:23 PST 2022
jeffbailey added a comment.
Nice find - A couple comments within.
================
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");
----------------
Would __attribute__((aligned)) not work here? If not, it would be nice to say why
================
Comment at: libc/test/loader/linux/CMakeLists.txt:60
+if(NOT (${LIBC_TARGET_ARCHITECTURE} STREQUAL "x86_64"))
+ return()
----------------
It might be nice to have this be a constexpr of tls_enabled or similar for arch bringup.
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