This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA fix conversion of little-byte big-word floats to doublest
- From: Richard Earnshaw <Richard dot Earnshaw at buzzard dot freeserve dot co dot uk>
- To: gdb-patches at sources dot redhat dot com
- Cc: Richard dot Earnshaw at buzzard dot freeserve dot co dot uk
- Date: Sat, 04 Dec 2004 14:38:00 +0000
- Subject: RFA fix conversion of little-byte big-word floats to doublest
This patch fixes a bug in get_field which meant that we incorrectly
converted mixed-endian floats (ARM FPA style) into the internal doublest
format. This short change fixes over 300 testsuite failures in a combined
arm/thumb testsuite run on arm-elf.
* doublest.c (get_field): Correctly extract floatformat_littebyte_bigword
fields.
OK?
Index: doublest.c
===================================================================
RCS file: /cvs/src/src/gdb/doublest.c,v
retrieving revision 1.22
diff -p -p -r1.22 doublest.c
*** doublest.c 24 Aug 2004 22:49:27 -0000 1.22
--- doublest.c 4 Dec 2004 14:33:34 -0000
*************** get_field (unsigned char *data, enum flo
*** 94,106 ****
switch (order)
{
case floatformat_little:
++cur_byte;
break;
case floatformat_big:
--cur_byte;
break;
- case floatformat_littlebyte_bigword:
- break;
}
}
if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)
--- 94,105 ----
switch (order)
{
case floatformat_little:
+ case floatformat_littlebyte_bigword:
++cur_byte;
break;
case floatformat_big:
--cur_byte;
break;
}
}
if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)