From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPMbM-0004Hx-8i for qemu-devel@nongnu.org; Thu, 05 Jan 2017 23:58:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPMbJ-0000jn-6S for qemu-devel@nongnu.org; Thu, 05 Jan 2017 23:58:04 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51098 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cPMbJ-0000jh-1n for qemu-devel@nongnu.org; Thu, 05 Jan 2017 23:58:01 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id v064riYf020506 for ; Thu, 5 Jan 2017 23:57:59 -0500 Received: from e23smtp07.au.ibm.com (e23smtp07.au.ibm.com [202.81.31.140]) by mx0b-001b2d01.pphosted.com with ESMTP id 27t0y07p57-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 05 Jan 2017 23:57:59 -0500 Received: from localhost by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 6 Jan 2017 14:57:56 +1000 Date: Fri, 6 Jan 2017 10:27:46 +0530 From: Bharata B Rao Reply-To: bharata@linux.vnet.ibm.com References: <1483615579-17618-1-git-send-email-nikunj@linux.vnet.ibm.com> <1483615579-17618-4-git-send-email-nikunj@linux.vnet.ibm.com> <20170105220117.GE13763@umbus.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170105220117.GE13763@umbus.fritz.box> Message-Id: <20170106045746.GC12420@in.ibm.com> Subject: Re: [Qemu-devel] [PATCH 03/14] target-ppc: Use float64 arg in helper_compute_fprf() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: Nikunj A Dadhania , qemu-ppc@nongnu.org, rth@twiddle.net, qemu-devel@nongnu.org On Fri, Jan 06, 2017 at 09:01:17AM +1100, David Gibson wrote: > On Thu, Jan 05, 2017 at 04:56:08PM +0530, Nikunj A Dadhania wrote: > > From: Bharata B Rao > > > > Use float64 argument instead of unit64_t in helper_compute_fprf() > > This allows code in helper_compute_fprf() to be reused later to > > work with float128 argument too. > > > > Signed-off-by: Bharata B Rao > > Signed-off-by: Nikunj A Dadhania > > Uh.. how can this possibly be correct, without updating the callers of > helper_compute_fprf()? It works currently because uint64_t argument that is passed by the callers is interpreted as float64 arg (via farg.d). Let me see if there is a cleaner way of doing this. Casting the callers with right floatXX type seems to be the easiest way. The requirement here is to ensure that helper_compute_fprf_float16(CPUPPCState *env, float16 arg) helper_compute_fprf_float32(CPUPPCState *env, float32 arg) helper_compute_fprf_float64(CPUPPCState *env, float64 arg) helper_compute_fprf_float128(CPUPPCState *env, float128 arg) get autogenerated with right floatXX argument so that it can directly be used with required routines (like floatXX_is_any_nan etc) w/o needing the CPU_DoubleU or other intermediate forms. Regards, Bharata.