From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 302 invoked by alias); 8 Feb 2002 16:06:05 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32691 invoked from network); 8 Feb 2002 16:06:03 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 8 Feb 2002 16:06:03 -0000 Received: by fw-cam.cambridge.arm.com; id QAA03874; Fri, 8 Feb 2002 16:06:02 GMT Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma003218; Fri, 8 Feb 02 16:05:17 GMT Received: from cam-mail2.cambridge.arm.com (localhost [127.0.0.1]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id QAA13358 for ; Fri, 8 Feb 2002 16:05:16 GMT Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id QAA01859; Fri, 8 Feb 2002 16:05:14 GMT Message-Id: <200202081605.QAA01859@cam-mail2.cambridge.arm.com> X-Mailer: exmh version 2.0.2 2/24/98 To: gdb-patches cc: Richard.Earnshaw@arm.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: [RFA]: ARM: Fix parameter handling of FP types in arm_push_arguments() In-reply-to: Your message of "Fri, 08 Feb 2002 16:49:56 +0100." <20020208164956.R14241@cygbert.vinschen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 08 Feb 2002 08:06:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-02/txt/msg00230.txt.bz2 > 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 > > * 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.