From patchwork Sun Jul 8 15:43:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 169649 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 19A352C00DC for ; Mon, 9 Jul 2012 01:44:08 +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=1342367050; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Subject:From:To:Date:Content-Type:Mime-Version: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=3Zn0XWiTrO/ipPQFG+FK 7crKNbg=; b=T7M65eqKSNJcgcI125HViN4tUU5jpu8RvAo31sXkdOwUQTopmGMJ TjscOTwbYLqiLyQE9R1GIs1hrIssiKA5IF9SNRnaQANtzpiyFEIaFQN1yKQyvCtM 58t8C7gDFbGX7Zvu3cLBAMr4J3NBJWeNd4qILUv+3o+O1mkYdBfZl/0= 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:Message-ID:Subject:From:To:Date:Content-Type:Mime-Version:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=HC1OtMSdUJkCjchvphC3EL92V9Mo3dmEfmYXhCQjG/MycPZHYPxM88lf9QXASN R/+Hkx7ZClDJ3Ng5LPBapHxygmX+2KciyJGuWC1cenOPUDs5jkl8DVt0Vj4QSF7X oSc+vnjHyuZR6KQJdQ0CfxAuy6s8d+OHD901FK+vteq4U=; Received: (qmail 30345 invoked by alias); 8 Jul 2012 15:44:05 -0000 Received: (qmail 30336 invoked by uid 22791); 8 Jul 2012 15:44:04 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_NO, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from mailout01.t-online.de (HELO mailout01.t-online.de) (194.25.134.80) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 08 Jul 2012 15:43:50 +0000 Received: from fwd23.aul.t-online.de (fwd23.aul.t-online.de ) by mailout01.t-online.de with smtp id 1SnteH-0005fm-3V; Sun, 08 Jul 2012 17:43:49 +0200 Received: from [192.168.0.100] (SaldugZV8hstPdsQKBkXq--S3BqLCXdsSDGI55LH62qKZx0+4q-N3PCR+2ZV49bQgG@[93.218.161.13]) by fwd23.t-online.de with esmtp id 1SnteF-07LMzQ0; Sun, 8 Jul 2012 17:43:47 +0200 Message-ID: <1341762225.2292.9.camel@yam-132-YW-E178-FTW> Subject: [SH] Broken build due to tree.h not being included anymore From: Oleg Endo To: gcc-patches Date: Sun, 08 Jul 2012 17:43:45 +0200 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 Hello, The recent change that removed the inclusion of tree.h in several places broke the SH target in one place in sh.md, where stuff from tree.h was used directly. I've moved those lines in question into a new function in sh.c. Tested with make all-gcc. OK to install? Cheers, Oleg ChangeLog: * config/sh/sh.md (*return_i): Move trap_exit attribute check to ... * config/sh/sh.c (sh_cfun_trap_exit_p): ... this new function. * config/sh/sh-protos.h: Declare it. Index: gcc/config/sh/sh-protos.h =================================================================== --- gcc/config/sh/sh-protos.h (revision 189359) +++ gcc/config/sh/sh-protos.h (working copy) @@ -106,6 +106,7 @@ extern bool sh_expand_t_scc (rtx *); extern rtx sh_gen_truncate (enum machine_mode, rtx, int); extern bool sh_vector_mode_supported_p (enum machine_mode); +extern bool sh_cfun_trap_exit_p (void); #endif /* RTX_CODE */ extern const char *output_jump_label_table (void); Index: gcc/config/sh/sh.c =================================================================== --- gcc/config/sh/sh.c (revision 189359) +++ gcc/config/sh/sh.c (working copy) @@ -9309,6 +9309,15 @@ != NULL_TREE) && TARGET_SH2A); } +/* Returns true if the current function has a "trap_exit" attribute set. */ + +bool +sh_cfun_trap_exit_p (void) +{ + return lookup_attribute ("trap_exit", DECL_ATTRIBUTES (current_function_decl)) + != NULL_TREE; +} + /* Implement TARGET_CHECK_PCH_TARGET_FLAGS. */ static const char * Index: gcc/config/sh/sh.md =================================================================== --- gcc/config/sh/sh.md (revision 189360) +++ gcc/config/sh/sh.md (working copy) @@ -9442,8 +9442,7 @@ && (crtl->args.info.call_cookie & CALL_COOKIE_RET_TRAMP (1))) && reload_completed - && lookup_attribute (\"trap_exit\", - DECL_ATTRIBUTES (current_function_decl)) == NULL_TREE" + && ! sh_cfun_trap_exit_p ()" { if (TARGET_SH2A && (dbr_sequence_length () == 0) && !current_function_interrupt)