Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Subject: [PATCH v3 0/2] gdb: Fix floating-point field writes and subnormal results
@ 2026-11-11  3:39 Robert Dubner
  2026-11-11  3:39 ` [PATCH v3 1/2] gdb: Preserve neighboring bits when writing floating-point fields Robert Dubner
  2026-11-11  3:39 ` [PATCH v3 2/2] gdb: Preserve subnormal values in target floating-point operations Robert Dubner
  0 siblings, 2 replies; 5+ messages in thread
From: Robert Dubner @ 2026-11-11  3:39 UTC (permalink / raw)
  To: gdb-patches; +Cc: stephan.rohr

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-11 13:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11  3:39 [PATCH v3 0/2] Subject: [PATCH v3 0/2] gdb: Fix floating-point field writes and subnormal results Robert Dubner
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox