[Bug target/59401] [SH] GBR addressing mode optimization produces wrong code

olegendo at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 14 03:33:00 GMT 2014


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

--- Comment #10 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Kazumoto Kojima from comment #9)
> (In reply to Oleg Endo from comment #8)
> > change the
> > value for gbr in sh.h CALL_USED_REGISTERS from '1' to '0' and confirm that
> > everything is still OK?
> 
> The comment and document about CALL_USED_REGISTERS say that it must be
> a superset of FIXED_REGISTERS.  CALL_REALLY_USED_REGISTERS might be
> a macro for that purpose.

Right.  In this case it's probably better to do it in
sh_conditional_register_usage.  It would be nice if '-fcall-saved-gbr' and
'-fcall-used-gbr' still remained functional afterwards ... I'll give it a try.



More information about the Gcc-bugs mailing list