From patchwork Fri Aug 10 19:31:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 143964 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp331095ljj; Fri, 10 Aug 2018 12:36:50 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxhNscVWdYovtRNWY/1dkN1PEej7lioxjUCb+Lv/2Ub9WxVyJ5+CRqcWkQtcj3lRB2KnHw/ X-Received: by 2002:ac8:17ee:: with SMTP id r43-v6mr7979057qtk.106.1533929810684; Fri, 10 Aug 2018 12:36:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533929810; cv=none; d=google.com; s=arc-20160816; b=nNf+TMgxUeIwfr77jF/l/KSAnjunSbdk/MoBeSaxTV0VweKklh2v0mUwjh1Yex8Kzo K/x0eTtwk6jRMOfPFjnfIYNkukes9c8UVhck9SxIRG66VhxgPA8j7O/wRJIk3PAXi65h xsh6hm8Cv7ct19+RenyscLUhc3KZjmQVhMAjrO1gRBvxMHJSqHIvGbVf1lPHsZkvdUmm eYPpkn2+2VWW+zFwygbARiWIwU22bg1BCWJSXMWO8y9hzuZ7dWl9+nbeUM0I1GVk7a3H JEF1MXd+ZWtrOD/p1ZQdLBZiZd7SZFU5Mz0u/MFWpFBjyJZFXvo0x2wiCdLKtpDGfi2L 5pzQ== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=OdYmfxmhLk4+vClaCguZe9gt4aYiR2MJeDB2pbPXukg=; b=laHrYsQk0OK1eYYHosEOVfxcBV9RIZRAAkQOlpGeEUEiE9BOINjUS6tuXQ649xBHDU SH/R7Y12Sllx859WAcLhlUFsH5Zc2emd+vy/a4NV7R0mV28Lmk/kZ3ma8xA/pbGi4n+5 xxvVGfQDShNcBI2PFmELOjkbGYtrMxIQo3J0SpcBW7Lbwb0QC2DeYVSxvsjk8UlVh5q2 kQgTylgQI0i5c8LlpWQjC/bTpyJSwrKtbSDkEjD0BIcthWRs6ZPANjZxxRCY2u4EgVLw DaLXysrqEX8LCLfsxaQgxBaOvcpPVcqT5vJjmrmjhlfljutmm92HNTtmKc3gc/KfDwwW zhMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gqdeXopt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j9-v6si2166089qkk.228.2018.08.10.12.36.50 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 10 Aug 2018 12:36:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gqdeXopt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:57726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foDDO-0006U6-6j for patch@linaro.org; Fri, 10 Aug 2018 15:36:50 -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) 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-Received: by 2002:a62:c410:: with SMTP id y16-v6mr8293167pff.161.1533929494336; Fri, 10 Aug 2018 12:31:34 -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) 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 --- target/arm/helper.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.17.1 Tested-by: Laurent Desnogues Reviewed-by: Laurent Desnogues 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 = (env->vfp.xregs[ARM_VFP_FPSCR] & 0xffc8ffff) | (env->vfp.vec_len << 16) | (env->vfp.vec_stride << 20); + i = get_float_exception_flags(&env->vfp.fp_status); i |= get_float_exception_flags(&env->vfp.standard_fp_status); - i |= get_float_exception_flags(&env->vfp.fp_status_f16); + /* FZ16 does not generate an input denormal exception. */ + i |= (get_float_exception_flags(&env->vfp.fp_status_f16) + & ~float_flag_input_denormal); + fpscr |= vfp_exceptbits_from_host(i); return fpscr; }