From patchwork Tue Mar 7 18:34:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 659819 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2540520wrb; Tue, 7 Mar 2023 10:35:51 -0800 (PST) X-Google-Smtp-Source: AK7set+g7xqWs/8IUmcA4AQZfGTtIJsHacBZdj/mbJ7YFzqcnISuW9GoHxb/Q8CNm2pEz5mzDt1c X-Received: by 2002:ac8:7c4c:0:b0:3a6:8f7c:5936 with SMTP id o12-20020ac87c4c000000b003a68f7c5936mr24815571qtv.25.1678214151627; Tue, 07 Mar 2023 10:35:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678214151; cv=none; d=google.com; s=arc-20160816; b=BELu/Nag2GUgd5z2Ll4IY1wE1dzJcY0DaAk2quMTfdK2AkUMcU4Q8luLvmRKW6rn+/ CHriybIKxnsbxzXJlrmoUcxIiO4IPxsNtBZLvkZ8i74YUPHtytb9p4sr6kNBRkprSXHd ATZ2e5lS5fg66Mm93hjiGcGFReZHqZhG2YLMKS3BeLX5EznTeNlJoWYgFEu5q+DG9nMl 27gB0CX3LEWN5t/Xk3BRGJRy9O0CjCxWLF+BwLtTtqtNesNw7vnfb168IEO+03knBto1 lcleQYulfdSCBCmmOJP89SN7HS9uLyfKgiV0REl+YGf0BEm5yv28QJx2i76cdGxK6rHL OPeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=LvRzWvVDOx/4mw8Xks+yN45owXOLBfvuaq+ouOQwf5k=; b=C3gNejqPldNLys/y63IbadlKxhiR4D265AyBISm2FBV0Y/tUhXZMXebm4BD8ZUbzJq j1rZaO9i6mkY/Un6qfUBV89hUZRL47o3maCj7PZPxchInYnNLpCtrlOFmmtht8iDRt45 6Iim3f+fUgZFb+uVAt4I70cDb7SfZ5EfrRKF3YB4HFDGde2hl6ulUjeeuExqHy0nBYX+ 6SAL/wqmdoJFAEm/zHiPbkHfa7SB5s5Mq+vWMbPNm/ENODpMHNLE1010/a5iYMHcNLcK PX4E08fxInyareyDy0rv2+7x+FcoPr2DfY2fdJPnneFkAJdrSKNbi4gNLZCpg9KO4fYD F1fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DLrYTU0u; 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=pass (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 u14-20020a05622a14ce00b003bbef811bf5si9753904qtx.294.2023.03.07.10.35.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Mar 2023 10:35:51 -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; dkim=pass header.i=@linaro.org header.s=google header.b=DLrYTU0u; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZc9W-0003X5-69; Tue, 07 Mar 2023 13:35:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZc9V-0003Wm-Jp for qemu-devel@nongnu.org; Tue, 07 Mar 2023 13:35:09 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZc9T-0007hn-FI for qemu-devel@nongnu.org; Tue, 07 Mar 2023 13:35:09 -0500 Received: by mail-pj1-x102d.google.com with SMTP id l1so14146221pjt.2 for ; Tue, 07 Mar 2023 10:35:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678214106; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LvRzWvVDOx/4mw8Xks+yN45owXOLBfvuaq+ouOQwf5k=; b=DLrYTU0uW0rxfmTKIOrGTG7NBWEpH9QlQDGYadQ3j7DQb6GmBqgq0RrdkPy7c48RI8 fig/YstyFwB41YL2wf0d9tul/V6v6nTXgA6emezRblGzoi1Xc9phYFUxOnYz2/fZR8Ul 3mxWB7WevvuxKn/A53nMoqofJHj14zGO0bQ3EtZBQa+TAuFZBxQBUydbq5+ith5wzXC6 pVsFPd8wugYI/lBYafxg/ki0dIGP3NZYEIpVytF1bpzZPzkkBawPVRDNNOwr2FbJmcmW NNBej5s3tZRJN+R2fo1ZlQG6co0IuRITdEfBTbW+mxR0gCY/6rblA80bMAk7X8R1wdPU aXXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678214106; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LvRzWvVDOx/4mw8Xks+yN45owXOLBfvuaq+ouOQwf5k=; b=PPkrk8LZqfscLEupZ/vZG3QJjyRdknkJENkFUcXfz5kj9VsasqAHHc5ARcDtLACkAK 5ySYnojZ8PLeAH1tVaQDaqpeSgf9//5G68suBrGNlEJsVskzzKQ9Ae4YkhFxn/wFTM8y 5wGWnJUE13SRXwn4BXlpeG5lJIE7luJqzIFzf7Q7UU0YhCk830gbJGQ5+4jojD9HlYrJ KeRLBr3bjGp+6IATOqyqp4fgOkyLWELDCEbqzqOhGHXojDl+A88MbNBSvzN3LmSfW+s4 eO6WcLahOHDwTLprXwKxcJCf18tVHnTwrC1V569+ZYvtnwgbNm3AWpe4CcA7GwMoXAPz vRng== X-Gm-Message-State: AO0yUKVhsyZ3KyGpqAMvNHvj3XYWZm2eRNZBL6zs2sMiSbPBcM9IR5Lr 8uEE5U/p8hgV8YnGj7Qt00BrT7DzyAKd5naEfs8= X-Received: by 2002:a17:90b:3907:b0:233:f447:1271 with SMTP id ob7-20020a17090b390700b00233f4471271mr17353226pjb.43.1678214105797; Tue, 07 Mar 2023 10:35:05 -0800 (PST) Received: from stoup.. ([2602:ae:154a:9f01:b1e0:bfd9:8b1a:efeb]) by smtp.gmail.com with ESMTPSA id q1-20020a17090a1b0100b0022c0a05229fsm7757940pjq.41.2023.03.07.10.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 10:35:05 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH v2 02/25] target/arm: Handle FPROUNDING_ODD in arm_rmode_to_sf Date: Tue, 7 Mar 2023 10:34:40 -0800 Message-Id: <20230307183503.2512684-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307183503.2512684-1-richard.henderson@linaro.org> References: <20230307183503.2512684-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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=unavailable 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While this enumerator has been present since the first commit, it isn't ever used. The first actual use of round-to-odd came with SVE, which currently uses float_round_to_odd instead of the arm-specific enumerator. Amusingly, the comment about unhandled TIEAWAY has been out of date since the initial commit of translate-a64.c. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- Cc: qemu-arm@nongnu.org --- target/arm/vfp_helper.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c index 24e3d820a5..90cc324f71 100644 --- a/target/arm/vfp_helper.c +++ b/target/arm/vfp_helper.c @@ -1111,10 +1111,8 @@ int arm_rmode_to_sf(int rmode) rmode = float_round_ties_away; break; case FPROUNDING_ODD: - /* FIXME: add support for TIEAWAY and ODD */ - qemu_log_mask(LOG_UNIMP, "arm: unimplemented rounding mode: %d\n", - rmode); - /* fall through for now */ + rmode = float_round_to_odd; + break; case FPROUNDING_TIEEVEN: default: rmode = float_round_nearest_even;