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]

Re: [commit] Add BE/LE floating-point type & format tables


   Date: Sun, 08 Aug 2004 17:24:26 -0400
   From: Andrew Cagney <cagney@gnu.org>

   My original post gave one example, here's another:

   static struct type *
   mips_float_register_type (void)
   {
      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
	return builtin_type_ieee_single_big;
      else
	return builtin_type_ieee_single_little;
   }

   Is all over the place.  This:

	   builtin_type_ieee_single[gdbarch_byte_order (gdbarch)]

   is shorter and correct.

Ah OK.  But is this going to get used for some other target than MIPS?
It seems to me that you're introducing a lot of machinery just to make
life a bit easier there.  Oh, and your code really needs to do some
bounds checking too, so I really doubt whether it is much simpler.

   > Anyway, could we rename floatformat_ia64_quad to
   > floatformat_ieee_quad.  There are quite a few systems out there that
   > use or will be using the same format, and I believe i will be in a new
   > revision of the official IEEE standard for it.
   > 

   local to gdb?

Whatever.

Mark


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