This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]