From patchwork Thu Dec 16 20:24:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 524527 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp961200imb; Thu, 16 Dec 2021 13:13:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJOM3KsH9mIgHjHc0bqCHeqRrWf3JqjFrefaPgy8A0t72mTNRVYv4gztJEDfzD/25lrBUj X-Received: by 2002:a05:620a:3191:: with SMTP id bi17mr13655878qkb.266.1639689201712; Thu, 16 Dec 2021 13:13:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639689201; cv=none; d=google.com; s=arc-20160816; b=y/ZrdJ22h8j7y3kvnlxiZ5TTstM8WbFh/GJtWoX/zmktzwBby5gbxfvDjAildMx00u suCmv0Tm7vq2dZpwAQJ/YE8MM3pELBlaNR3kzqlutP/wFir/6pAzkgHQmI3ohMafiUqD JwDHbOMdUC5W1p/IGt65F9VpQ+bBKNait9x+3EoiEbbeBKIrBsQxb1nvDrtGoZ5wxPiy Ujv5xO+JDZsIUBffXwcsSJNpcF0pA3H/HqOvtH38jNzHQaXOsG9hO/XiL3UPiBb/P9Cv gJ2JewWQPTNBmpJrpNjUaUiWpxcn5Xp0B0ByXa5UwojB2oZq6FJkTGTEeuzbWp8cPYYl yBEA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=4MHsUUzYmX5/xuRGtF58vVBngq87YP85srB3Cuq1gT0=; b=ZrnUlaGafZOHeXmy5iIcQgWSpCr8EmPkjwv/1ZoQ8IStJwTSmwuEseQ5vkthBi1bdd F/fbI4W9E+KwdjkjhL45JPMUncVm/e1IH9r6DLTCzHV6tRKErwT1NniYjKBGM1qzhCJ4 6hocLuCyH/dOAnKpcABq4FPGz/BOlOHDZBapta2TFI26HS1IvVYFfBBdTQibrl2726Dz n3MmDSra92lOY36+sqwPf+dEzfjSrCFMNF82K8zBmJMO3AzEyF6RD67Cq1hI4IvdMmkf xOIv292rpIVmlYbzNabgttN/C18mo2FBDGrOchMJAtJBFAcwVF42myalt7N3U1ImgcQj nL9w== 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k128si2769269qkd.668.2021.12.16.13.13.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Dec 2021 13:13:21 -0800 (PST) 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" Received: from localhost ([::1]:58814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxy41-0002Nb-3X for patch@linaro.org; Thu, 16 Dec 2021 16:13:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxxLU-0002TO-9E; Thu, 16 Dec 2021 15:27:20 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:18658 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxxLK-0007MD-4r; Thu, 16 Dec 2021 15:27:15 -0500 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BGJSf46015057; Thu, 16 Dec 2021 20:26:36 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0b-001b2d01.pphosted.com with ESMTP id 3cyhym16s4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Dec 2021 20:26:36 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1BGKC8A7028570; Thu, 16 Dec 2021 20:26:34 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma02fra.de.ibm.com with ESMTP id 3cy7sjt0ct-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Dec 2021 20:26:34 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1BGKQWli40698344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Dec 2021 20:26:32 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 44E334C04A; Thu, 16 Dec 2021 20:26:32 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0AA564C044; Thu, 16 Dec 2021 20:26:32 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av22.portsmouth.uk.ibm.com (Postfix) with SMTP; Thu, 16 Dec 2021 20:26:31 +0000 (GMT) Received: from yukon.ibmuc.com (unknown [9.171.48.122]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id 5EE38220238; Thu, 16 Dec 2021 21:26:31 +0100 (CET) From: =?utf-8?q?C=C3=A9dric_Le_Goater?= To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org Subject: [PULL 021/101] softfloat: Add flag specific to Inf - Inf Date: Thu, 16 Dec 2021 21:24:54 +0100 Message-Id: <20211216202614.414266-22-clg@kaod.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211216202614.414266-1-clg@kaod.org> References: <20211216202614.414266-1-clg@kaod.org> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 43_QSTMmuzRVtCUXVCe5Cmi38Yrf5OBS X-Proofpoint-ORIG-GUID: 43_QSTMmuzRVtCUXVCe5Cmi38Yrf5OBS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-16_08,2021-12-16_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1034 bulkscore=0 mlxlogscore=786 mlxscore=0 phishscore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 priorityscore=1501 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112160109 Received-SPF: softfail client-ip=148.163.158.5; envelope-from=clg@kaod.org; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 5.0 requ) BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.399, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Richard Henderson , =?utf-8?q?C=C3=A9dric_Le_?= =?utf-8?q?Goater?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson PowerPC has this flag, and it's easier to compute it here than after the fact. Signed-off-by: Richard Henderson Message-Id: <20211119160502.17432-3-richard.henderson@linaro.org> Signed-off-by: Cédric Le Goater --- include/fpu/softfloat-types.h | 1 + fpu/softfloat-parts.c.inc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index 65a43aff5970..eaa12e1e0033 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -152,6 +152,7 @@ enum { float_flag_inexact = 0x0010, float_flag_input_denormal = 0x0020, float_flag_output_denormal = 0x0040, + float_flag_invalid_isi = 0x0080, /* inf - inf */ }; /* diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc index 41d4b17e4190..eb2b475ca466 100644 --- a/fpu/softfloat-parts.c.inc +++ b/fpu/softfloat-parts.c.inc @@ -354,7 +354,7 @@ static FloatPartsN *partsN(addsub)(FloatPartsN *a, FloatPartsN *b, return a; } /* Inf - Inf */ - float_raise(float_flag_invalid, s); + float_raise(float_flag_invalid | float_flag_invalid_isi, s); parts_default_nan(a, s); return a; } @@ -494,6 +494,7 @@ static FloatPartsN *partsN(muladd)(FloatPartsN *a, FloatPartsN *b, if (ab_mask & float_cmask_inf) { if (c->cls == float_class_inf && a->sign != c->sign) { + float_raise(float_flag_invalid | float_flag_invalid_isi, s); goto d_nan; } goto return_inf;