SPARC, register renaming, __builtin_return_address
Mark Mitchell
mark@codesourcery.com
Mon May 14 10:29:00 GMT 2001
>>>>> "Franz" == Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
Franz> On PPC the return address lives in a register until you
Franz> have a non-leaf function, at that point it will be stored
Franz> in the callers frame during the function prologue. Now, for
Franz> walking back the stack chain starting from a leaf function
Franz> it is easiest to force creation of a stack frame if we
Franz> detect b_r_a(n>=1) in that function, see
Franz> rs6000.c:rs6000_return_addr.
Sure. But I'm not sure why that's relevant -- that's a fine
implementation technique, but I thought we were talking about
something more abstractl. Anyhow, thanks. :-)
Franz> Damned, I just realize you were _solely_ talking about -O3
Franz> here (I somehow got the impression you were talking about
Franz> -O2 and higher). Now, that _is_ different and we can't
Franz> currently make any promises with inlined functions
Actually, inlining didn't play a role. The bug was the register
renaming we do at -O3, not the inlining.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc
mailing list