From patchwork Thu Jun 22 00:03:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alarson@ddci.com X-Patchwork-Id: 9803197 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4B679600C5 for ; Thu, 22 Jun 2017 00:04:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 379B52846B for ; Thu, 22 Jun 2017 00:04:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BE4428545; Thu, 22 Jun 2017 00:04:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 782952846B for ; Thu, 22 Jun 2017 00:04:12 +0000 (UTC) Received: from localhost ([::1]:56368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNpbX-00040y-5E for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Jun 2017 20:04:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNpas-00040h-2b for qemu-devel@nongnu.org; Wed, 21 Jun 2017 20:03:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNpao-00065o-VE for qemu-devel@nongnu.org; Wed, 21 Jun 2017 20:03:30 -0400 Received: from linux03.ddci.com ([184.183.10.182]:43635 helo=linux03a.ddci.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNpao-000650-Lj; Wed, 21 Jun 2017 20:03:26 -0400 Received: from linux03a.ddci.com (localhost.localdomain [127.0.0.1]) by linux03a.ddci.com (8.13.8/8.13.8) with ESMTP id v5M03A7Z005684; Wed, 21 Jun 2017 17:03:10 -0700 Received: (from alarson@localhost) by linux03a.ddci.com (8.13.8/8.13.8/Submit) id v5M038Ns005683; Wed, 21 Jun 2017 17:03:08 -0700 Date: Wed, 21 Jun 2017 17:03:08 -0700 From: Aaron Larson Message-Id: <201706220003.v5M038Ns005683@linux03a.ddci.com> To: agraf@suse.de, alarson@ddci.com, david@gibson.dropbear.id.au, qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 184.183.10.182 Subject: [Qemu-devel] [PATCH] target-ppc: SPR_BOOKE_ESR not set on FP exceptions 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: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Properly set the book E exception syndrome register when a floating point exception occurs. Currently on a book E processor, the POWERPC_EXCP_FP exception handler fails to set "env->spr[SPR_BOOKE_ESR] = ESR_FP;" as required by the book E specification. Signed-off-by: Aaron Larson --- target/ppc/excp_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 9cb2123..7a82bdd 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -282,6 +282,7 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp) * precise in the MSR. */ msr |= 0x00100000; + env->spr[SPR_BOOKE_ESR] = ESR_FP; break; case POWERPC_EXCP_INVAL: LOG_EXCP("Invalid instruction at " TARGET_FMT_lx "\n", env->nip);