This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: ARM: Fix parameter handling of FP types in arm_push_arguments()
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: gdb-patches <gdb-patches at sources dot redhat dot com>
- Cc: Richard dot Earnshaw at arm dot com
- Date: Fri, 08 Feb 2002 16:05:13 +0000
- Subject: Re: [RFA]: ARM: Fix parameter handling of FP types in arm_push_arguments()
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Hi,
>
> while running the testsuite on ARM, I found that the handling
> of type `float' as argument type in the function arm_push_arguments()
> is pretty buggy.
>
> For some reason the size of float arguments was always given as
> sizeof(float) even when K&R style functions are called which
> expect the float arguments with sizeof(double).
> Up to this point one would expect that calling K&R functions with
> float arguments is broken.
>
> As a matter of fact, arm_push_arguments() coerced float args
> always to double types so that K&R functions were happy while
> calling ANSI style functions getting float args were broken.
>
> The below fix is doing two things now.
>
> - It adds the macro COERCE_FLOAT_TO_DOUBLE() to config/arm/tm-arm.h,
> calling standard_coerce_float_to_double(). This results in
> floats being coerced to double already *before* arm_push_arguments()
> is called.
>
> - It eliminates the now useless (and wrong) special float handling
> from arm_push_arguments().
>
> Corinna
>
> 2002-02-08 Corinna Vinschen <vinschen@redhat.com>
>
> * arm-tdep.c (arm_push_arguments): Eliminate special float
> type handling.
> * config/arm/tm-arm.h (COERCE_FLOAT_TO_DOUBLE): Define to
> call standard_coerce_float_to_double().
This looks good to me. Is there a anything in the testsuite that is fixed
by this? If not, can you provide one.
R.