From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15184 invoked by alias); 30 Apr 2009 09:07:43 -0000 Received: (qmail 15104 invoked by uid 48); 30 Apr 2009 09:07:26 -0000 Date: Thu, 30 Apr 2009 09:07:00 -0000 Message-ID: <20090430090726.15103.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/39942] Nonoptimal code - leaveq; xchg %ax,%ax; retq In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" 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 X-SW-Source: 2009-04/txt/msg03039.txt.bz2 ------- Comment #16 from jakub at gcc dot gnu dot org 2009-04-30 09:07 ------- Created an attachment (id=17783) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17783&action=view) gcc45-pr39942.patch Patch that attempts to take into account .p2align directives that are emitted for (some) CODE_LABELs and also the gen_align insns that the pass itself inserts. For a CODE_LABEL, say .p2align 16,,10 means either that the .p2align directive starts a new 16 byte page (then insns before it are never interesting), or nothing was skipped because more than 10 bytes would need to be skipped. But that means the current group could contain only 5 or less bytes of instructions before the label, so again, we don't have to look at instructions not in the last 5 bytes. Another fix is that for MAX_SKIP < 7, ASM_OUTPUT_MAX_SKIP_ALIGN shouldn't emit the second .p2align 3, which might (and often does) skip more than MAX_SKIP bytes (up to 7). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39942