From patchwork Mon Jun 10 19:48:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 250343 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 16E442C008C for ; Tue, 11 Jun 2013 05:49:35 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=NlI5h KOlIlFbDp/L1wapwk9TVmpWcqF+Ward3/N4u6kXgLbVAxCHmKmU4sfI6eKPBohlM C5Ma/DQYq9Mfx9HN0TrJf4KBiDXPyYp9mxyx3A4fTouQ4oLIm6W3Gjike214oSAm yY5EI6bzc6X+pc9IqVCdcgc35ruq3VAk/keHlo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=QniglpBG1H9 9Uc7haVJH2DJQ1PM=; b=uHpOTKfRWmLjbdvU8HZrzwCPEcFYBp8ypgOXMD7lqPk VWuPSR/O4Ua7vnUlIfKWJaUfFms2pZ0KgGsBaS7nT5ZsBG/kHuZL7d6+kI92S2jF fsBsWsezSUEJxmttiZa0XZvkiwegDfzPRWbx9UPOKUy0SFQK9GgPq2shsGJYkbeo = Received: (qmail 30867 invoked by alias); 10 Jun 2013 19:49:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 30841 invoked by uid 89); 10 Jun 2013 19:49:22 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from multi.imgtec.com (HELO multi.imgtec.com) (194.200.65.239) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 10 Jun 2013 19:49:21 +0000 From: "Steve Ellcey " Date: Mon, 10 Jun 2013 12:48:58 -0700 To: , Subject: [patch, mips] Micromips delay slot fix User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Message-ID: <859b5b58-e3c6-44b5-ae35-a3515fa16a00@BAMAIL02.ba.imgtec.org> X-SEF-Processed: 7_3_0_01192__2013_06_10_20_49_02 We found a bug in the micromips implementation where the branch delay slot was not getting filled for micromips. You can reproduce this with a program that just has an empty main function. Andrew Bennett created this fix for it and we would like to check it in. I am submitting it for Andrew since he doesn't have write access. OK to checkin? 2013-06-10 Andrew Bennett Steve Ellcey * config/mips/mips.md (single_insn): Fix attribute for micromips. diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 2fdc79d..f18ab50 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -704,7 +704,9 @@ ;; Is it a single instruction? (define_attr "single_insn" "no,yes" - (symbol_ref "(get_attr_length (insn) == (TARGET_MIPS16 ? 2 : 4) + (symbol_ref "(((TARGET_MIPS16 || TARGET_MICROMIPS) + && get_attr_length (insn) == 2) + || (!TARGET_MIPS16 && get_attr_length (insn) == 4) ? SINGLE_INSN_YES : SINGLE_INSN_NO)")) ;; Can the instruction be put into a delay slot?