From: Robert Dubner <rdubner@symas.com>
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 [thread overview]
Message-ID: <20261111033938.3306719-1-rdubner@symas.com> (raw)
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
next reply other threads:[~2026-11-11 3:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 3:39 Robert Dubner [this message]
2026-11-11 3:39 ` [PATCH v3 1/2] gdb: Preserve neighboring bits when writing floating-point fields Robert Dubner
2026-11-11 13:16 ` Rohr, Stephan
2026-11-11 3:39 ` [PATCH v3 2/2] gdb: Preserve subnormal values in target floating-point operations Robert Dubner
2026-11-11 13:16 ` Rohr, Stephan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261111033938.3306719-1-rdubner@symas.com \
--to=rdubner@symas.com \
--cc=gdb-patches@sourceware.org \
--cc=stephan.rohr@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox