From nobody Mon Aug 24 00:37:52 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1779297688; cv=none; d=zohomail.com; s=zohoarc; b=ESUxRfx6EmN861MgUd0oxDq+JTkboG7sjdLFbhMdafcG/95O6WguqiVKoDrYftja/InxroqsrpD/Vh9rUvqXAYCsMUuCr6imSlK6aTzJH+HEFC4kRTxeXaMNMznO3AsSsDB1XmKjY9NCggzzTy5pOamrlmBD4CXZl3+ySdTuAPQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779297688; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cZFFZPDMpbzdsj37a9/p1FZxebig9+4EbrHozdK8lKs=; b=VrreMxJF19dggT7O/OLIEh5FsJ7UAlxTQV1CFHC0GsGD+BfKuifLpF98IfH9l2ufeQkRvsGrRSDL6Z8xjWvVBZbfNr75S7Bui8lgB5qwObPWbI/Xrp0mfrqKm8rLG68jUW+aekAONfEqtsp2Wy88fSRR8QyrCIZj1hgiIja23+I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177929768841275.7040363927565; Wed, 20 May 2026 10:21:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPkZU-0001m2-2y; Wed, 20 May 2026 13:19:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPkZE-0001a2-Sl for qemu-devel@nongnu.org; Wed, 20 May 2026 13:18:48 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wPkZ8-00020q-AQ for qemu-devel@nongnu.org; Wed, 20 May 2026 13:18:48 -0400 Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-3697f25d26eso2646479a91.1 for ; Wed, 20 May 2026 10:18:41 -0700 (PDT) Received: from stoup.. ([71.212.142.33]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36a3c83f226sm254416a91.0.2026.05.20.10.18.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 10:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779297521; x=1779902321; 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=cZFFZPDMpbzdsj37a9/p1FZxebig9+4EbrHozdK8lKs=; b=FGBHIIsWjAWHTiYfsJzsz7B1BL+Mh13/bavrT+MWum8lksazwMyMjnN3FiCrns7fhp D6VsvfP5oxeg/P6xq8v3IILet2ZkafpZOcXGz/fmSPYqZ7HoUz78vASQPgKPGcruzHqC JVvOz0KNiopJP8TIaDfl7O3XQh9lzXWP9XBck6JvEU9W+rDAsK12IxmEK9dkCcjeIbKd 5JzEimVk0VhUMjz8ZpM6Q8OuJJQMP3gyn0QL0yyE9sSrAwRWllTHgiL1N+Ul5ZjdVnsx rzO96Obf94zee0MIh7OCfOTOOE04YnxvfnZ/8yKQC+A7NhUo+R8RJ46xg388rIbGcMqP X1pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779297521; x=1779902321; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cZFFZPDMpbzdsj37a9/p1FZxebig9+4EbrHozdK8lKs=; b=ov21kiY6e9+Vevse2nfGzGXbIBKt/LYYn1uX+IyqxYGqn2ghzba50s/bgqMwwFtKmh hhKbTIFxkFDZfHuxfxcyBvD0WkSxHG6kwk+35gv0anGoypdkeqmRtSi0L7IrGPNZ6rRR dXpayvYm/dTyjBDG3EUeeI0RHtDzk5oWvLFxHo8M02/TaeeixxxC0R9n/SwBjW6/+MXx 04sZgZj1aUsD2IV23mkoO4d0eb8nsHTfPT2VuEtrVivCDaNBIBmIE9nic2LEGxnpsL2U TLGkKmn9ljkbCvH1Q8UDEOOp3wLpf8yQXl4QxaT+CYNnr6xkLsdo/YjazkEhOnvGHH8L 99qw== X-Gm-Message-State: AOJu0Yy5Cw6mrVwJGQyizifFLRK1t0X0fuCabuVMDdY5/7YL8DE1Xa9a NoA0rnIVN7IPs6r1AJ77cUddT6zi5RiYT9pnC4XCe656hkqnjpEQcsab9yqms0CMTEmMQJ0XYzC QlTeomyY= X-Gm-Gg: Acq92OFoSYfZcezPSn0JjPUL3DBjBwg2k2Lehnw9a18uBi9Iw6KJphH/5C3ITQM0mlX WxNWkD2kLqkhX5qJdUcrx3UaxCf1PwYnPiJ0e0PlT2k+u9+kwsvvYxHOauhezBBbsgIO4YwU6iq EMrikZz4Fea2oqNDHvRTvPM+0ri4/M0tZRkaLXVk4LJhMe74nypv7UlKALNSMD9sOZ/OHLglD0A uTbsLo5HLKQhmESE1V12OdWbGgbSgugfH4TmrFSlF9joUZxIuLFz6PC3GXoSDA46tBeAEMSsu6p Elmb7cIFU9JvvfpmdRW8XHKdn47F9d7AlObLESKZsJxp8HB4xQ4k4pZLZNfDDOorrhjucNHh/oE xCba8TQ4vB46pL8/qZReXUGZIU33zQhw9IEJjVJSwSV26gmRQ5cZBfypklBKheC/eQGUbk60nOI pysNO9FI/txSlGVXySJJGDR68YEoe3K3n9uo1fLdE= X-Received: by 2002:a17:90b:2f08:b0:369:996d:282c with SMTP id 98e67ed59e1d1-369996d2ea1mr16182128a91.9.1779297520833; Wed, 20 May 2026 10:18:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v5 27/30] fpu: Reorg float_status Date: Wed, 20 May 2026 10:18:17 -0700 Message-ID: <20260520171820.848839-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260520171820.848839-1-richard.henderson@linaro.org> References: <20260520171820.848839-1-richard.henderson@linaro.org> 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=lists1p.gnu.org; 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.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1779297691460154100 Use bitfields to compress float_status from 18 bytes down to 8 bytes. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/fpu/softfloat-types.h | 53 ++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index 67b7f38aef..c5a6684763 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -327,7 +327,7 @@ typedef enum __attribute__((__packed__)) { * This is a flag which can be ORed in with any of the above * DNaN behaviour options. */ - float_infzeronan_suppress_invalid =3D (1 << 7), + float_infzeronan_suppress_invalid =3D (1 << 2), } FloatInfZeroNaNRule; =20 /* @@ -402,22 +402,39 @@ typedef enum __attribute__((__packed__)) { */ =20 typedef struct float_status { - FloatExceptionFlags float_exception_flags; - FloatRoundMode float_rounding_mode; - FloatX80RoundPrec floatx80_rounding_precision; - FloatX80Behaviour floatx80_behaviour; - Float2NaNPropRule float_2nan_prop_rule; - Float3NaNPropRule float_3nan_prop_rule; - FloatInfZeroNaNRule float_infzeronan_rule; - FloatSNaNRule float_snan_rule; - bool tininess_before_rounding; + FloatExceptionFlags float_exception_flags : 16; + + /* + * Floating point status controls. + * Items that, in general, may be updated by writes to an architectural + * floating point control register. + */ + FloatRoundMode float_rounding_mode : 3; + FloatX80RoundPrec floatx80_rounding_precision : 2; /* should denormalised results go to zero and set output_denormal_flus= hed? */ - bool flush_to_zero; - /* do we detect and flush denormal results before or after rounding? */ - bool ftz_before_rounding; + bool flush_to_zero : 1; /* should denormalised inputs go to zero and set input_denormal_flushe= d? */ - bool flush_inputs_to_zero; - bool default_nan_mode; + bool flush_inputs_to_zero : 1; + /* should default nans be produced instead of propagating an input nan= ? */ + bool default_nan_mode : 1; + /* should overflowed results subtract re_bias to its exponent? */ + bool rebias_overflow : 1; + /* should underflowed results add re_bias to its exponent? */ + bool rebias_underflow : 1; + + /* + * Floating point behaviour controls. + * Items that, in general, will be set at cpu realization because + * the behaviour is baked into the specific hardware implementation. + */ + bool tininess_before_rounding : 1; + /* do we detect and flush denormal results before or after rounding? */ + bool ftz_before_rounding : 1; + FloatSNaNRule float_snan_rule : 2; + Float2NaNPropRule float_2nan_prop_rule : 3; + Float3NaNPropRule float_3nan_prop_rule : 7; + FloatInfZeroNaNRule float_infzeronan_rule: 3; + FloatX80Behaviour floatx80_behaviour : 5; /* * The pattern to use for the default NaN. Here the high bit specifies * the default NaN's sign bit, and bits 6..0 specify the high bits of = the @@ -427,11 +444,7 @@ typedef struct float_status { * this to the correct non-zero value, or we will assert when trying to * create a default NaN. */ - uint8_t default_nan_pattern; - /* should overflowed results subtract re_bias to its exponent? */ - bool rebias_overflow; - /* should underflowed results add re_bias to its exponent? */ - bool rebias_underflow; + unsigned default_nan_pattern : 8; } float_status; =20 #endif /* SOFTFLOAT_TYPES_H */ --=20 2.43.0