From patchwork Fri Jul 5 16:04:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 168561 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3763888ilk; Fri, 5 Jul 2019 09:14:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2TeCw3ytIdyPy68WlcfEBs+1Q86HSImAmjjgSnS8//mkUBbAVfSbfN0yW8c/ssVFFcisB X-Received: by 2002:a17:906:3018:: with SMTP id 24mr4439691ejz.187.1562343274332; Fri, 05 Jul 2019 09:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562343274; cv=none; d=google.com; s=arc-20160816; b=qz7sQGjxwqEpXyVg3irWzG3DUXgj8Z7bK9btYxm9O3dYwWxqIW/U9yTyMB6AF/sjiR xTcHH8GwvgIW8BiuhjsmVV0zPwuWjstEqRBAmAEBNbKZHEFuinOkSRHDwnwXvQlibnmZ yORCzQbR1NgaoUrbHevqFPf+PkSBc6TLMWQGXoTpJzbCzssYaxRnQDFdnqu8y0jOnWfi +E8CtRH/mO5xkqE2nVnNRKckY2iPuNi0HrbCOjUpixJK4JdXZ9XLPOMadijGJtv4ki5s ooUqjyw8VTtCW6UplgPL515YcOx9ghL1bRsNbYjvZKnmZ71Plc9I8YLwikiFnW/O+f1r CZ4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=mM1Kb6A1N3/Dz5Nk0cJ9QkDDg49iumbs9t4kZbIKPkI=; b=kQiNqxFc5VWaPe9gAl4Mz/59/T8UpCmOo0AsCWE+Cy+WoxNMG6QQEeFTxF9K7bXrl4 RsKC7N8vu78/A5zLLakKaYXsFwmtBp8/O8MLAjKhaJXg7Dlp8fOo5u1sSOHRVK9sdydN R1XFP3V9smLry0kXkaAV9odfSoxy1ZSVXmjah/75DZGXoFzXOOi/XB5cIo+0BxpBRzpx qjpOXGLiTwvfDydrsJsrW9tm1UzoJzR8nQBpYMgz7QR5LIV4GzhhwLAAHiqlIjV3Grcm 5ddfkGtKOYdk2E+Qar/pahYoEb0fMA+TVI4QqLvNQmMbPVdLprRnbzJdsG4xs/pZNVyL GRtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=B+tqP9I2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b42si7468417ede.365.2019.07.05.09.14.34 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2019 09:14:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=B+tqP9I2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjQr3-0005e2-2n for patch@linaro.org; Fri, 05 Jul 2019 12:14:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40371) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjQhf-0002yf-Jy for qemu-devel@nongnu.org; Fri, 05 Jul 2019 12:04:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjQhc-0001ze-K2 for qemu-devel@nongnu.org; Fri, 05 Jul 2019 12:04:50 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:36541) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hjQhb-0000Mx-Ch for qemu-devel@nongnu.org; Fri, 05 Jul 2019 12:04:48 -0400 Received: by mail-wm1-x32e.google.com with SMTP id g67so3973719wme.1 for ; Fri, 05 Jul 2019 09:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mM1Kb6A1N3/Dz5Nk0cJ9QkDDg49iumbs9t4kZbIKPkI=; b=B+tqP9I2K5+Tn0q1xTHuNqxtvalMjBwgpRBufaF3SfhdXrnTb/pgmhQfNXP9lh8WML gzqDf3amfLMEWDOVNb5FvaTjtUIrXZQ3n8dBzn0xeHzjZywuHImPLALClJckQ2+YE+bq LBC9f8G4Cj2Uq22ODM/ZuH3ZeT2S2bql1id06uLDZjbS3G8BsGcDZiPjiZjULUJHyxL5 /HczLHViXPhnCv5gHEfNNhNW0v8H6sn8FjVA48ad0fLtq/MsYh5hsTe53RvKEPmkzPTR JVGKPCcWW79QVCNqO4nkkJWZfXkYUHTDJ3RJ7i3wgwSnP5Bpq7eYdHrHleiBkIvbCish a8Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mM1Kb6A1N3/Dz5Nk0cJ9QkDDg49iumbs9t4kZbIKPkI=; b=h9dPruawaiaT9kIvyd5tSRC+5y+fhyjEkMLWvHKy3LFLx44xCLIlxp0uGY62/uzN6Z SqUS551QkhAG1oxLiXBfwWRZkd9GBhkHE9F7Hd+u78do1CJBxwt8ON7DO+qz+hlrr4r/ MS8+hTnMGlX7enNy+4n8VnC2p/FkSpRYY3x8HjrY0kU9HhE+DkqOhKPPN82PYbaUbxTZ MoVnxyFCloJOSTVxfbEAq8mVA4RKuibcRZIFWdM6L9BlZRIkFQXlJb4Ls5A382gLcda0 GqA5MXY025MCGhPmasf7Ot/mp9b6i5Q9MqZj6kvVWrUQF2s9iyMpEjdobThFUTQnD1PV SC+Q== X-Gm-Message-State: APjAAAUpQv3Q/ciWL7CQrTEC2Mb4VHNWcz9FDNCqUS83fwHyeB70sg7E YCrT7xWtahyJPi2uziGYNmqSww== X-Received: by 2002:a7b:c195:: with SMTP id y21mr407119wmi.16.1562342662844; Fri, 05 Jul 2019 09:04:22 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id d9sm13335593wrb.71.2019.07.05.09.04.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 05 Jul 2019 09:04:22 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8C7421FF8C; Fri, 5 Jul 2019 17:04:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 5 Jul 2019 17:04:17 +0100 Message-Id: <20190705160421.19015-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190705160421.19015-1-alex.bennee@linaro.org> References: <20190705160421.19015-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e Subject: [Qemu-devel] [PATCH v1 1/5] target/arm/vfp_helper: Call set_fpscr_to_host before updating FPSCR reg 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 , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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é Reviewed-by: Laurent Desnogues Tested-by: Laurent Desnogues Message-Id: <20190705124318.1075-1-philmd@redhat.com> Signed-off-by: Alex Bennée --- target/arm/vfp_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 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 val) val &= 0xf7c0009f; } + 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 val) env->vfp.qc[1] = 0; env->vfp.qc[2] = 0; env->vfp.qc[3] = 0; - - vfp_set_fpscr_to_host(env, val); } void vfp_set_fpscr(CPUARMState *env, uint32_t val)