From patchwork Mon May 9 11:02:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 94756 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 7376EB6F07 for ; Mon, 9 May 2011 21:03:38 +1000 (EST) Received: (qmail 23475 invoked by alias); 9 May 2011 11:03:35 -0000 Received: (qmail 23467 invoked by uid 22791); 9 May 2011 11:03:34 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.160) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 May 2011 11:03:20 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT2k715jHQaJercGObUOFkj18odoYNahU4Q== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (business-188-111-022-002.static.arcor-ip.net [188.111.22.2]) by post.strato.de (cohen mo7) (RZmta 25.17) with ESMTPA id 6007c7n499e2GH ; Mon, 9 May 2011 13:03:00 +0200 (MEST) Message-ID: <4DC7C9E2.30604@gjlay.de> Date: Mon, 09 May 2011 13:02:58 +0200 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org CC: Denis Chertykov , Anatoly Sokolov , Eric Weddington Subject: [Patch,AVR]: Fix PR48896 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 Fixed the build warnings mentioned in PR48896. Johann --- 2011-05-09 Georg-Johann Lay PR target/48896 * config/avr/avr.c (avr_ret_register): Return unsigned int instead of int. (avr_function_value): Mark fn_decl_or_type as unused, don't pass it to avr_libcall_value. avr_expand_builtin): Use EXPAND_NORMAL as arg 4 in calls to expand_expr. (avr_expand_binop_builtin): Ditto. (avr_expand_unop_builtin): Ditto. Index: config/avr/avr.c =================================================================== --- config/avr/avr.c (Revision 173561) +++ config/avr/avr.c (Arbeitskopie) @@ -6178,7 +6178,7 @@ avr_reorg (void) /* Returns register number for function return value.*/ -static inline int +static inline unsigned int avr_ret_register (void) { return 24; @@ -6209,18 +6209,14 @@ avr_libcall_value (enum machine_mode mod function returns a value of data type VALTYPE. */ static rtx -avr_function_value (const_tree type, const_tree fn_decl_or_type, - bool outgoing ATTRIBUTE_UNUSED) +avr_function_value (const_tree type, + const_tree fn_decl_or_type ATTRIBUTE_UNUSED, + bool outgoing ATTRIBUTE_UNUSED) { unsigned int offs; - const_rtx func = fn_decl_or_type; - - if (fn_decl_or_type - && !DECL_P (fn_decl_or_type)) - fn_decl_or_type = NULL; if (TYPE_MODE (type) != BLKmode) - return avr_libcall_value (TYPE_MODE (type), func); + return avr_libcall_value (TYPE_MODE (type), NULL_RTX); offs = int_size_in_bytes (type); if (offs < 2) @@ -6711,7 +6707,7 @@ avr_expand_unop_builtin (enum insn_code { rtx pat; tree arg0 = CALL_EXPR_ARG (exp, 0); - rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); + rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, EXPAND_NORMAL); enum machine_mode op0mode = GET_MODE (op0); enum machine_mode tmode = insn_data[icode].operand[0].mode; enum machine_mode mode0 = insn_data[icode].operand[1].mode; @@ -6752,8 +6748,8 @@ avr_expand_binop_builtin (enum insn_code rtx pat; tree arg0 = CALL_EXPR_ARG (exp, 0); tree arg1 = CALL_EXPR_ARG (exp, 1); - rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); - rtx op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); + rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, EXPAND_NORMAL); + rtx op1 = expand_expr (arg1, NULL_RTX, VOIDmode, EXPAND_NORMAL); enum machine_mode op0mode = GET_MODE (op0); enum machine_mode op1mode = GET_MODE (op1); enum machine_mode tmode = insn_data[icode].operand[0].mode; @@ -6845,7 +6841,7 @@ avr_expand_builtin (tree exp, rtx target case AVR_BUILTIN_DELAY_CYCLES: { arg0 = CALL_EXPR_ARG (exp, 0); - op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0); + op0 = expand_expr (arg0, NULL_RTX, VOIDmode, EXPAND_NORMAL); if (! CONST_INT_P (op0)) error ("__builtin_avr_delay_cycles expects a compile time integer constant.");