From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a79SG-0001Gr-WE for qemu-devel@nongnu.org; Thu, 10 Dec 2015 17:12:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a79SD-0000IR-Rq for qemu-devel@nongnu.org; Thu, 10 Dec 2015 17:12:52 -0500 Received: from out1134-177.mail.aliyun.com ([42.120.134.177]:52486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a79SD-0000Hg-Ga for qemu-devel@nongnu.org; Thu, 10 Dec 2015 17:12:49 -0500 Message-ID: <5669F98B.40400@emindsoft.com.cn> Date: Fri, 11 Dec 2015 06:15:39 +0800 From: Chen Gang MIME-Version: 1.0 References: <56698865.8050901@emindsoft.com.cn> <566988EA.109@emindsoft.com.cn> <5669B333.1080405@twiddle.net> <5669DE1C.7040300@twiddle.net> In-Reply-To: <5669DE1C.7040300@twiddle.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 2/4] target-tilegx: Add single floating point implementation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , Peter Maydell , Chris Metcalf Cc: chenwei@emindsoft.com.cn, qemu-devel On 12/11/15 04:18, Richard Henderson wrote: > On 12/10/2015 09:15 AM, Richard Henderson wrote: >> d = (uint64_t)sign << 63; >> d = deposit64(d, 53, 11, exp); >> d = deposit64(d, 21, 32, man); >> return float64_to_float32(d, fp_status); > > Hmm. Actually, this incorrectly adds the implicit bit. We'd actually need to > steal portions of softfloat.c to do this properly. Which still isn't that > difficult. > Yes, thanks. -- Chen Gang (陈刚) Open, share, and attitude like air, water, and life which God blessed