__builtin_return_address from inline assembly on x86-64.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Guys,

This is a question regarding inline assembly on x86-64.
I wanted to do a __builtin_return_address(0) through inline assembly.
This inline assembly call will be in a macro, and can be called from
multiple functions.

Now i could have simply used the knowledge that the return address is
stored at the base of the stack by getting it through (%rsp).

But as i say this macro can be used in different context, and the
"rsp" pointer could have changed depending on the stack usage of the
calling function.

So please let me know if there its possible to do a
__builtin_return_address from assembly without making assumptions
regarding the "rsp".

Thanks,
Alok

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux