This is the mail archive of the gdb@sourceware.cygnus.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]

Re: store_floating() rewrite (was Re: bug in arm_push_arguments())


   Date: Mon, 28 Feb 2000 11:11:42 -0700
   From: Kevin Buettner <kevinb@cygnus.com>

   On Feb 28, 11:03pm, Andrew Cagney wrote:

   > Kevin Buttner wrote:
   > > It seems to me that you should be able to use store_floating() to do
   > > what you want.  It'll handle both the conversion and the byte swapping.
   > 
   > Yes, that looks correct. I'm just not 100% sure on it working - would
   > one of those if()'s before the TARGET_EXTRACT_FLOATING() get in the way?
				    ^^^^^^^^^^^^^^^^^^^^^^^

   Did you mean TARGET_STORE_FLOATING?

Andrew was probably looking at extract_floating() which suffers from
the same braindamage as you describe.  This needs to be fixed,
and I think your patch is basically right.  Apart from store_floating
and extract_floating, there are probably some other functions where
the same assumptions are made.

However, keep in mind that we must guard for loss of precision.  What
should store_floating do if DOUBLEST (which "lives" on the host) has
less precision than the target type in which it is being stored?  This
is also a problem with a somewhat wider scope.  There is no explicit
policy in GDB on which operations are allowed to lose precision, and
which operations are not supposed to lose precision.  I think that if
we're going to address the issues raised here, we must determine such
a policy, and document it.

Please also keep in mind that TARGET_STORE_FLOATING and
TARGET_EXTRACT_FLOATING really should be eliminated.  They are part of
a workaround for the problem that's being adressed now and are only
used on Linux/i386.

Mark

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