Message ID | 20210508014802.892561-64-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp863191jao; Fri, 7 May 2021 19:32:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIyf7ip75FPpT56E5pCw9f7i920wrujAtU+sQ6PBE+umWdsdHnb6Ti+nntBgKsK6m023nE X-Received: by 2002:a02:7410:: with SMTP id o16mr11735699jac.37.1620441129995; Fri, 07 May 2021 19:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620441129; cv=none; d=google.com; s=arc-20160816; b=BLl9Q/geQCTMp++t6kgbAbyKAiiSVDcuy+mpso4Uy2Z1dE6gqfJmY2uZORZA4WuOCK HXar1zkVXIsENgOQG5DVe+vW3kb/mW4d4rUrO2oHVPq82EyG7SeufvIWrN+RcTR/Dfjd vGc+Vo/MQeRe5tEK2r/3zx28vmyFV9DJ2V0quIhLE602ucsM/wz4qNuDeJXGlv+Qfnw7 9mmmA7GxZsqNwFeeSzg7YMyc5DGn3fCfLU+PiDc/+RR2/YRkalekza9pqhTyon7IXOtv 7JMYJQtYai0M0aAmcRHetGRs9Ej/UtMjmH8f5TFXpGR0Iy6ORfVmpT9c9cu2jlPiIIVT 1R8A== 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 :dkim-signature; bh=ObkIztaGC6a7pVE6TIEKtyoNhb2comi6sJZolj2TpM0=; b=jDa9zzePcHtmWORRapVDCl4uaZno+nmOD9lt2t7BbbkpzRobsFcX7ahzv4Tj0zqkR6 6BE9mOgfi1QQir4agXPi0CWSSPMfoWpbVok/u1SDSITn2GMRlreM7YsTfBxUaXerQoGP ZCX254sM8BBpAFnqKP2TJbhx7KI4sX05XGmOuH+7idpKSOySJxsw3MkqJhd7zeSgrB6l 3vVmkew1MFlpuM/28nKZ0JID9HvFnJRnFFSMbVA1tNVaMys/13G0U/IxoNJhYLbJ8CR1 su2z7HB3vIEMgCGx8+4Z1pQ7Zc7QyCiefhYrIAOJjhJOlxxNxqKoaLl1pwNs9O0z7zry ih0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rbRUCdLx; 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=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x9si9310921ilu.119.2021.05.07.19.32.09 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 May 2021 19:32:09 -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; dkim=fail header.i=@linaro.org header.s=google header.b=rbRUCdLx; 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=linaro.org Received: from localhost ([::1]:48376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1lfClF-0007yM-G0 for patch@linaro.org; Fri, 07 May 2021 22:32:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1lfC8I-0003VJ-PR for qemu-devel@nongnu.org; Fri, 07 May 2021 21:51:55 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:34613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1lfC89-0005Yp-WB for qemu-devel@nongnu.org; Fri, 07 May 2021 21:51:54 -0400 Received: by mail-pj1-x1034.google.com with SMTP id t2-20020a17090a0242b0290155433387beso5537904pje.1 for <qemu-devel@nongnu.org>; Fri, 07 May 2021 18:51:45 -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 :mime-version:content-transfer-encoding; bh=ObkIztaGC6a7pVE6TIEKtyoNhb2comi6sJZolj2TpM0=; b=rbRUCdLxtG+ui6vz1v7bVF1YZKfdmtggHIGUQ6yARpVwNwXRPcrnL6qh6xDn45teOI Icfdox8YzKP5nTSO8JUPlrONgr+GfQBh9uVkvLiFqqR6/364pQszstyrolN8N6RSCHgg EjnKXtmuk2VuboluTtATNF5AWthKr+/MLye8fKUMhkwXFr5A9tsDSqlZepp6EcM5kn2R AClbUJmWPH0A+zoItJ/IamBxE/Ru9VvFl7EdV9oJmkBcwjXbnUkSVv6xPPK2GpIc0MOq J91MA1OSizSjIN0ckq467dWfaoK6FelCKjmGZBHNzTZcSVSu+yfqJLMmwWXcICBNOJC1 /fgQ== 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=ObkIztaGC6a7pVE6TIEKtyoNhb2comi6sJZolj2TpM0=; b=SSk4qdzlrzkNA9C4pGIDRtO1HMJYQAxpz2S1BTZdhpTKZxO6qc0Y9G6lDC47rRKuwq 7x+gz8xdYTNQCtiPaPAvKjakv2i0Rjz+n2bpja//24ZeIL/eHYharafO8OYB6rLyuKJP UpScfx+zX2x43qKMrM4KqMpaRqvH0FmSXH/xWOHite8vJoT4oN4ma8S+I92JdnvE2BVZ kyjrDhrmPaZFhBhuHDW1X3iLxfRnjghuTtnO8x0CA6i/cRXgqWyjNLiZLjp9AlgPe2p1 An0JcKmrnygIpSMBN/dx4OyJYt2cDOPMss/wwTszAZXSa1ZivyXKy4SBGWWFafxgK4YU T7zQ== X-Gm-Message-State: AOAM530KODKB+tlM0vF8NorgOiroGvY/oKmjqqLKTek//3w+2CIxztJe lOUC/HL91bSXUODkERbThEnrtVmjOGjl/w== X-Received: by 2002:a17:90a:7605:: with SMTP id s5mr25617979pjk.166.1620438704731; Fri, 07 May 2021 18:51:44 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id 204sm5861396pfw.158.2021.05.07.18.51.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 May 2021 18:51:44 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH 63/72] softfloat: Convert floatx80_round to FloatParts Date: Fri, 7 May 2021 18:47:53 -0700 Message-Id: <20210508014802.892561-64-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210508014802.892561-1-richard.henderson@linaro.org> References: <20210508014802.892561-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: alex.bennee@linaro.org, david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
Convert floatx80 and float128 to FloatParts
|
expand
|
diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 7050d8f012..faccc8df41 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -5794,10 +5794,12 @@ float128 floatx80_to_float128(floatx80 a, float_status *status) floatx80 floatx80_round(floatx80 a, float_status *status) { - return roundAndPackFloatx80(status->floatx80_rounding_precision, - extractFloatx80Sign(a), - extractFloatx80Exp(a), - extractFloatx80Frac(a), 0, status); + FloatParts128 p; + + if (!floatx80_unpack_canonical(&p, a, status)) { + return floatx80_default_nan(status); + } + return floatx80_round_pack_canonical(&p, status); } /*----------------------------------------------------------------------------
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- fpu/softfloat.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -- 2.25.1