From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 9QKUMy/46GoOWAUAWB0awg (envelope-from ) for ; Mon, 02 Nov 2026 15:53:03 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=uKwY+S65; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B59B5378002; Mon, 02 Nov 2026 15:53:03 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, 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 BB02D1E043 for ; Mon, 02 Nov 2026 15:53:02 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 843774B99F61 for ; Mon, 2 Nov 2026 20:53:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 843774B99F61 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=uKwY+S65 Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id EA0434BAE7C6 for ; Mon, 2 Nov 2026 20:52:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EA0434BAE7C6 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EA0434BAE7C6 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793652755; cv=none; b=tFbjoNBDUCe5GkYCwJoshmJmNiPJVRJaV6ICEHN5DxO30kcjTLleJ1ZjiB9zbFuVPlnwy2LCSULw6lcuF8ibnmfHx1anOPcnjOpdJQZEvL+mfHFdU+YqjfKz+Gr+/67isUNWk5jZ/v0wJeB2rv9Mgz/JvQPzInlkwJKi7a8O/nk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793652755; c=relaxed/simple; bh=pYcebcY9XcmEKD1LxYtjDCkRtW8N9NTnvVnaCJUfjko=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ot82MKgTMIHBB5RPm6JEsHZIxJ5JSEzVzYdPnv64l/fV2HIfAsNjC65IbkCL/Utjmc15WxCcOorvxbw7H8WMd/Xv3hnQeTCWzoVQfbw5fvWH0w9HBk/2ZcPf+Wbl/eUCPWxuYQakRUMrj2oD8HFsvrNFX4h6DVPpigk2tH7c9sA= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=uKwY+S65 reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA0434BAE7C6 Received: from eig-obgw-6007b.ext.cloudfilter.net ([10.0.30.166]) by cmsmtp with ESMTPS id NsZvxR1gGMylkNz18x15qd; Mon, 02 Nov 2026 20:52:34 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id Nz17xdYv9kE4RNz17x69P5; Mon, 02 Nov 2026 20:52:33 +0000 X-Authority-Analysis: v=2.4 cv=LuaSymdc c=1 sm=1 tr=0 ts=6ae8f811 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=zJRp6_cAMcgA:10 a=ItBw4LHWJt0A:10 a=IXtt00aCAAAA:8 a=O0LHumjbSZ9rDkTSdG8A:9 a=dD0Um7O3taywGyzC7GYb:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=UGOWR5LLs5ctR26g8Ov55h6jE6RvFonZ65O22q24oyE=; b=uKwY+S65JWa+L19iZXDk8PB9vb Vm+5nvXz3wOrAKT+AaWClYR+3S+v4ykSmXCaqxDPoYCXtBiN4vddslVvCSoQ2oVCvi6mLvYldd9GM 3H2kFSwK5JTmu8cbAbdJOugHx; Received: from 97-122-110-129.hlrn.qwest.net ([97.122.110.129]:56336 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xNz17-00000000rYe-0x7j; Mon, 02 Nov 2026 13:52:33 -0700 From: Tom Tromey To: Robert Dubner Cc: Subject: Re: [PATCH] gdb: Fix signed-zero and subnormal conversions in target floating-point support In-Reply-To: <1b1401dd66fa$0dc45250$294cf6f0$@symas.com> (Robert Dubner's message of "Wed, 28 Oct 2026 11:33:23 -0500 (CDT)") References: <1b1401dd66fa$0dc45250$294cf6f0$@symas.com> X-Attribution: Tom Date: Mon, 02 Nov 2026 13:52:32 -0700 Message-ID: <874idz7y7j.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.110.129 X-Source-L: No X-Exim-ID: 1xNz17-00000000rYe-0x7j X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-129.hlrn.qwest.net (bapiya) [97.122.110.129]:56336 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfP8GJ/IedOu9Vgu67i48vche39gBteeZZnqWFVeS1qVEQ1c3kaFaJ0xKz+7OLZ6FshLUQ9RIFsAfZCe7OwBtVzImh8IB9vg8F1WKHI0kcpFQAoC0D8L+ Ah+ovYk4s9iRRpTK/WZJGovWzR50JX3AitswZMfxTrZ7Co/qmegxSYG+gS/yjF+j/ljKSqQL/X9XvJ6S/owL1P1pHpE9oxQmMfs= 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 >>>>> Robert Dubner writes: > From 461b097d2319f771a5ffb28273782115b3017e13 Mon Sep 17 00:00:00 2001 > From: Robert Dubner > Date: Wed, 28 Oct 2026 12:24:55 -0400 > Subject: [PATCH] gdb: Fix signed-zero and subnormal conversions in target > floating-point support Hi. Thanks for the patch. First I think maybe something went wrong with the emailing of the patch, as it's somewhat mangled here. Second I was curious about this par: > + if (!mpfr_inf_p (tmp.val) && fmt->exp_nan != 0 > + && mpfr_get_exp (tmp.val) + fmt->exp_bias <= 1) > + { > + mpfr_exp_t saved_emin = mpfr_get_emin (); > + mpfr_exp_t saved_emax = mpfr_get_emax (); > + SCOPE_EXIT > + { > + mpfr_set_emin (saved_emin); > + mpfr_set_emax (saved_emax); > + }; > + mpfr_set_emin (3 - fmt->exp_bias - floatformat_precision (fmt)); > + mpfr_set_emax (fmt->exp_nan - fmt->exp_bias); > + inexact = mpfr_check_range (tmp.val, inexact, MPFR_RNDN); > + mpfr_subnormalize (tmp.val, inexact, MPFR_RNDN); I think probably SCOPE_EXIT is overkill here. It's really only needed if one of the other functions here can throw -- but can that happen? thanks, Tom