Browse Source

2000-04-12 Mark Kettenis <kettenis@gnu.org>

* i387-tdep.c (print_i387_value): Avoid call to
	floatformat_to_doublest if long double type is the same on host
	and target.
binutils-2_11-branch
Mark Kettenis 27 years ago
parent
commit
1d77867f99
  1. 6
      gdb/ChangeLog
  2. 17
      gdb/i387-tdep.c

6
gdb/ChangeLog

@ -1,3 +1,9 @@
2000-04-12 Mark Kettenis <kettenis@gnu.org>
* i387-tdep.c (print_i387_value): Avoid call to
floatformat_to_doublest if long double type is the same on host
and target.
2000-04-11 Fernando Nasser <fnasser@cygnus.com> 2000-04-11 Fernando Nasser <fnasser@cygnus.com>
* wrapper.h: Remove definitions of internal functions. * wrapper.h: Remove definitions of internal functions.

17
gdb/i387-tdep.c

@ -166,8 +166,21 @@ static void
print_i387_value (char *raw) print_i387_value (char *raw)
{ {
DOUBLEST value; DOUBLEST value;
floatformat_to_doublest (&floatformat_i387_ext, raw, &value); /* Avoid call to floatformat_to_doublest if possible to preserve as
much information as possible. */
#ifdef HAVE_LONG_DOUBLE
if (sizeof (value) == sizeof (long double)
&& HOST_LONG_DOUBLE_FORMAT == &floatformat_i387_ext)
{
/* Copy straight over, but take care of the padding. */
memcpy (&value, raw, FPU_REG_RAW_SIZE);
memset (&value + FPU_REG_RAW_SIZE, 0, sizeof (value) - FPU_REG_RAW_SIZE);
}
else
#endif
floatformat_to_doublest (&floatformat_i387_ext, raw, &value);
/* We try to print 19 digits. The last digit may or may not contain /* We try to print 19 digits. The last digit may or may not contain
garbage, but we'd better print one too many. We need enough room garbage, but we'd better print one too many. We need enough room

Loading…
Cancel
Save