From patchwork Fri Nov 12 18:16:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joern Rennecke X-Patchwork-Id: 71003 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 19D53B712D for ; Sat, 13 Nov 2010 05:16:36 +1100 (EST) Received: (qmail 1981 invoked by alias); 12 Nov 2010 18:16:35 -0000 Received: (qmail 1955 invoked by uid 22791); 12 Nov 2010 18:16:34 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from c60.cesmail.net (HELO c60.cesmail.net) (216.154.195.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Nov 2010 18:16:29 +0000 Received: from unknown (HELO epsilon2) ([192.168.1.60]) by c60.cesmail.net with ESMTP; 12 Nov 2010 13:16:27 -0500 Received: from 89.241.153.155 ([89.241.153.155]) by webmail.spamcop.net (Horde MIME library) with HTTP; Fri, 12 Nov 2010 13:16:26 -0500 Message-ID: <20101112131626.tkclqit5usog0kgg-nzlynne@webmail.spamcop.net> Date: Fri, 12 Nov 2010 13:16:26 -0500 From: Joern Rennecke To: gcc-patches@gcc.gnu.org Cc: Hans-Peter Nilsson Subject: RFA: Fix cris --enable-werror-always build MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) 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 saved_regs_mentioned appears to be an orphan of cris_eligible_for_epilogue_delay, which was deleted in 2005. Built on i686-pc-linux-gnu with gcc (GCC) 4.6.0 20101111 (experimental) . 2010-11-12 Joern Rennecke PR target/46435 * config/cris/cris.c (saved_regs_mentioned): Delete. (cris_reload_address_legitimized): Cast itype to enum reload_type. Remove unused variable op0p. (cris_rtx_costs): Casr argument 2 to rtx_cost to enum rtx_code. (cris_emit_movem_store): Use add_reg_note. Index: config/cris/cris.c =================================================================== --- config/cris/cris.c (revision 166609) +++ config/cris/cris.c (working copy) @@ -103,8 +103,6 @@ static void cris_setup_incoming_varargs static int cris_initial_frame_pointer_offset (void); -static int saved_regs_mentioned (rtx); - static void cris_operand_lossage (const char *, rtx); static int cris_reg_saved_in_regsave_area (unsigned int, bool); @@ -680,57 +678,6 @@ cris_reg_saved_in_regsave_area (unsigned || regno == EH_RETURN_DATA_REGNO (3))); } -/* Return nonzero if there are regs mentioned in the insn that are not all - in the call_used regs. This is part of the decision whether an insn - can be put in the epilogue. */ - -static int -saved_regs_mentioned (rtx x) -{ - int i; - const char *fmt; - RTX_CODE code; - - /* Mainly stolen from refers_to_regno_p in rtlanal.c. */ - - code = GET_CODE (x); - - switch (code) - { - case REG: - i = REGNO (x); - return !call_used_regs[i]; - - case SUBREG: - /* If this is a SUBREG of a hard reg, we can see exactly which - registers are being modified. Otherwise, handle normally. */ - i = REGNO (SUBREG_REG (x)); - return !call_used_regs[i]; - - default: - ; - } - - fmt = GET_RTX_FORMAT (code); - for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) - { - if (fmt[i] == 'e') - { - if (saved_regs_mentioned (XEXP (x, i))) - return 1; - } - else if (fmt[i] == 'E') - { - int j; - for (j = XVECLEN (x, i) - 1; j >=0; j--) - if (saved_regs_mentioned (XEXP (x, i))) - return 1; - } - } - - return 0; -} - /* The PRINT_OPERAND worker. */ static void @@ -1335,9 +1282,8 @@ cris_reload_address_legitimized (rtx x, int itype, int ind_levels ATTRIBUTE_UNUSED) { - enum reload_type type = itype; + enum reload_type type = (enum reload_type) itype; rtx op0, op1; - rtx *op0p; rtx *op1p; if (GET_CODE (x) != PLUS) @@ -1347,7 +1293,6 @@ cris_reload_address_legitimized (rtx x, return false; op0 = XEXP (x, 0); - op0p = &XEXP (x, 0); op1 = XEXP (x, 1); op1p = &XEXP (x, 1); @@ -1946,8 +1891,9 @@ cris_rtx_costs (rtx x, int code, int out && !CONST_INT_P (XEXP (x, 0)) && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (XEXP (x, 1)), 'I')) { - *total = (rtx_cost (XEXP (x, 0), outer_code, speed) + 2 - + 2 * GET_MODE_NUNITS (GET_MODE (XEXP (x, 0)))); + *total + = (rtx_cost (XEXP (x, 0), (enum rtx_code) outer_code, speed) + 2 + + 2 * GET_MODE_NUNITS (GET_MODE (XEXP (x, 0)))); return true; } return false; @@ -1958,7 +1904,7 @@ cris_rtx_costs (rtx x, int code, int out /* fall through */ case ZERO_EXTEND: case SIGN_EXTEND: - *total = rtx_cost (XEXP (x, 0), outer_code, speed); + *total = rtx_cost (XEXP (x, 0), (enum rtx_code) outer_code, speed); return true; default: @@ -3539,9 +3485,7 @@ cris_emit_movem_store (rtx dest, rtx nre XVECEXP (seq, 0, i) = copy_rtx (XVECEXP (PATTERN (insn), 0, i + 1)); XVECEXP (seq, 0, nregs) = copy_rtx (XVECEXP (PATTERN (insn), 0, 1)); - REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, seq, - REG_NOTES (insn)); + add_reg_note (insn, REG_FRAME_RELATED_EXPR, seq); } RTX_FRAME_RELATED_P (insn) = 1;