From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvURA-0001gH-F9 for qemu-devel@nongnu.org; Tue, 24 Dec 2013 11:02:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VvUR2-0001jr-1U for qemu-devel@nongnu.org; Tue, 24 Dec 2013 11:02:28 -0500 Sender: Richard Henderson Message-ID: <52B9B006.5010307@twiddle.net> Date: Tue, 24 Dec 2013 08:02:14 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1387399747-4994-1-git-send-email-tommusta@gmail.com> <1387399747-4994-11-git-send-email-tommusta@gmail.com> In-Reply-To: <1387399747-4994-11-git-send-email-tommusta@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [V3 PATCH 10/14] target-ppc: Fix and enable fri[mnpz] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tom Musta , qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org On 12/18/2013 12:49 PM, Tom Musta wrote: > The fri* series of instructions was introduced prior to ISA 2.06 and > is supported on Power7 and Power8 hardware. However, the instruction > is still considered illegal in the P7 and P8 QEMU emulation models. > This patch enables these instructions for the P7 and P8 machines. > > Also, the existing helper is modified to correctly handle some of > the boundary cases (NaNs and the inexact flag). > > Signed-off-by: Tom Musta > --- > target-ppc/fpu_helper.c | 12 ++++++------ > target-ppc/translate_init.c | 2 ++ > 2 files changed, 8 insertions(+), 6 deletions(-) Probably should be separate patches, but whatever. > + farg.ll = float64_default_nan | 0x0008000000000000ul; That doesn't match what I see here: FRT <- (FRB) FRT12 <- 1 i.e. farg.ll |= 1ull << (63 - 12); i.e. mostly preserve the SNAN input. I'll also note that frin can't properly be implemented with float_round_nearest_even because it doesn't round to even. r~