From patchwork Fri Apr 6 15:21:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 151193 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 76087B7045 for ; Sat, 7 Apr 2012 01:22:11 +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=1334330532; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Subject:From:To:Content-Type:Date:Message-ID:Mime-Version: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=AbrGG2Cgfm2BQZrAck0L EDS2Ur0=; b=PjmgTbTBLEln00Q2ADhuHoNf52HzwvK8C+uLGWN53q4EYm6t2B25 A5TD0RUJODbhR6HatjVQiXGIcwzFkMRILMNusZtq+0fODA1teazTu97G57TnN1Fh l6uo4fOQ9SfjJ+GtRWayyGzQE0bxkM9elo4aYV8ugWHyBaZ2WqyAmO8= 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:Subject:From:To:Content-Type:Date:Message-ID:Mime-Version:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=vp7YVfmHn4weeNo4PfJMpmiQT5j2M2BpJ8d6+SM3Qc84lYZ25UMVm4qa8QFdlv 8c+zIj6DZhDwq8UKauthNu23Bcjki+CtMJLL+ttbTcP1te04Bf6aKQzbvear8X31 ZwnBE4eyvxiZiedLxPyQvKjRilzs4KLdbia056dOhcgd4=; Received: (qmail 28554 invoked by alias); 6 Apr 2012 15:22:06 -0000 Received: (qmail 28538 invoked by uid 22791); 6 Apr 2012 15:22:03 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_NO, TW_OV, TW_VQ, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from mailout11.t-online.de (HELO mailout11.t-online.de) (194.25.134.85) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Apr 2012 15:21:49 +0000 Received: from fwd11.aul.t-online.de (fwd11.aul.t-online.de ) by mailout11.t-online.de with smtp id 1SGAyx-0006C3-SC; Fri, 06 Apr 2012 17:21:47 +0200 Received: from [192.168.0.104] (EeM0jZZaYhQNuAzuuMPle1w986XotIH68S30e1Z5deGe1CbFegdcWPENy+eXjozg7y@[93.218.166.8]) by fwd11.t-online.de with esmtp id 1SGAyv-0cVOc40; Fri, 6 Apr 2012 17:21:45 +0200 Subject: [SH] Make prepare_move_operands return void From: Oleg Endo To: gcc-patches Date: Fri, 06 Apr 2012 17:21:40 +0200 Message-ID: <1333725700.19154.69.camel@yam-132-YW-E178-FTW> 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, The 'prepare_move_operands' function currently always returns 0, which makes checking its return value (e.g. in sh.md) useless. The attached patch makes 'prepare_move_operands' return void and removes the return value checks. Tested with 'make all-gcc'. OK? Cheers, Oleg ChangeLog: * config/sh/sh-protos.h (prepare_move_operands): Return void instead of int. * config/sh/sh.c (prepare_move_operands): Likewise. * config/sh/sh.md: Remove return value checks of prepare_move_operands. Index: gcc/config/sh/sh-protos.h =================================================================== --- gcc/config/sh/sh-protos.h (revision 186184) +++ gcc/config/sh/sh-protos.h (working copy) @@ -65,7 +65,7 @@ extern void emit_df_insn (rtx); extern void output_pic_addr_const (FILE *, rtx); extern bool expand_block_move (rtx *); -extern int prepare_move_operands (rtx[], enum machine_mode mode); +extern void prepare_move_operands (rtx[], enum machine_mode mode); extern enum rtx_code prepare_cbranch_operands (rtx *, enum machine_mode mode, enum rtx_code comparison); extern void expand_cbranchsi4 (rtx *operands, enum rtx_code comparison, int); Index: gcc/config/sh/sh.c =================================================================== --- gcc/config/sh/sh.c (revision 186185) +++ gcc/config/sh/sh.c (working copy) @@ -1601,7 +1601,7 @@ /* Prepare operands for a move define_expand; specifically, one of the operands must be in a register. */ -int +void prepare_move_operands (rtx operands[], enum machine_mode mode) { if ((mode == SImode || mode == DImode) @@ -1763,8 +1763,6 @@ operands[1] = op1; } } - - return 0; } enum rtx_code Index: gcc/config/sh/sh.md =================================================================== --- gcc/config/sh/sh.md (revision 186184) +++ gcc/config/sh/sh.md (working copy) @@ -5337,8 +5337,7 @@ (match_operand:SI 1 "general_movsrc_operand" ""))] "" { - if (prepare_move_operands (operands, SImode)) - DONE; + prepare_move_operands (operands, SImode); }) (define_expand "ic_invalidate_line" @@ -5447,8 +5446,7 @@ (match_operand:QI 1 "general_operand" ""))] "" { - if (prepare_move_operands (operands, QImode)) - DONE; + prepare_move_operands (operands, QImode); }) ;; If movqi_reg_reg is specified as an alternative of movqi, movqi will be @@ -5614,8 +5612,7 @@ (match_operand:HI 1 "general_movsrc_operand" ""))] "" { - if (prepare_move_operands (operands, HImode)) - DONE; + prepare_move_operands (operands, HImode); }) (define_expand "reload_inhi" @@ -5982,8 +5979,7 @@ (match_operand:DI 1 "general_movsrc_operand" ""))] "" { - if (prepare_move_operands (operands, DImode)) - DONE; + prepare_move_operands (operands, DImode); }) (define_insn "movdf_media" @@ -6571,8 +6567,7 @@ (match_operand:DF 1 "general_movsrc_operand" ""))] "" { - if (prepare_move_operands (operands, DFmode)) - DONE; + prepare_move_operands (operands, DFmode); if (TARGET_SHMEDIA) { if (TARGET_SHMEDIA_FPU) @@ -6618,8 +6613,7 @@ (match_operand:V2SF 1 "nonimmediate_operand" ""))] "TARGET_SHMEDIA_FPU" { - if (prepare_move_operands (operands, V2SFmode)) - DONE; + prepare_move_operands (operands, V2SFmode); }) (define_expand "addv2sf3" @@ -6700,8 +6694,7 @@ (match_operand:V4SF 1 "general_operand" ""))] "TARGET_SHMEDIA_FPU" { - if (prepare_move_operands (operands, V4SFmode)) - DONE; + prepare_move_operands (operands, V4SFmode); }) (define_insn_and_split "*movv16sf_i" @@ -6748,8 +6741,7 @@ (match_operand:V16SF 1 "nonimmediate_operand" "f,m,f"))] "TARGET_SHMEDIA_FPU" { - if (prepare_move_operands (operands, V16SFmode)) - DONE; + prepare_move_operands (operands, V16SFmode); }) (define_insn "movsf_media" @@ -6921,8 +6913,7 @@ (match_operand:SF 1 "general_movsrc_operand" ""))] "" { - if (prepare_move_operands (operands, SFmode)) - DONE; + prepare_move_operands (operands, SFmode); if (TARGET_SHMEDIA) { if (TARGET_SHMEDIA_FPU) @@ -11774,8 +11765,7 @@ (match_operand:V8QI 1 "general_movsrc_operand" ""))] "TARGET_SHMEDIA" { - if (prepare_move_operands (operands, V8QImode)) - DONE; + prepare_move_operands (operands, V8QImode); }) (define_insn "movv8qi_i" @@ -11867,8 +11857,7 @@ (match_operand:V2HI 1 "general_movsrc_operand" ""))] "TARGET_SHMEDIA" { - if (prepare_move_operands (operands, V2HImode)) - DONE; + prepare_move_operands (operands, V2HImode); }) (define_insn "movv2hi_i" @@ -11895,8 +11884,7 @@ (match_operand:V4HI 1 "general_movsrc_operand" ""))] "TARGET_SHMEDIA" { - if (prepare_move_operands (operands, V4HImode)) - DONE; + prepare_move_operands (operands, V4HImode); }) (define_insn "movv4hi_i" @@ -11920,8 +11908,7 @@ (match_operand:V2SI 1 "general_movsrc_operand" ""))] "TARGET_SHMEDIA" { - if (prepare_move_operands (operands, V2SImode)) - DONE; + prepare_move_operands (operands, V2SImode); }) (define_insn "movv2si_i"