https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89012
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |olegendo at gcc dot gnu.org
--- Comment #13 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Rich Felker from comment #12)
>
> I'm sorry, I didn't see your question at the time, and trying to answer it
> now I'm not sure I understand well enough. I think the behavior of
> function_symbol in sh.c forces the patterns in sh.md to need to make the
> relative call. Maybe if the ashlsi3 pattern used SFUNC_GOT instead of
> SFUNC_STATIC it would work though.
>
> If you can get this to work, I think the gratuitous loading of the callee
> GOT value I was worried about would not happen, since these are not normal
> calls but pseudo-instructions. So it might actually be lower-cost to do it
> this way, except possibly for hitting the cache line where the value in the
> GOT appears. And I think it would make dynamic libgcc work (assuming the
> libgcc code doesn't access global data in any way, which is a rather bad
> assumption to be locked into.
>
> I'm not sure if making this change is better or worse than suppressing the
> copying of the pseudo-instruction with bsrf in it.
To be realistic and honest, I don't have the resources at the moment to look
into this myself. However, if somebody does, I'm happy to review (a)
patch(es).