[libc-commits] [libc] [libc][arm32] define argc type and stack alignment (PR #96367)
Simon Tatham via libc-commits
libc-commits at lists.llvm.org
Mon Jun 24 06:21:03 PDT 2024
================
@@ -36,12 +36,11 @@ struct TLSImage {
};
#if defined(LIBC_TARGET_ARCH_IS_X86_64) || \
- defined(LIBC_TARGET_ARCH_IS_AARCH64) || \
+ defined(LIBC_TARGET_ARCH_IS_ANY_ARM) || \
defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
// At the language level, argc is an int. But we use uint64_t as the x86_64
-// ABI specifies it as an 8 byte value. Likewise, in the ARM64 ABI, arguments
-// are usually passed in registers. x0 is a doubleword register, so this is
-// 64 bit for aarch64 as well.
+// ABI specifies it as an 8 byte value (Figure 3.9 Initial Process Stack in
----------------
statham-arm wrote:
This comment is confusing – it says "we use `uint64_t`", but a few lines later, the `typedef` actually refers to `uintptr_t`. And since you've just included AArch32 in this ifdef, they're not the same!
It's also confusing that in the new version of the comment you're citing _only_ the x86-64 ABI, even though the ifdef branch applies to multiple other architectures.
https://github.com/llvm/llvm-project/pull/96367
More information about the libc-commits
mailing list