From nobody Fri Dec 19 17:14:51 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1594079339; cv=none; d=zohomail.com; s=zohoarc; b=SFseRA0q/ZE49WCZszmImR14mnAE/mN8dkI7kIS9R0y7LRsTs0LzzZaf7sYq6qsZ9IjUiTLYSFSQdWiigBMGEJEirKgB/f/+q91uxY4p4DMPIRKt+vewjH2oubQPKhuzYP6ub6CYOGSQi9fYniGPNx9CJCnbzR6/B8YI65QIxzE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594079339; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BGXGCD6zrewH9FPgdNPWGPrbye7T6uSjNY56yD55Vis=; b=mPW+qMeBkj6lgzLDRXGyz4KNBuF7hlTp/qQ/k1vwlI2ESstOipUACZgjekSZ28Qo0RkloMhiuQKZyMnKzgsHIESsjvWTstl+GeWU0CkIV6/N2Wy10EberDcM0t36MI70chi/Lep0iGz8ACq6HHc0QPLSjBPPi4V14Ikq07wvalQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1594079339459107.06972866980993; Mon, 6 Jul 2020 16:48:59 -0700 (PDT) Received: from localhost ([::1]:36714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jsar4-0002Uv-9W for importer@patchew.org; Mon, 06 Jul 2020 19:48:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jsaq4-0000pK-W6 for qemu-devel@nongnu.org; Mon, 06 Jul 2020 19:47:57 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:39880) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jsaq3-0000oS-Fn for qemu-devel@nongnu.org; Mon, 06 Jul 2020 19:47:56 -0400 Received: by mail-pg1-x544.google.com with SMTP id z5so19121449pgb.6 for ; Mon, 06 Jul 2020 16:47:55 -0700 (PDT) Received: from octofox.cadence.com ([2601:641:400:e00:19b7:f650:7bbe:a7fb]) by smtp.gmail.com with ESMTPSA id e15sm19647649pgt.17.2020.07.06.16.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2020 16:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BGXGCD6zrewH9FPgdNPWGPrbye7T6uSjNY56yD55Vis=; b=tNXhf0jFshtSUnNa5Qem6m0ucSEilZjvfVj8C43G7wFXPhKd24gAsZ7LTzB+uoOqIw 0sUEkmGui+CTH2zuQSG9T2iOGSnOt7GCAx+XyrA3zUrTdhTF6CJKoKw3uQUFLjY1j9Ts Qf12GrxMJjPd/lfH+wq090fFxCoYLA+9alT6m5FAQ098jPqpDXOhgSdqiieRQ1pgVC3r Uyx89EuYp7G6lS/YR9uO8rDewrXT74e41PVWqMIGO7cqu0SiJsaNjCJQ8Anud6+KWr86 EHj0hRa+h3hcQiuY2iqNaTxFQdhh5BudBtRfM2qEPL+RsWphd3cKKxnJBY5pGAbqyvwW uD3Q== 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=BGXGCD6zrewH9FPgdNPWGPrbye7T6uSjNY56yD55Vis=; b=itc+aOuturOwz0/Y7bW2XTP5l/iIkRtl56Cwq45WkPyRO3u9TVOM1u4yIqabifcpuf Aqmlp96rBkyQESvaQgpVJq8WvbIqB74lOj6QcW+R8SX4unIB4sBFNqU3GfazA5NOyKSN gwZeESx7S5MmyO/cpMiawxKU3NA5QMPXfleqgVuH2lwXfAC7jVyDwnS9n1Rx3rsSRB/i y00UarFO6huVtUzc6e2a7MR3hV6vWUkvpqFYKwTyXC/zMfsQjSBWMwnL6kErzX16onIj z0j+WxK+VkKB4i0wLgByC8sIaZTSHqjicoL/g+XuaBxjY3Z3RNkaJFJ4gu2EbHZdLrVK c6vg== X-Gm-Message-State: AOAM5338LBfCvkkN4lVr29P+0asJUYAull4q6laj6O6F50fRS0fmBqSn aLvTp0GvIQYkCQdNaqRdtRtNtWyn X-Google-Smtp-Source: ABdhPJxm/ToJ+zxnFXF6U8i1jVZ8pYiSZbgCL11LVkvSLC20JN+ny9ZakYQxI4rFdJdxxxQDQeFWgQ== X-Received: by 2002:a63:3f42:: with SMTP id m63mr43552259pga.310.1594079274122; Mon, 06 Jul 2020 16:47:54 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Subject: [PATCH 03/21] softfloat: add xtensa specialization for pickNaNMulAdd Date: Mon, 6 Jul 2020 16:47:19 -0700 Message-Id: <20200706234737.32378-4-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200706234737.32378-1-jcmvbkbc@gmail.com> References: <20200706234737.32378-1-jcmvbkbc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=jcmvbkbc@gmail.com; helo=mail-pg1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FROM_LOCAL_NOVOWEL=0.5, HK_RANDOM_ENVFROM=0.001, HK_RANDOM_FROM=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Max Filippov , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) pickNaNMulAdd logic on Xtensa is the same as pickNaN when applied to the expression (a * b) + c. So with two pickNaN variants there must be two pickNaNMulAdd variants. Cc: Peter Maydell Cc: "Alex Benn=C3=A9e" Signed-off-by: Max Filippov Acked-by: Alex Benn=C3=A9e --- fpu/softfloat-specialize.inc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/fpu/softfloat-specialize.inc.c b/fpu/softfloat-specialize.inc.c index e17327b405c5..6b07d50efad3 100644 --- a/fpu/softfloat-specialize.inc.c +++ b/fpu/softfloat-specialize.inc.c @@ -574,6 +574,24 @@ static int pickNaNMulAdd(FloatClass a_cls, FloatClass = b_cls, FloatClass c_cls, } else { return 1; } +#elif defined(TARGET_XTENSA) + if (status->use_first_nan) { + if (is_nan(a_cls)) { + return 0; + } else if (is_nan(b_cls)) { + return 1; + } else { + return 2; + } + } else { + if (is_nan(c_cls)) { + return 2; + } else if (is_nan(b_cls)) { + return 1; + } else { + return 0; + } + } #else /* A default implementation: prefer a to b to c. * This is unlikely to actually match any real implementation. --=20 2.20.1