http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58405
Georg-Johann Lay <gjl at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution|--- |WORKSFORME --- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> --- (In reply to semicontinuity from comment #2) > Now I cannot reproduce that as well.. > It seems that I've compiled it with -ffixed-r30 -ffixed-r31 (different from > original intention) - in this case it produces this kind of assembly . I can reproduce it with -ffixed-r30 -ffixed-r31. But as I already wrote above, without Z (R30/R31) you cannot no more write sensible programs -- except completely trivial ones. I don't think it makes sense to put effort into optimizing useless programs or for programs that very likely will break by occupying Z. > Still, the code could be more optimal, without rjmp, push/pop - just with > ijmp replaced by 2 pushes + ret. Without -ffixed*, the code /does/ use IJMP. If you take away Z, it's not possible to use IJMP, of course.