From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZRgC-0007Q6-HC for qemu-devel@nongnu.org; Thu, 24 Oct 2013 16:38:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZRg5-0006zE-7j for qemu-devel@nongnu.org; Thu, 24 Oct 2013 16:38:52 -0400 Sender: Richard Henderson Message-ID: <5269852E.9000601@twiddle.net> Date: Thu, 24 Oct 2013 13:38:06 -0700 From: Richard Henderson MIME-Version: 1.0 References: <526947CA.4020504@gmail.com> <526949E1.3010405@gmail.com> In-Reply-To: <526949E1.3010405@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tom Musta , QEMU Developers Cc: "qemu-ppc@nongnu.org" On 10/24/2013 09:25 AM, Tom Musta wrote: > \ > + ft0 = tp##_to_##btp(xa.fld[i], &env->fp_status); \ > + ft1 = tp##_to_##btp(m->fld[i], &env->fp_status); \ > + ft0 = btp##_mul(ft0, ft1, &env->fp_status); \ > + if (unlikely(btp##_is_infinity(ft0) && \ > + tp##_is_infinity(s->fld[i]) && \ > + btp##_is_neg(ft0) cmp tp##_is_neg(s->fld[i]))) { \ > + xt.fld[i] = float64_to_##tp( \ > + fload_invalid_op_excp(env, \ > + POWERPC_EXCP_FP_VXISI, \ > + sfprf), \ > + &env->fp_status); \ > + } else { \ > + ft1 = tp##_to_##btp(s->fld[i], &env->fp_status); \ > + ft0 = btp##_##sum(ft0, ft1, &env->fp_status); \ > + xt.fld[i] = btp##_to_##tp(ft0, &env->fp_status); \ > + } \ > + if (neg && likely(!tp##_is_any_nan(xt.fld[i]))) { \ > + xt.fld[i] = tp##_chs(xt.fld[i]); \ > + } You want to be using tp##muladd instead of widening to 128 bits. > + s = &xt; \ > + } \ > + else { \ > + m = &xt; \ Also be careful of the codingstyle. r~