From patchwork Mon Apr 1 20:58:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 161569 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp939432jan; Mon, 1 Apr 2019 14:05:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpb7tqmZSrcBBRc0Uhhqdfz4zdY74VXKjByDh4K7ES0mPz5Pocboz3saYoxGPmwMv1RCKW X-Received: by 2002:a25:9387:: with SMTP id a7mr55360403ybm.380.1554152742317; Mon, 01 Apr 2019 14:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554152742; cv=none; d=google.com; s=arc-20160816; b=EIz6R+9YKwWmIhrnfgX3yUnAjFXfcRypdconBuI8wTivDpo8eo2Cfz0/EJI0bSrZFH h1cVLV6LDUsUezWAAOWd1pSYt6pnaqx8JXvV9/SIMLXOXCMjZc43SI5SA8GpUFcvSnvj kVFm+6HznytDAjcDJ/ahmQ6zHg35lKL0k44g05LyEk8AyG7sP92WSaaRME4QJ9UuwusR 2rQQu0BH2R82QouyN3OwbxDGf0fD75xjnhNdaFwNnNllNkinYfSUfM4zMVdxjN+9zv+Z mLFKZqK39jcp8EM0axxz1LqyZBXccZFg3BOq0wszvMYgw14aUX9bbZNE2Zpjouv8HHgU 76jQ== 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:message-id:references :in-reply-to:date:to:from; bh=WQKUMd7P2A8nZcVLuZL6vScGwWcpKPUbH08ZQDc1Ick=; b=youR9+v/MwZM2i49jz3wUBNInMD6u1kzIFGsXKJ3TX7yQCN00Ce02rGaeYDVTij10m DxIEOuc9OvG7rOud5arq4+7CZ5gwgwHTLH4B0gMhDBrL9YMJ2ZC52uN40MTT9+X12jCO gifp5NAwQL2PrH6UdL4H6MHDVQsq4rWWcj7NGGR0ILKGMP4Hwx1xawUQ+81f2MVneyJn XZrXl7pKPq08ZpGWxBU4RX1Uic3FI1PGB9dfoKhQV7tKlRWCUbyx2HO9GbSeAFaQDN2e +kGahdePiFOTbQFHMxeiAMds/g8dPxlmOhVxkGkGRld2yCqCVllfJ6weKlM98PNhVa7F WALg== ARC-Authentication-Results: i=1; mx.google.com; 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=ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 205si6586273ywg.369.2019.04.01.14.05.42 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 01 Apr 2019 14:05:42 -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; 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=ibm.com Received: from localhost ([127.0.0.1]:38370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB47h-0003wq-Og for patch@linaro.org; Mon, 01 Apr 2019 17:05:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB43v-0000o2-WA for qemu-devel@nongnu.org; Mon, 01 Apr 2019 17:01:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hB43u-00032l-5v for qemu-devel@nongnu.org; Mon, 01 Apr 2019 17:01:47 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58174) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hB43t-00031H-GZ for qemu-devel@nongnu.org; Mon, 01 Apr 2019 17:01:45 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x31KrVht035181 for ; Mon, 1 Apr 2019 17:01:43 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rksw4ryj4-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 01 Apr 2019 17:01:43 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 1 Apr 2019 22:01:42 +0100 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 1 Apr 2019 22:01:40 +0100 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x31L1dT154198284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 1 Apr 2019 21:01:39 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67BA4136055; Mon, 1 Apr 2019 21:01:39 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 31162136053; Mon, 1 Apr 2019 21:01:39 +0000 (GMT) Received: from localhost (unknown [9.80.94.43]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 1 Apr 2019 21:01:39 +0000 (GMT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 1 Apr 2019 15:58:48 -0500 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190401210011.16009-1-mdroth@linux.vnet.ibm.com> References: <20190401210011.16009-1-mdroth@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19040121-0012-0000-0000-000017211EAB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010857; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000283; SDB=6.01182941; UDB=6.00619269; IPR=6.00963683; MB=3.00026249; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-01 21:01:42 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040121-0013-0000-0000-000056B7C3ED Message-Id: <20190401210011.16009-15-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-01_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904010135 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 14/97] 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: Peter Maydell , Richard Henderson , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson 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 Message-id: 20180810193129.1556-3-richard.henderson@linaro.org Signed-off-by: Peter Maydell (cherry picked from commit 19062c169e5bcdda3d60df9161228e107bf0f96e) Signed-off-by: Michael Roth --- target/arm/helper.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/target/arm/helper.c b/target/arm/helper.c index c2287c76e5..991b077e8f 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -11283,9 +11283,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; }