This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [PATCH RFA] store_floating(), extract_floating() fixes
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: [PATCH RFA] store_floating(), extract_floating() fixes
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 01 Mar 2000 20:35:39 +1100
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <1000229000345.ZM15006@ocotillo.lan>
Kevin Buettner wrote:
>
> I'd like approval for committing the patch below. The rationale for
> these fixes may be found in my message from earlier today entitled
> "store_floating() rewrite (was Re: bug in arm_push_arguments())".
>
> My rewrite of store_floating() was incorrect in that message though.
> It fails to take into account the size of the float when doing the
> memcpy (when the float formats are the same).
>
> I've tested the following patch on linux/x86 and linux/ppc and saw
> no regressions.
>
> * findvar.c (extract_floating, store_floating): Use target
> floating point type sizes rather host sizes to determine
> which conversion needs to be done.
>
Ha! The're dull and booring - you need to live on the edge :-)
Trying a x86(le)->d10v(be) (which can have sizeof(double)==32) I saw no
regressions.
- if (len == sizeof (float))
+ if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT)
The only other question is with ``TARGET_CHAR_BIT'' and len. Looking in
gdbtypes.c, the length was computed using
TARGET_FLAOT_BIT/TARGET_CHAR_BIT so this would be correct.
Approved.
Andrew