From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSKR7-0004Io-LI for qemu-devel@nongnu.org; Wed, 27 Jul 2016 04:43:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSKR2-0006yP-Bz for qemu-devel@nongnu.org; Wed, 27 Jul 2016 04:43:28 -0400 Date: Wed, 27 Jul 2016 17:21:07 +1000 From: David Gibson Message-ID: <20160727072107.GV17429@voom.fritz.box> References: <1469602609-31349-1-git-send-email-benh@kernel.crashing.org> <1469602609-31349-11-git-send-email-benh@kernel.crashing.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2JhMvOwMi9vhAgPY" Content-Disposition: inline In-Reply-To: <1469602609-31349-11-git-send-email-benh@kernel.crashing.org> Subject: Re: [Qemu-devel] [PATCHv2 11/31] 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 --2JhMvOwMi9vhAgPY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 27, 2016 at 04:56:29PM +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. >=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 96c6fd9..02d9e79 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 3cfa40f..ba14bda 100644 > --- a/target-ppc/translate.c > +++ b/target-ppc/translate.c > @@ -3060,7 +3060,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; This looks like an unrelated change, and one which would break compile without other changes in gen_conditional_store() that I don't see. Have you compiled the user-only targets with this 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 --2JhMvOwMi9vhAgPY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXmGDjAAoJEGw4ysog2bOSlQMP/3rxm1RmbaY3lD5x7HNxDOOt Wkj+siq/zoytinwVrRIVBEzrKMl3hDXleSYwuQ9MVnbU11U3ajKHjDHB05aTABSu nbnZZYY7ILstcLlqcn/aOb93JWJXrxdX/BqRQaefvlO3V2oC5c7jIwW2LYL/zb0X eWaPHtTGk1aytBa/xkUy2lFL1CP6eWLg99YUXi3Tc+ic84FN7sZqky/8o5+9l0B1 x6ytikRqFbbnLxQ3pz0KiUb7J/cBUnxeqqociCEjIBiDKjTdiQLhfH89P76+xFQm S09w7NH5rUtvzRiahj4s7fDGN8WAISCCoCNqzaZfQDoZSLRRpDq3zC4e7OYxlVPy kF4RDiR/DAaF7TBQMQ+i/JE5/Tdou5CAfynGKU7KUpKikQh5EReUTHE5y8lD/nP8 etSRHWLkcZqUZJGA52FRE99hTK2RHDfHHrEypdRayFKXgLzZuzogaAI6dJXSkUa8 ID3ehjginGvdNVhARFgpS3G9iBdh7RINJzg4uapOJwY4grDIVtWSnWXaMv9KaV1c RMiV3HG3P0/7x7GySu8btQTUup7UbNnmm6WWpGknfnNmpE/rTeJNV8gkN2ZAa+Ai RiZbP8byrS8P/2BilDdqwoJWU9TUjgWn3Ico4yE0RG75NBjTDZdldWldnuIucOyJ 3IsiJyxYyHVUbNrDoH6I =h4DS -----END PGP SIGNATURE----- --2JhMvOwMi9vhAgPY--