From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZS8U-00015t-8m for qemu-devel@nongnu.org; Thu, 24 Oct 2013 17:08:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZS8L-0004H1-RI for qemu-devel@nongnu.org; Thu, 24 Oct 2013 17:08:06 -0400 Message-ID: <52698C28.6040001@gmail.com> Date: Thu, 24 Oct 2013 16:07:52 -0500 From: Tom Musta MIME-Version: 1.0 References: <526947CA.4020504@gmail.com> <52694A24.3050509@gmail.com> <526986CF.8090503@twiddle.net> In-Reply-To: <526986CF.8090503@twiddle.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 15/19] Add VSX xmax/xmin Instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , QEMU Developers Cc: "qemu-ppc@nongnu.org" On 10/24/2013 3:45 PM, Richard Henderson wrote: > On 10/24/2013 09:26 AM, Tom Musta wrote: >> Because of the Power ISA definitions of maximum and minimum >> on various boundary cases, the standard softfloat comparison >> routines (e.g. float64_lt) do not work as well as one might >> think. Therefore specific routines for comparing 64 and 32 >> bit floating point numbers are implemented in the PowerPC >> helper code. > > Really? All I see in the document is ">fp", used both here > in the minmax insn and in the cmp insn. > > If the softfloat compare isn't good enough for minmax, how > can it be good enough for cmp? Example: The ISA is very explicit that max(-0.0, +0.0) = +0.0. But the comparison operations (and instructions) both consider -0.0 == +0.0. Because of this, I do not see how it is possible to implement max using float*_eq, float*_lt and float*_le. See, for example, table 58 (Actions for xsmaxdp) on p. 369 of the V2.06 ISA.