From patchwork Thu Oct 4 03:04:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaz Kojima X-Patchwork-Id: 189014 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]) by ozlabs.org (Postfix) with SMTP id 86E612C033C for ; Thu, 4 Oct 2012 13:05:04 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1349924705; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:Message-Id:To:Subject:From:Mime-Version:Content-Type: Content-Transfer-Encoding:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=NEXAZca6PJ8IVFbTqmLvSBCAUoA=; b=vRUYRqUun2EEAdT EwO6W92dW4iP8l8doeejsAzBShK2veMbecylblQlO8muVSBIaTt1FxPAdlzRCvxy A2vDdcQu7pA+t+Iasbk1GdSeYb6YT+w3rvFU4DfxrnQ2dbStAAk7oqTtyG1yEuK1 5tZ8KvQEVcdt6nmZvQAM4dl/edZo= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:Message-Id:To:Subject:From:Mime-Version:Content-Type:Content-Transfer-Encoding:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Srso7O/6dpBN+6XEu08XbIfNoAl+WPXxOdaZV+kUJ1sVqSOmFdX731t/WzG88m 4tPxI7306sLZVPDYi2rIn833PmerfNmBgs2AQith+9LDLrMBmNX5BHDmsfm0rM9I z1nR1hBT7NVFSkicjng7VKL2du5EJp8mfsR9Dl3ycTZgc=; Received: (qmail 12994 invoked by alias); 4 Oct 2012 03:05:00 -0000 Received: (qmail 12986 invoked by uid 22791); 4 Oct 2012 03:05:00 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_VIA_APNIC, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mo10.iij4u.or.jp (HELO mo.iij4u.or.jp) (210.138.174.78) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Oct 2012 03:04:55 +0000 Received: by mo.iij4u.or.jp (mo10) id q9434rfO006148; Thu, 4 Oct 2012 12:04:53 +0900 Received: from localhost (238.152.138.210.bn.2iij.net [210.138.152.238]) by mbox.iij4u.or.jp (mbox11) id q9434qiX001657; Thu, 4 Oct 2012 12:04:53 +0900 Date: Thu, 04 Oct 2012 12:04:52 +0900 (JST) Message-Id: <20121004.120452.131455034.kkojima@rr.iij4u.or.jp> To: gcc-patches@gcc.gnu.org Subject: [patch committed SH] Fix sh64-elf build failure From: Kaz Kojima Mime-Version: 1.0 X-IsSubscribed: yes 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 Hi, I've committed the patch below to fix sh64-elf build failure. SHmedia and SHcompact using call cookie require special return insns and will require an extra work to enable simple_return. I simply disable it for these targets ATM. Regards, kaz --- 2012-10-04 Kaz Kojima * config/sh/sh.c (sh_can_use_simple_return_p): Return false for SHmedia and SHcompact using call cookie. * config/sh/sh.md (epilogue): Emit non-inlined return insns for SHmedia and SHcompact using call cookie. Index: gcc/config/sh/sh.md =================================================================== --- gcc/config/sh/sh.md (revision 192060) +++ gcc/config/sh/sh.md (working copy) @@ -10460,6 +10460,13 @@ "" { sh_expand_epilogue (false); + if (TARGET_SHMEDIA + || (TARGET_SHCOMPACT + && (crtl->args.info.call_cookie & CALL_COOKIE_RET_TRAMP (1)))) + { + emit_jump_insn (gen_return ()); + DONE; + } }) (define_expand "eh_return" Index: gcc/config/sh/sh.c =================================================================== --- gcc/config/sh/sh.c (revision 192060) +++ gcc/config/sh/sh.c (working copy) @@ -13134,6 +13134,12 @@ HARD_REG_SET live_regs_mask; int d; + /* Some targets require special return insns. */ + if (TARGET_SHMEDIA + || (TARGET_SHCOMPACT + && (crtl->args.info.call_cookie & CALL_COOKIE_RET_TRAMP (1)))) + return false; + if (! reload_completed || frame_pointer_needed) return false;