This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Builtin: stack pointer
- From: Andreas Schwab <schwab at suse dot de>
- To: Renato Golin <renato dot golin at linaro dot org>
- Cc: gcc <gcc at gcc dot gnu dot org>, "Compiling the Linux Kernel with Clang\/LLVM" <llvmlinux at lists dot linuxfoundation dot org>
- Date: Thu, 27 Mar 2014 11:12:05 +0100
- Subject: Re: Builtin: stack pointer
- Authentication-results: sourceware.org; auth=none
- References: <CAMSE1kc3FJOq+mh=AD-FQhrGW+aVpVkWFdhfHCM+c=ZgN6Kpug at mail dot gmail dot com>
Renato Golin <renato.golin@linaro.org> writes:
> Basically, introducing the builtin: __builtin_stack_pointer() which
> will return the stack pointer register's value. There's no guarantee
> that the register will contain the information you want (for example,
> if the surrounding code uses it) and is only meant to replace the
> construct above.
Can't you use __builtin_frame_address (0) instead?
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."