From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id fq2gMZ7j82pG4AAAWB0awg (envelope-from ) for ; Tue, 10 Nov 2026 22:40:14 -0500 Received: by simark.ca (Postfix, from userid 112) id 9B131378002; Tue, 10 Nov 2026 22:40:14 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2775F1E043 for ; Tue, 10 Nov 2026 22:40:13 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 143DA4BA798A for ; Wed, 11 Nov 2026 03:40:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 143DA4BA798A Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by sourceware.org (Postfix) with ESMTPS id 078D34BA2E1C for ; Wed, 11 Nov 2026 03:39:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 078D34BA2E1C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=symas.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dubner.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 078D34BA2E1C Authentication-Results: sourceware.org; arc=none smtp.remote-ip=166.84.1.89 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794368389; cv=none; b=H0h0Atvxi5ADvqVQqqDQECAgi8q7V59++WAzYHRsS01IocYvtX4EN9TRjAM10QPXWrJdVabTIBzwPWWqV/dk9Qp/jkVBgLJcStxoZcm0lWCnkfGcouG5SKtdiJdSXnGpkX3oKRvIMBI7vMm1KhpMOpNmYg4kou+XKcQmU5d8Yrg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794368389; c=relaxed/simple; bh=OfRgdEVoHGlHOncYZJcL2cAyZSQDMv38YrMHwyn2JqY=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=cBoWjDpHClHTpR2ogcd6tHg7lbtZqLbeVkf0FnFN1Abgg6l7oWOlPL0qQCYrHkyNvj+5CYIlyaHpcx9F6lzfHkoj/yWRMIRWxOHVCwyvtcngFRY+uknX5FJeQ6IkhZzDxa8reNf7ar6A6d0hbnvJ8yjsGZGZzaBHEvXLOu+v6O4= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 078D34BA2E1C Received: from doobie (unknown [67.245.74.220]) by mailbackend.panix.com (Postfix) with ESMTPSA id 4jPTmL5XPtz43Hf; Tue, 10 Nov 2026 22:39:46 -0500 (EST) Received: by doobie (Postfix, from userid 1000) id 30E1E28E902A; Tue, 10 Nov 2026 22:39:46 -0500 (EST) From: Robert Dubner To: gdb-patches@sourceware.org Cc: stephan.rohr@intel.com Subject: [PATCH v3 0/2] Subject: [PATCH v3 0/2] gdb: Fix floating-point field writes and subnormal results Date: Tue, 10 Nov 2026 22:39:36 -0500 Message-Id: <20261111033938.3306719-1-rdubner@symas.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org This series addresses two floating-point encoding problems described in PR gdb/34927. The first patch prevents put_field from changing bits outside the requested field, including the sign bit adjacent to a binary16 exponent. The second patch corrects subnormal encoding and carries MPFR's ternary rounding results through conversions and arithmetic to avoid double rounding. Both patches include unit tests directly in target-float.c. Changes in v3: - Mask the final partial byte without shifting by the full field width. - Add a 32-bit field test with unaligned endpoints in both byte orders. - Explain why subnormal classification is repeated after rounding. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34927 Many thanks to Stephan Rohr for the review and guidance. Robert Dubner (2): gdb: Preserve neighboring bits when writing floating-point fields gdb: Preserve subnormal values in target floating-point operations gdb/target-float.c | 436 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 388 insertions(+), 48 deletions(-) base-commit: 9db3b515b964c1bbdc4d20c1202fbf27719be269 -- 2.34.1