This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

[rfc] Add some more floatformat types ....


Hello,

The attached adds the floatformats:

floatformat_i387_ext80;
floatformat_i387_ext96;

	Explicitly sized x86 float formats.

	Depending on where/how it is stored,
	an i386 extended could use 80 (10 bytes)
	or 96 (12 bytes).

floatformat_m88110_harris_ext;

	This eliminates a build hack.

	Prior to this tweek, a compile time
	option was deciding the layout of the m88110
	floatformat.  I think that was just wrong.

floatformat_arm_ext_big;
floatformat_arm_ext_littlebyte_bigword;

	Like i387_ext but with byte order.

	The arm can be big or little endian.
	arm-ext little-byte big-word
	is my interpretation of how the LE-arm
	lays an FP value out in memory.
	The lack of this has me puzzled, I'm
	suprised no one added it earlier :-/

Given that these files are only used by opcodes and GDB, and that this 
change (ignoring the harris bit) has no effect, I'm planning in simply 
checking it in (via GCC) in a few days.

Comments?

	Andrew

PS: Hopefully I've got the values right.
Index: include/ChangeLog
2001-08-11  Andrew Cagney  <ac131313@redhat.com>

	* floatformat.h (floatformat_m88110_harris_ext)
	(floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword)
	(floatformat_i387_ext80, floatformat_i387_ext96): Declare.

Index: libiberty/ChangeLog
2001-08-11  Andrew Cagney  <ac131313@redhat.com>

	* floatformat.c (floatformat_m88110_ext): Remove #ifdef
	HARRIS_FLOAT_FORMAT.
	(floatformat_m88110_harris_ext, floatformat_i387_ext80)
	(floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword)
	(floatformat_i387_ext80, floatformat_i387_ext96): New float formats.

Index: include/floatformat.h
===================================================================
RCS file: /cvs/src/src/include/floatformat.h,v
retrieving revision 1.3
diff -p -r1.3 floatformat.h
*** floatformat.h	2001/03/14 02:27:43	1.3
--- floatformat.h	2001/08/12 03:45:02
*************** extern const struct floatformat floatfor
*** 92,101 ****
--- 92,106 ----
  /* floatformats for various extendeds.  */
  
  extern const struct floatformat floatformat_i387_ext;
+ extern const struct floatformat floatformat_i387_ext80;
+ extern const struct floatformat floatformat_i387_ext96;
  extern const struct floatformat floatformat_m68881_ext;
  extern const struct floatformat floatformat_i960_ext;
  extern const struct floatformat floatformat_m88110_ext;
+ extern const struct floatformat floatformat_m88110_harris_ext;
  extern const struct floatformat floatformat_arm_ext;
+ extern const struct floatformat floatformat_arm_ext_big;
+ extern const struct floatformat floatformat_arm_ext_littlebyte_bigword;
  
  /* Convert from FMT to a double.
     FROM is the address of the extended float.
Index: libiberty/floatformat.c
===================================================================
RCS file: /cvs/src/src/libiberty/floatformat.c,v
retrieving revision 1.3
diff -p -r1.3 floatformat.c
*** floatformat.c	2000/05/31 10:54:59	1.3
--- floatformat.c	2001/08/12 03:45:20
*************** const struct floatformat floatformat_i38
*** 75,80 ****
--- 75,92 ----
    floatformat_intbit_yes,
    "floatformat_i387_ext"
  };
+ const struct floatformat floatformat_i387_ext80 =
+ {
+   floatformat_little, 80, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
+   floatformat_intbit_yes,
+   "floatformat_i387_ext80"
+ };
+ const struct floatformat floatformat_i387_ext96 =
+ {
+   floatformat_little, 96, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
+   floatformat_intbit_yes,
+   "floatformat_i387_ext96"
+ };
  const struct floatformat floatformat_m68881_ext =
  {
    /* Note that the bits from 16 to 31 are unused.  */
*************** const struct floatformat floatformat_i96
*** 91,107 ****
  };
  const struct floatformat floatformat_m88110_ext =
  {
! #ifdef HARRIS_FLOAT_FORMAT
    /* Harris uses raw format 128 bytes long, but the number is just an ieee
       double, and the last 64 bits are wasted. */
    floatformat_big,128, 0, 1, 11,  0x3ff,  0x7ff, 12, 52,
    floatformat_intbit_no,
!   "floatformat_m88110_ext(harris)"
! #else
!   floatformat_big, 80, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
!   floatformat_intbit_yes,
!   "floatformat_m88110_ext"
! #endif /* HARRIS_FLOAT_FORMAT */
  };
  const struct floatformat floatformat_arm_ext =
  {
--- 103,119 ----
  };
  const struct floatformat floatformat_m88110_ext =
  {
!   floatformat_big, 80, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
!   floatformat_intbit_yes,
!   "floatformat_m88110_ext"
! };
! const struct floatformat floatformat_m88110_harris_ext =
! {
    /* Harris uses raw format 128 bytes long, but the number is just an ieee
       double, and the last 64 bits are wasted. */
    floatformat_big,128, 0, 1, 11,  0x3ff,  0x7ff, 12, 52,
    floatformat_intbit_no,
!   "floatformat_m88110_ext_harris"
  };
  const struct floatformat floatformat_arm_ext =
  {
*************** const struct floatformat floatformat_arm
*** 109,114 ****
--- 121,140 ----
    floatformat_big, 96, 0, 17, 15, 0x3fff, 0x7fff, 32, 64,
    floatformat_intbit_yes,
    "floatformat_arm_ext"
+ };
+ const struct floatformat floatformat_arm_ext_big =
+ {
+   /* Bits 1 to 16 are unused.  */
+   floatformat_big, 96, 0, 17, 15, 0x3fff, 0x7fff, 32, 64,
+   floatformat_intbit_yes,
+   "floatformat_arm_ext_big"
+ };
+ const struct floatformat floatformat_arm_ext_littlebyte_bigword =
+ {
+   /* Bits 1 to 16 are unused.  */
+   floatformat_littlebyte_bigword, 96, 0, 17, 15, 0x3fff, 0x7fff, 32, 64,
+   floatformat_intbit_yes,
+   "floatformat_arm_ext_littlebyte_bigword"
  };
  
  static unsigned long get_field PARAMS ((unsigned char *,

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