From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSEsX-0002jj-40 for qemu-devel@nongnu.org; Tue, 26 Jul 2016 22:47:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSEsU-0001mH-Dc for qemu-devel@nongnu.org; Tue, 26 Jul 2016 22:47:23 -0400 Date: Wed, 27 Jul 2016 12:00:09 +1000 From: David Gibson Message-ID: <20160727020009.GS17429@voom.fritz.box> References: <1469571686-7284-1-git-send-email-benh@kernel.crashing.org> <1469571686-7284-12-git-send-email-benh@kernel.crashing.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FiqEyLLt06qkB6ow" Content-Disposition: inline In-Reply-To: <1469571686-7284-12-git-send-email-benh@kernel.crashing.org> Subject: Re: [Qemu-devel] [PATCH 12/32] ppc: FP exceptions are always precise List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org --FiqEyLLt06qkB6ow Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 27, 2016 at 08:21:06AM +1000, Benjamin Herrenschmidt wrote: > We don't implement imprecise FP exceptions and using store_current > which sets SRR1 to the *previous* instruction never makes sense > for these. So let's be truthful and make them precise, which is > allowed by the architecture. I don't see any store_correct in the altered code, so the description doesn't quite make sense to me. >=20 > Signed-off-by: Benjamin Herrenschmidt > --- > target-ppc/excp_helper.c | 11 ++++++----- > target-ppc/translate.c | 1 - > 2 files changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c > index f4b115e..91fdf4b 100644 > --- a/target-ppc/excp_helper.c > +++ b/target-ppc/excp_helper.c > @@ -274,12 +274,13 @@ static inline void powerpc_excp(PowerPCCPU *cpu, in= t excp_model, int excp) > env->error_code =3D 0; > return; > } > + > + /* FP exceptions always have NIP pointing to the faulting > + * instruction, so always use store_next and claim we are > + * precise in the MSR. > + */ > msr |=3D 0x00100000; > - if (msr_fe0 =3D=3D msr_fe1) { > - goto store_next; > - } > - msr |=3D 0x00010000; > - break; > + goto store_next; > case POWERPC_EXCP_INVAL: > LOG_EXCP("Invalid instruction at " TARGET_FMT_lx "\n", env->= nip); > msr |=3D 0x00080000; > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > index cb4e313..a05fed7 100644 > --- a/target-ppc/translate.c > +++ b/target-ppc/translate.c > @@ -2846,7 +2846,6 @@ static void gen_conditional_store(DisasContext *ctx= , TCGv EA, > int reg, int size) > { > TCGv t0 =3D tcg_temp_new(); > - uint32_t save_exception =3D ctx->exception; Also, this appears to be an unrelated change. > tcg_gen_st_tl(EA, cpu_env, offsetof(CPUPPCState, reserve_ea)); > tcg_gen_movi_tl(t0, (size << 5) | reg); --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --FiqEyLLt06qkB6ow Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXmBWpAAoJEGw4ysog2bOSUMsP/R/eW7mG8o9yErbCqQz67upV DL+TFKrX9+0zPcTxTK1w0EshoD7IJWc+qLM+xuzjxsfFW+654mT5HYI6FPhHe8ub 1t6F2JAbUnAsE2JxVkTkDyFX9wNDfjYe9WLwiWeDMHuKMS3aJI7zgijPMpOjLo5Y s13kqJJpcv9yEEbkXaYrcRXRjdSImFYkv37nPSY6v9c2aadhTBA139SqwA1t3ZUZ Fa5NNTWxI2EtuihAXZDl56fb2jwEq71kPIxKc75TFJnFI0HU1ldJ4B1GeRWCOmi3 H4PCDIJD0mPIjc25iHg5qUP3cr/piF9srj1mMl0zw3UzJsBp52IVd1lB9p2de7+T 08W4F/C1qLISLl47k1naenQ2TrqqSu2MbBNre1feSWIMugvxsC97L7YOPGCdiYzY Obw3oooNDzpmhql4SdNnh6pOrwhXr6r6BlVer0sRpNjSswfvpIwCRqoRzckQ8+d7 pMc3aQnFEbUhPUHv1FI/23wOvXwSneeLM2pekcETeJ9x/G2Cwa7yKm2wSPmN//Eg 4MQ1xTB+PvgCXnvAUeSLPM1avnoFGMH6+XXlGatjKxbuQx94pMpUoU5L/6rVpUxl L44dK4CVWGVGYXc3l3egnK27b+AtWQq7yIYVRo++wcXTsHl3AetCUX2zw3XvFB6l WYyO6CgudLv4zoSh2E82 =S7ee -----END PGP SIGNATURE----- --FiqEyLLt06qkB6ow--