From nobody Sun Feb 8 21:47:46 2026 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; 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; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562330731; cv=none; d=zoho.com; s=zohoarc; b=c24BSaJMi5UW3uvKBranGa/A6QJenazykl+cHxnTxNHrCp/cb1Hj4gGAKiO7kvmP4tGg0qjyqAHTGLqtjJX2H0Gtq5Jh74gDSFCRvKeo//y3+edBZ5M/cN+07GT57WjGCv4dIVd2wQWr9wTXgQLNgBkTIP+N17R4QKMw64zIrVA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562330731; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=1u0RAxgUz6fdZULXzCYGspWLgtqMqWW+NkWjWIUemwo=; b=aFJ3rFR1hvm0yS0VqoyZ30smm9ly5oZ4h/LiYYxCFGckjnF0GVdy6Oiq5r9GnzerUkqZ7ox5I03GB81Pq/bzCiPxQ2UBwcFgl+yhWFKn9rmYG0ZaOyXdlWB4O1TxMvnVbVjEeTRsDfHCnHAm/UX41ruVYuNJXgJmH/iXaxsHtw0= ARC-Authentication-Results: i=1; mx.zoho.com; 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156233073198661.92907945397371; Fri, 5 Jul 2019 05:45:31 -0700 (PDT) Received: from localhost ([::1]:52746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjNaX-00074n-SL for importer@patchew.org; Fri, 05 Jul 2019 08:45:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56288) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjNYw-0005cR-1V for qemu-devel@nongnu.org; Fri, 05 Jul 2019 08:43:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjNYt-00077x-27 for qemu-devel@nongnu.org; Fri, 05 Jul 2019 08:43:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59580) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hjNYm-0006Zo-Dh; Fri, 05 Jul 2019 08:43:30 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7D21A34CF; Fri, 5 Jul 2019 12:43:26 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-45.brq.redhat.com [10.40.204.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1DEE08E170; Fri, 5 Jul 2019 12:43:19 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Fri, 5 Jul 2019 14:43:18 +0200 Message-Id: <20190705124318.1075-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 05 Jul 2019 12:43:26 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Desnogues , Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" In commit e9d652824b0 we extracted the vfp_set_fpscr_to_host() function but failed at calling it in the correct place, we call it after xregs[ARM_VFP_FPSCR] is modified. Fix by calling this function before we update FPSCR. Reported-by: Laurent Desnogues Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Laurent Desnogues Tested-by: Laurent Desnogues --- target/arm/vfp_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c index 46041e3294..9710ef1c3e 100644 --- a/target/arm/vfp_helper.c +++ b/target/arm/vfp_helper.c @@ -197,6 +197,8 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t v= al) val &=3D 0xf7c0009f; } =20 + vfp_set_fpscr_to_host(env, val); + /* * We don't implement trapped exception handling, so the * trap enable bits, IDE|IXE|UFE|OFE|DZE|IOE are all RAZ/WI (not RES0!) @@ -217,8 +219,6 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t v= al) env->vfp.qc[1] =3D 0; env->vfp.qc[2] =3D 0; env->vfp.qc[3] =3D 0; - - vfp_set_fpscr_to_host(env, val); } =20 void vfp_set_fpscr(CPUARMState *env, uint32_t val) --=20 2.20.1