From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114737 invoked by alias); 18 Jan 2019 12:33:38 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 114723 invoked by uid 89); 18 Jan 2019 12:33:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=kamlesh, HX-Received:33c1, HX-Received:sk:b59mr18, HX-HELO:sk:mail-pl X-HELO: mail-pl1-f176.google.com Received: from mail-pl1-f176.google.com (HELO mail-pl1-f176.google.com) (209.85.214.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Jan 2019 12:33:36 +0000 Received: by mail-pl1-f176.google.com with SMTP id e11so6303459plt.11 for ; Fri, 18 Jan 2019 04:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xnmSMWBN1iK1RCrp2mnz0RzmLK9bgsBSgyfhHJckClk=; b=OMPkFnEE1PDdEtNx/H9QCSNK+COkWn+W0Zmjn26t8BWUzsfEYtH/HYG9D8Z9JtS8rU sdsmnEOAmIB41O6SQHMlM8d0TCqwfDorI50BN9EjJhZ5ULcZGC/AHRv6AJpiqiZiAtdK l7dsoeJ0gfeQ8FC+BJ1MuhWm3hF/j0uDX2Tr7VLbZh+eOxdu59xRw05vBpAG9G+Bcpiv P262aHrL3q4b2f6YaVOXs/jTbXNPifFsYfL++WE0WEIQCTprppBufVBA6RRgHutRcWYj JBw5T5k4ogDdrsy8BeklXTFjBTgdDKAl1fl8J/UoB5gE/Qng7h/oZkiU8SFLCT6lO9B3 Cycw== Return-Path: Received: from bubble.grove.modra.org ([58.175.241.133]) by smtp.gmail.com with ESMTPSA id 78sm9866754pft.184.2019.01.18.04.33.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Jan 2019 04:33:32 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id F1B0180918; Fri, 18 Jan 2019 23:03:28 +1030 (ACDT) Date: Fri, 18 Jan 2019 12:33:00 -0000 From: Alan Modra To: kamlesh kumar Cc: gcc@gcc.gnu.org, Umesh Kalappa , jakub@redhat.com Subject: Re: RS6000 emitting sign extention for unsigned type Message-ID: <20190118123328.GD29797@bubble.grove.modra.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00143.txt.bz2 On Tue, Jan 15, 2019 at 04:48:27PM +0530, kamlesh kumar wrote: > Hi all, > > Analysed it further and find out that > function ' rs6000_promote_function_mode ' (rs6000.c) needs modifcation. > """ > static machine_mode > rs6000_promote_function_mode (const_tree type ATTRIBUTE_UNUSED, > machine_mode mode, > int *punsignedp ATTRIBUTE_UNUSED, > const_tree, int) > { > PROMOTE_MODE (mode, *punsignedp, type); > return mode; > } > """ > Here, This function is promoting the mode but > it is not even touching 'punsignedp' and it is always initialized to zero > by default. > So in all cases 'punsignedp' remain zero even if it is for unsigned type. > which cause the sign extension to happen even for unsigned type. > > is there any way to set 'punsignedp' appropriately here. No. The call to promote_function_mode in emit_library_call_value_1 does not pass type info (because it isn't available for libcalls). -- Alan Modra Australia Development Lab, IBM