Re: builtin_frame_address for stack pointer

2007-11-09 Thread Jim Wilson
skaller wrote: BTW: what happens on ia64 which has two? stacks? You have to search both stacks for GC roots. Only one stack is visible to normal user code, the regular program stack, and __builtin_frame_address(0) will point there. For the other stack, the backing store, you need some

Re: builtin_frame_address for stack pointer

2007-10-23 Thread skaller
On Mon, 2007-10-22 at 22:58 -0700, Andrew Pinski wrote: On 10/22/07, skaller [EMAIL PROTECTED] wrote: Unfortunately, this appears not to work if -fomit-frame-pointer is used on an x86. What version of GCC? Since this was fixed for 4.1.0, see

builtin_frame_address for stack pointer

2007-10-22 Thread skaller
hi, I have some code using __builtin_frame_address(0) to get the current stack pointer in a 'portable' way. Unfortunately, this appears not to work if -fomit-frame-pointer is used on an x86. My system sets that automatically, since the x86 is a bit short on registers and this is reputed to help

Re: builtin_frame_address for stack pointer

2007-10-22 Thread Andrew Pinski
On 10/22/07, skaller [EMAIL PROTECTED] wrote: Unfortunately, this appears not to work if -fomit-frame-pointer is used on an x86. What version of GCC? Since this was fixed for 4.1.0, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8335 . Thanks, Andrew Pinski