This is the mail archive of the gcc@gcc.gnu.org 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 <Franz.Sirl-kernel@lauterbach.com> writes:

    Franz> At 01:50 14.05.2001, Mark Mitchell wrote:
    >> - The manual explicitly documents __builtin_return_address
    >> being guaranteed to return the correct value only when the
    >> index is 0.
    >> 
    >> Therefore, the test-case is semi-bogus.

    Franz> Nope, cause if __builtin_return_address(n) with n>=1
    Franz> doesn't work on a target, it has to return 0 and then the
    Franz> comparisons in the testcase are valid.

Nope, because it doesn't have to consistently do that.  There's
nothing in the documentation that says that it couldn't do it for 1
sometimes, but not other times.  That might make sense; maybe you
can't unwind past optimized stack frames, for example.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


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