[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 27 14:22:19 PDT 2025
================
@@ -4248,6 +4248,39 @@ assignment can happen automatically.
to a variable, have its address taken, or passed into or returned from a
function, because doing so violates bounds safety conventions.
+.. _builtin_stack_address-doc:
+
+``__builtin_stack_address``
+---------------------------
+
+``__builtin_stack_address`` returns the address that separates the current
+function's (i.e. the one calling the builtin) stack space and the region of the
+stack that may be modified by called functions. The semantics match those of GCC's builtin of the same name.
+
+**Note:** Support for this builtin is currently limited to the following architectures: x86_64, x86.
----------------
efriedma-quic wrote:
Also note here.
https://github.com/llvm/llvm-project/pull/148281
More information about the llvm-commits
mailing list