From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a77fn-0002Wn-I7 for qemu-devel@nongnu.org; Thu, 10 Dec 2015 15:18:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a77fk-0004W2-D3 for qemu-devel@nongnu.org; Thu, 10 Dec 2015 15:18:43 -0500 Received: from mail-qg0-x231.google.com ([2607:f8b0:400d:c04::231]:36546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a77fk-0004Vy-7e for qemu-devel@nongnu.org; Thu, 10 Dec 2015 15:18:40 -0500 Received: by qgcc31 with SMTP id c31so161699746qgc.3 for ; Thu, 10 Dec 2015 12:18:39 -0800 (PST) Sender: Richard Henderson References: <56698865.8050901@emindsoft.com.cn> <566988EA.109@emindsoft.com.cn> <5669B333.1080405@twiddle.net> From: Richard Henderson Message-ID: <5669DE1C.7040300@twiddle.net> Date: Thu, 10 Dec 2015 12:18:36 -0800 MIME-Version: 1.0 In-Reply-To: <5669B333.1080405@twiddle.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: Chen Gang , Peter Maydell , Chris Metcalf Cc: chenwei@emindsoft.com.cn, qemu-devel 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. r~