https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114060

--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> ---
How could there be such a contract? In order to call any other function, the
GOT address of the callee needs to be loaded, replacing the caller's value,
which must be spilled and reloaded if it's needed again -- but if it's not
needed again, it makes sense to just discard it.

On SH (and AFAIK FRV, the original FDPIC), GCC happily discards the FDPIC/GOT
register when it won't be used again.

Maybe as an implementation detail GCC is not doing that on ARM right now, but
if not, that's probably a big missed optimization and not something libgcc
unwinder code should be relying on.

Reply via email to