From patchwork Sat May 8 01:46:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 432526 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp843630jao; Fri, 7 May 2021 18:55:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzO7Q22myzPioXY1dwvz3ZnVxmzrRnUZc+q1HATwreRgNSrngpDvHfJnq6E/nnxIXRggMmz X-Received: by 2002:a92:c952:: with SMTP id i18mr12145721ilq.218.1620438945471; Fri, 07 May 2021 18:55:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620438945; cv=none; d=google.com; s=arc-20160816; b=Oe0QEDWeTXwK6btlEzwK6DQfSfubpxciu9WpoSd1O5s5ROuqKMPjjibP0PYFO8YzKU b1nmKfKtnwZSwgfbCFqKZv6K2k8gB+rvZSA8g8FMnNAv/CZAPtoudaX5adkbazyCLnXb 5No62kkhKTwmwaHBiOdm+14I48oJ8WCTzY94GAFGm5A6shwUCZ/D/kgZ066IXG8HKre0 n+DxnAKPMn0EsUcsXZiUzlkM19Gk4ENF3gom00ef/mftOih05nwsGlhBivS/mn+Fd5cO W/bRGs0N34G2PBJwFatIiRGlmFiz55L3sSRB8/AXcVe5ncwmOr3mJkcQaIdQSTsYUbO0 G2Ug== 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=ZKeNDHnMG1Vsy9FW47wdnzGiSOuMJBBVUnKRaVqfH0g=; b=qaJUEs0tKXyqoAGZ64656VZWcDJD2hdKBDMUARqyH3Otes61TtdnOW+DmO6cG+10ux 9q1YQTWrg+lX44etZgoNySTToG6j6RkJWztafVvKst8PQkIO/7LkUhDn/Hp1sfS1r5md JjfJ0cvln0WoDDLBPLUht3cNbqgHqIurNo9h+tGfXLOZPmoJ6+ifG5LvMFHlgThQz5YB D/+iqWkCUt1YmNqm2oteK23vt74f04NBJbPPwfFtCzGFd7833ldSqJ5Q5Op5h/8YWQlU c5bmpQLhla7H+6SuWAeVb/Jao6c+5rXFr9lbwyhEHOjyPOs/+otXmCiyRovmMWP0h8Ku Kqjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="oO/gx93z"; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g2si7798605ilk.84.2021.05.07.18.55.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 May 2021 18:55:45 -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="oO/gx93z"; 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]:60634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lfCC0-0007Qf-Pm for patch@linaro.org; Fri, 07 May 2021 21:55:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfC4k-00048Y-Lz for qemu-devel@nongnu.org; Fri, 07 May 2021 21:48:14 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:39454) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lfC4h-0003Y6-CQ for qemu-devel@nongnu.org; Fri, 07 May 2021 21:48:14 -0400 Received: by mail-pg1-x531.google.com with SMTP id s22so8628767pgk.6 for ; Fri, 07 May 2021 18:48:10 -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=ZKeNDHnMG1Vsy9FW47wdnzGiSOuMJBBVUnKRaVqfH0g=; b=oO/gx93zWnMzhrE1cdfAndYhjl8nz8nrizqkANgfOfpf2lx6E5OtgHHRzXaKX/YSqH fep+9IzrgiW4e+b9N7oDzxy/+XcYtAaAuFsDceUFL9o4po00+fvc4u7VX8nOnO4BFdkr jU2BgeMVW6ere6EkP0KB90wvehZ6/mdchGidUcDoc3ng6Ac83vHoh5/X0HrSoCl6WN3W rchcF4BdGEF8dqqsoKI+E06Yd78S0aZ0ZYIxJ8flqjxClVkqSRmoPgYZuOQX44kYwU6B Rm8zEuAWeuxHHW810Xu1x1+dknF5DbcHVDYtaIPocebUoqBxKA6JWaGCU9g47hWZwFIG STtQ== 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=ZKeNDHnMG1Vsy9FW47wdnzGiSOuMJBBVUnKRaVqfH0g=; b=Wq3U3wZSE4lxQhU5gtVadPnwzVH5K2t6fiBhjYcXpcih0/vlzZT59Q1sXXwETry23y Jz6qkSikrznGzkEwc3U/Lv/X9nxriTKzyZEO+d5eQ759uZFvPsFGf9J2Qs+aZvk7KYa6 4KSnCSTunuNfms1dBq+mrOXRMto8+W6NDXLPWpukRN8ogPDS6G9w+nWlHx/XEnPwwgCE OOf9ZaZJw9ZjJ7HPHUTdBI04PYxjnzu9cqvFiXDUW8SgVQaS78IPQTzxXLfamONPaZaS rlS6nxnWe7iZJmOR/bipfwwsLZD9+1Kr4m/ons74Bf3WYisYU2YXCEgYuZBiktYM95hA heVg== X-Gm-Message-State: AOAM533deju43w3wQ+6CUWG2y1xTFeNLAXcsSGRSFQ6WJragR8m+zs7I i5raAX1507U5rP9orMgYAivQqsImvjtFeQ== X-Received: by 2002:a05:6a00:168d:b029:23f:376d:a2f8 with SMTP id k13-20020a056a00168db029023f376da2f8mr13455495pfc.20.1620438489723; Fri, 07 May 2021 18:48:09 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id t4sm5819681pfq.165.2021.05.07.18.48.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 May 2021 18:48:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 09/72] softfloat: Tidy a * b + inf return Date: Fri, 7 May 2021 18:46:59 -0700 Message-Id: <20210508014802.892561-10-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 Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" No reason to set values in 'a', when we already have float_class_inf in 'c', and can flip that sign. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- fpu/softfloat.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 93fe785809..ee4b5073b6 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -1384,9 +1384,8 @@ static FloatParts muladd_floats(FloatParts a, FloatParts b, FloatParts c, float_raise(float_flag_invalid, s); return parts_default_nan(s); } else { - a.cls = float_class_inf; - a.sign = c.sign ^ sign_flip; - return a; + c.sign ^= sign_flip; + return c; } }