From patchwork Fri Jan 17 18:24:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 858256 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp844867wrb; Fri, 17 Jan 2025 10:33:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVi452XQQIlVsBY/ABusbpO2raNt6OyZUOcKQ5YfZYebM9JVAgCicZ1LaZ+YImlf/3bI2p/CQ==@linaro.org X-Google-Smtp-Source: AGHT+IE3l2JOPedQE6T4zDEWHD/JlxB/1W6yNPvZwPHPSkjkWELTLYnGf56ZWf07i90C+T3abNA1 X-Received: by 2002:ad4:4eab:0:b0:6d8:99cf:d2eb with SMTP id 6a1803df08f44-6e1b216cbbamr64723236d6.21.1737138780603; Fri, 17 Jan 2025 10:33:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737138780; cv=none; d=google.com; s=arc-20240605; b=TDaa83Ad3mC+Io5X0Yzf7fP2aCkPuQyJvuwDk/f/Dq/UCMMnf4v7yncjbdR363UPjv B8JucjgXJw3FykDXgYyTrdB6f5LLo0c9Y7UBWrNaLuBLVvATYtMrUkuDOdUA4fA8G9Cw aYUPEtaFTQXKXn1RCiCemMI3R0uLLpR6LkY3RzQ5tQzgYESp+Q5et+S17k9g6g4MsrqK jY/K8lLNb3BYuolGaiuqPT67J0EZanPtAfX63kQz6YPpXWE4w5Y/jLTEpns0Ihbdd9FT koxI4MgNry5zLFyCqn5XDoMLhWnDbxE0YsXEc9pNRrLpNOwlaMGSLheni6Wt/vlx75Sh 3x4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=GAiwkYkJhNlr+QIGt+u6tAyqiV7uHPYy+16J2GO4X34=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=i4zmZ1J8e9NWGEFH/R2Dea8pR2G4C5A8Nzgismd4/7PMOlh3kjL8CyfvhvkqFYXB5h hSeRL+19RSfSbqMrUBdmc5YCXPu5OjyLfSeKjiO2BxRf4f02TFjrc6JnNc2KR8V2GGNX yuiTTdpnW7oZbKJwXz1vT5OfEr/kSGW7v93AUwk8jlePX9mEK6DZbR53Gu1XVAMZM5Gg hQgscL3EKELMP07EmkrA6b4GAkyzRP24BYlwmPWecH9VQQyx+cbxK3tlnQ5SreQHDfeb Y2QERwjLc9Y2Se+wkLEksek68AFpWVo+rye8sz3I6KungzevXoSyTsuzVZzt5lglYyuY ucOw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HsfBVp2S; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afc19e2csi30875106d6.116.2025.01.17.10.33.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 10:33:00 -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=HsfBVp2S; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYr6L-0000Wc-J3; Fri, 17 Jan 2025 13:29:49 -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 1tYr5p-0006KA-U9 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 13:29:18 -0500 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYr5o-0000LL-4P for qemu-devel@nongnu.org; Fri, 17 Jan 2025 13:29:17 -0500 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2ef72924e53so4221460a91.3 for ; Fri, 17 Jan 2025 10:29:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737138555; x=1737743355; darn=nongnu.org; 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=GAiwkYkJhNlr+QIGt+u6tAyqiV7uHPYy+16J2GO4X34=; b=HsfBVp2SyIyE5i2N/TV+AUFckmV0WK7bpN78XdNdppQz2O16ynrO2SkFOMOYWk2bhF ekEeqr+YmOv7t8GMPy7ZVb8sCgV2xpPNIyDIr3kkBhOaavVF0ZQTaqzNpbCI0r1oXIaK EMX8D+ecLWaKqvW6olySImq8xGHClW8MpTwWGwL8CYxkKwLceIfJg7fHlqzgMDPHp5P3 pEUiRrbGqItuyj73n30JwSvWlSJe4B0Nbn0ONd+0RSR9c1S9PB9hlmoJr783wAR74/IJ jNM/hw0R0n6idRxdGtMW0uuwUQE8v6xr6BOn/zMx7onFwbraCt8aOm0T0jZudsnHS1gG MS8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737138555; x=1737743355; 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=GAiwkYkJhNlr+QIGt+u6tAyqiV7uHPYy+16J2GO4X34=; b=oQEHHy3x+Ib2sCVdWqdRHDbPYobFIVWQtyEZUjrbN+CN0I9fbV1QNxPBS3h1zmbOE/ 4F/dqOshF7P8Vu2G8EGW7alLGhSP6ikQeNzqzCjPQQ2CBzlNMNTUSUGRt6wtc125IlDM qoye6mJumEK/1dg2npU+33P+YJiAtNIEgbjvBzfONREIVhPqD6wFuf/XazXkPSCQsc8a JJgMZeggVm91Ld3zYzVnt3pi/JYlq1D7oCOP6GgwCAUM6Z7ij7TdKhC6ZcJH3O7US/I3 9jH8/pcwM1HTSkR3aHzYOr+MHfYNJHfArQE1U9GO8tITX56CNWaBbH952aSlbzW0OwPz eccw== X-Gm-Message-State: AOJu0Ywcza2hHP44xl12+w0cEIFUjK3cm5mpndR+7L06plpgYfxJKb+V /fBuwgsjwOrEwCk2+AOe3MSEzvsaag8Ggv3tVWjV8XDKN6zUD09dn+ZCKgXuaaRt0fwzzDHxMMF f X-Gm-Gg: ASbGncsHoss7GZXQ5zvpBJNRJJmJWWfvrSlDprPFgyp0r3XKksNqfpHeeJe5sXEj9Ou g3KcV+OrXB85G69H0b6wjZJDOFOixiiejsLnvxJoIOrRxzIUtO+5BRTgfMND9jkMid3AnKIEqkX /PefZR2Wb+ndHe7HOWLqr3GU+FcTEh/v3rBIetFlzlQallSWGOl8qxA9VLbzmuNPaIPNS9TG1gW ucB41midQt3ULuVBlxh85VHfjffAZciz06g1Z6K8XApH91e2eSJSqES3nhTMe/KN7VRWW6pAGZS 2sZ1QAZkh+CD4Y8= X-Received: by 2002:a17:90b:1f91:b0:2ee:45fd:34f2 with SMTP id 98e67ed59e1d1-2f782c62983mr4984856a91.6.1737138554829; Fri, 17 Jan 2025 10:29:14 -0800 (PST) Received: from stoup.. (174-21-71-127.tukw.qwest.net. [174.21.71.127]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f77629bf96sm2614105a91.36.2025.01.17.10.29.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 10:29:14 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 68/68] softfloat: Constify helpers returning float_status field Date: Fri, 17 Jan 2025 10:24:56 -0800 Message-ID: <20250117182456.2077110-69-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250117182456.2077110-1-richard.henderson@linaro.org> References: <20250117182456.2077110-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.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.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 From: Philippe Mathieu-Daudé These helpers don't alter float_status. Make it const. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250116214359.67295-1-philmd@linaro.org> --- include/fpu/softfloat-helpers.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/include/fpu/softfloat-helpers.h b/include/fpu/softfloat-helpers.h index dceee23c82..4cb30a4822 100644 --- a/include/fpu/softfloat-helpers.h +++ b/include/fpu/softfloat-helpers.h @@ -124,58 +124,61 @@ static inline void set_no_signaling_nans(bool val, float_status *status) status->no_signaling_nans = val; } -static inline bool get_float_detect_tininess(float_status *status) +static inline bool get_float_detect_tininess(const float_status *status) { return status->tininess_before_rounding; } -static inline FloatRoundMode get_float_rounding_mode(float_status *status) +static inline FloatRoundMode get_float_rounding_mode(const float_status *status) { return status->float_rounding_mode; } -static inline int get_float_exception_flags(float_status *status) +static inline int get_float_exception_flags(const float_status *status) { return status->float_exception_flags; } static inline FloatX80RoundPrec -get_floatx80_rounding_precision(float_status *status) +get_floatx80_rounding_precision(const float_status *status) { return status->floatx80_rounding_precision; } -static inline Float2NaNPropRule get_float_2nan_prop_rule(float_status *status) +static inline Float2NaNPropRule +get_float_2nan_prop_rule(const float_status *status) { return status->float_2nan_prop_rule; } -static inline Float3NaNPropRule get_float_3nan_prop_rule(float_status *status) +static inline Float3NaNPropRule +get_float_3nan_prop_rule(const float_status *status) { return status->float_3nan_prop_rule; } -static inline FloatInfZeroNaNRule get_float_infzeronan_rule(float_status *status) +static inline FloatInfZeroNaNRule +get_float_infzeronan_rule(const float_status *status) { return status->float_infzeronan_rule; } -static inline uint8_t get_float_default_nan_pattern(float_status *status) +static inline uint8_t get_float_default_nan_pattern(const float_status *status) { return status->default_nan_pattern; } -static inline bool get_flush_to_zero(float_status *status) +static inline bool get_flush_to_zero(const float_status *status) { return status->flush_to_zero; } -static inline bool get_flush_inputs_to_zero(float_status *status) +static inline bool get_flush_inputs_to_zero(const float_status *status) { return status->flush_inputs_to_zero; } -static inline bool get_default_nan_mode(float_status *status) +static inline bool get_default_nan_mode(const float_status *status) { return status->default_nan_mode; }