From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VogHG-0000Fa-Uj for qemu-devel@nongnu.org; Thu, 05 Dec 2013 16:16:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VogHB-0006Dc-3q for qemu-devel@nongnu.org; Thu, 05 Dec 2013 16:16:06 -0500 Sender: Richard Henderson Message-ID: <52A0ED0A.8070904@twiddle.net> Date: Fri, 06 Dec 2013 10:15:54 +1300 From: Richard Henderson MIME-Version: 1.0 References: <1386258303-2684-1-git-send-email-tommusta@gmail.com> <1386258303-2684-13-git-send-email-tommusta@gmail.com> In-Reply-To: <1386258303-2684-13-git-send-email-tommusta@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [V4 PATCH 12/14] target-ppc: VSX Stage 4: Add Scalar SP Fused Multiply-Adds 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/06/2013 04:45 AM, Tom Musta wrote: > This patch adds the Single Precision VSX Scalar Fused Multiply-Add > instructions: xsmaddasp, xsmaddmsp, xssubasp, xssubmsp, xsnmaddasp, > xsnmaddmsp, xsnmsubasp, xsnmsubmsp. > > The existing VSX_MADD() macro is modified to support rounding of the > intermediate double precision result to single precision. > > V2: Re-implemented per feedback from Richard Henderson. In order to > avoid double rounding and incorrect results, the operands must be > converted to true single precision values and use the single precision > fused multiply/add routine. > > V3: Re-implemented per feedback from Richard Henderson (I did not > fully understand his comment when I implemented V2). > > V4: Changed to use helper_frsp (inadvertently re-injected when I used an > earlier patch). Thanks to Richard Henderson for catching this. > > Signed-off-by: Tom Musta > --- > target-ppc/fpu_helper.c | 82 ++++++++++++++++++++++++++++++---------------- > target-ppc/helper.h | 8 ++++ > target-ppc/translate.c | 16 +++++++++ > 3 files changed, 77 insertions(+), 29 deletions(-) Reviewed-by: Richard Henderson r~