From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14818 invoked by alias); 16 Sep 2013 16:14:02 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14736 invoked by uid 48); 16 Sep 2013 16:13:58 -0000 From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/58405] Unoptimal code generated for computed goto Date: Mon, 16 Sep 2013 16:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.7.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-09/txt/msg01157.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58405 Georg-Johann Lay changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution|--- |WORKSFORME --- Comment #3 from Georg-Johann Lay --- (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.