From nobody Wed Nov 5 10:03:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153392977916530.668410373274355; Fri, 10 Aug 2018 12:36:19 -0700 (PDT) Received: from localhost ([::1]:57726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foDCs-0006U6-4f for importer@patchew.org; Fri, 10 Aug 2018 15:36:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foD8K-0002QL-LP for qemu-devel@nongnu.org; Fri, 10 Aug 2018 15:31:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foD8J-0005aP-O0 for qemu-devel@nongnu.org; Fri, 10 Aug 2018 15:31:36 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:42239) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1foD8J-0005ZR-IJ for qemu-devel@nongnu.org; Fri, 10 Aug 2018 15:31:35 -0400 Received: by mail-pg1-x543.google.com with SMTP id y4-v6so4835842pgp.9 for ; Fri, 10 Aug 2018 12:31:35 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-8-179.tukw.qwest.net. [97.113.8.179]) by smtp.gmail.com with ESMTPSA id g28-v6sm20500949pfe.41.2018.08.10.12.31.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Aug 2018 12:31:33 -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; bh=OdYmfxmhLk4+vClaCguZe9gt4aYiR2MJeDB2pbPXukg=; b=gqdeXoptZXxJa136MxDyDuSg5L1V1rEt+o73e1c0FBZy8tRX6QtMEFF37gxgQHt4xz Vh0bAS26RwGbNeJZQP1eBIabN58krmBRGgG7AAK957lSaiUp3l+GLk3ZHmdx+HBuPJmb Df6UJ4KSnXhLcIgrLgfJBnjJfFjVRy+vAVz20= 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; bh=OdYmfxmhLk4+vClaCguZe9gt4aYiR2MJeDB2pbPXukg=; b=t0vPBKecJNQlqEExN0lLFggNqNu3yJGDw//sjqZZ154KcbEKg4kjv1/JNr1ucuRIYp CUO5uVb5Fo6dUrRaFZ8Y07/S6PkSrynrnYlZUZj4IQ5iPadvcXLZ0pvc/DUMM+AK2PJ5 +Fs+J5vW/vZR+n4Nx1IWoDJy8kAk98OQ9mrth+XcU6BRGc4qcNczj2Dvn+SaFE6Hogdq jYC0U6B0oK0jXH86mqpw7TO0p5SMd92j8t33CRlUiAMgcWitNY3356HdrjH7nCF56Fjr F5WurLjKUj/rnQp5H8gvEub9VyPPsjD0VBrodP+5znFfo3KiOI7kWjHwRAVnRH7rp1fg 2QUA== X-Gm-Message-State: AOUpUlGRddViX3wmZMKERPw0rdbf3VSFAmx4UiZdqLlwpH2T3hVnksxt 10eu+TZP41b+l7GOn8Xen4WA+b26SVM= X-Google-Smtp-Source: AA+uWPxXgq7/HKPB2qHn0N74bTbIU1TMcJKsXXeZLJYMhH6BdIoNHb9aZvS8VmyE8kwKD6Ekk0JwWA== X-Received: by 2002:a62:c410:: with SMTP id y16-v6mr8293167pff.161.1533929494336; Fri, 10 Aug 2018 12:31:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 10 Aug 2018 12:31:25 -0700 Message-Id: <20180810193129.1556-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180810193129.1556-1-richard.henderson@linaro.org> References: <20180810193129.1556-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 Subject: [Qemu-devel] [PATCH 2/6] target/arm: Ignore float_flag_input_denormal from fp_status_f16 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: , Cc: laurent.desnogues@gmail.com, peter.maydell@linaro.org, alex.bennee@linaro.org, qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When FZ is set, input_denormal exceptions are recognized, but this does not happen with FZ16. The softfloat code has no way to distinguish these bits and will raise such exceptions into fp_status_f16.flags, so ignore them when computing the accumulated flags. Cc: qemu-stable@nongnu.org (3.0.1) Reported-by: Laurent Desnogues Signed-off-by: Richard Henderson Reviewed-by: Laurent Desnogues Tested-by: Laurent Desnogues --- target/arm/helper.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 452d5e182a..61454a77ec 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -11314,9 +11314,13 @@ uint32_t HELPER(vfp_get_fpscr)(CPUARMState *env) fpscr =3D (env->vfp.xregs[ARM_VFP_FPSCR] & 0xffc8ffff) | (env->vfp.vec_len << 16) | (env->vfp.vec_stride << 20); + i =3D get_float_exception_flags(&env->vfp.fp_status); i |=3D get_float_exception_flags(&env->vfp.standard_fp_status); - i |=3D get_float_exception_flags(&env->vfp.fp_status_f16); + /* FZ16 does not generate an input denormal exception. */ + i |=3D (get_float_exception_flags(&env->vfp.fp_status_f16) + & ~float_flag_input_denormal); + fpscr |=3D vfp_exceptbits_from_host(i); return fpscr; } --=20 2.17.1