[PATCH] Implement __builtin_stack_pointer

Renato Golin renato.golin at linaro.org
Wed Mar 26 04:21:02 PDT 2014

Comment at: docs/LangRef.rst:6802-6803
@@ +6801,4 @@
+The '``llvm.stackpointer``' intrinsic returns the current value of the
+stack pointer register.
Tim Northover wrote:
> Isn't that a bit strong? I think things like VLAs can cause sp to change in the middle of a function and I dread to think what it'll return in those cases.
That's a good point. Also, if the target has no reserved stack-pointer, LLVM will bail on "unimplemented", which would be good to have it documented.


More information about the llvm-commits mailing list