From nobody Sat Dec 21 15:04:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1550503782565767.1074107773082; Mon, 18 Feb 2019 07:29:42 -0800 (PST) Received: from localhost ([127.0.0.1]:60580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvkrP-0002z2-IU for importer@patchew.org; Mon, 18 Feb 2019 10:29:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvjyY-00078O-AX for qemu-devel@nongnu.org; Mon, 18 Feb 2019 09:32:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvjyW-0003YN-80 for qemu-devel@nongnu.org; Mon, 18 Feb 2019 09:32:54 -0500 Received: from ozlabs.org ([203.11.71.1]:48193) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gvjyV-0003DB-I0; Mon, 18 Feb 2019 09:32:52 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 4435s24KNzz9sPl; Tue, 19 Feb 2019 01:31:18 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1550500278; bh=4N9M6Jo+jUM9P9qqQvopfFA5r2bjZ607uhJzd7kzerM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m50U0aADGWjLCcxHuqUtn97RPIHzffQyVRPMIn+UGjX11tFIyZoQnAI6yWS5yFppc wm2m5818gfPkvwzsOrX1LDtTetqqxkLMP9r3yKUdJIwKikWkhyNElQj7fwS5Wqa7fF wojMO8aa1glTF6+UXwj9l3DTxl3nrjBHukI/9RF8= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 19 Feb 2019 01:30:46 +1100 Message-Id: <20190218143049.17142-41-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218143049.17142-1-david@gibson.dropbear.id.au> References: <20190218143049.17142-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 40/43] target/ppc: Add set_vscr_sat X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , groug@kaod.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Richard Henderson This is required before changing the representation of the register. Signed-off-by: Richard Henderson Acked-by: David Gibson Message-Id: <20190215100058.20015-15-mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson --- target/ppc/int_helper.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index ec3ef9ff3f..1d8a4b530b 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -468,6 +468,11 @@ uint32_t helper_mfvscr(CPUPPCState *env) return env->vscr; } =20 +static inline void set_vscr_sat(CPUPPCState *env) +{ + env->vscr |=3D 1 << VSCR_SAT; +} + void helper_vaddcuw(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { int i; @@ -581,7 +586,7 @@ VARITHFPFMA(nmsubfp, float_muladd_negate_result | float= _muladd_negate_c); } \ } \ if (sat) { \ - env->vscr |=3D (1 << VSCR_SAT); \ + set_vscr_sat(env); \ } \ } #define VARITHSAT_SIGNED(suffix, element, optype, cvt) \ @@ -853,7 +858,7 @@ void helper_vcmpbfp_dot(CPUPPCState *env, ppc_avr_t *r,= ppc_avr_t *a, } \ } \ if (sat) { \ - env->vscr |=3D (1 << VSCR_SAT); \ + set_vscr_sat(env); \ } \ } VCT(uxs, cvtsduw, u32) @@ -900,7 +905,7 @@ void helper_vmhaddshs(CPUPPCState *env, ppc_avr_t *r, p= pc_avr_t *a, } =20 if (sat) { - env->vscr |=3D (1 << VSCR_SAT); + set_vscr_sat(env); } } =20 @@ -917,7 +922,7 @@ void helper_vmhraddshs(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, } =20 if (sat) { - env->vscr |=3D (1 << VSCR_SAT); + set_vscr_sat(env); } } =20 @@ -1029,7 +1034,7 @@ void helper_vmsumshs(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, } =20 if (sat) { - env->vscr |=3D (1 << VSCR_SAT); + set_vscr_sat(env); } } =20 @@ -1082,7 +1087,7 @@ void helper_vmsumuhs(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, } =20 if (sat) { - env->vscr |=3D (1 << VSCR_SAT); + set_vscr_sat(env); } } =20 @@ -1599,7 +1604,7 @@ void helper_vpkpx(ppc_avr_t *r, ppc_avr_t *a, ppc_avr= _t *b) } \ *r =3D result; \ if (dosat && sat) { \ - env->vscr |=3D (1 << VSCR_SAT); \ + set_vscr_sat(env); \ } \ } #define I(x, y) (x) @@ -2043,7 +2048,7 @@ void helper_vsumsws(CPUPPCState *env, ppc_avr_t *r, p= pc_avr_t *a, ppc_avr_t *b) *r =3D result; =20 if (sat) { - env->vscr |=3D (1 << VSCR_SAT); + set_vscr_sat(env); } } =20 @@ -2066,7 +2071,7 @@ void helper_vsum2sws(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, ppc_avr_t *b) =20 *r =3D result; if (sat) { - env->vscr |=3D (1 << VSCR_SAT); + set_vscr_sat(env); } } =20 @@ -2085,7 +2090,7 @@ void helper_vsum4sbs(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, ppc_avr_t *b) } =20 if (sat) { - env->vscr |=3D (1 << VSCR_SAT); + set_vscr_sat(env); } } =20 @@ -2102,7 +2107,7 @@ void helper_vsum4shs(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, ppc_avr_t *b) } =20 if (sat) { - env->vscr |=3D (1 << VSCR_SAT); + set_vscr_sat(env); } } =20 @@ -2121,7 +2126,7 @@ void helper_vsum4ubs(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, ppc_avr_t *b) } =20 if (sat) { - env->vscr |=3D (1 << VSCR_SAT); + set_vscr_sat(env); } } =20 --=20 2.20.1