This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SPARC, register renaming, __builtin_return_address

>>>>> "Franz" == Franz Sirl <> 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         
CodeSourcery, LLC     

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]