From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19532 invoked by alias); 1 Jun 2004 22:39:04 -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 19525 invoked from network); 1 Jun 2004 22:39:04 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 1 Jun 2004 22:39:04 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i51Md4i5013487 for ; Tue, 1 Jun 2004 18:39:04 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i51Md4032703 for ; Tue, 1 Jun 2004 18:39:04 -0400 Received: from localhost.localdomain (vpn50-15.rdu.redhat.com [172.16.50.15]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i51Md3uZ015565; Tue, 1 Jun 2004 18:39:03 -0400 Received: from saguaro (saguaro.lan [192.168.64.2]) by localhost.localdomain (8.12.10/8.12.10) with SMTP id i51McvOR031264; Tue, 1 Jun 2004 15:38:57 -0700 Date: Tue, 01 Jun 2004 22:39:00 -0000 From: Kevin Buettner To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: rs6000: remove some uses of DEPRECATED_REGISTER_BYTE Message-Id: <20040601153857.23c1aa11@saguaro> In-Reply-To: References: <20040521131604.13e7228b@saguaro> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00024.txt.bz2 On 21 May 2004 17:09:22 -0500 Jim Blandy wrote: > Kevin Buettner writes: > > > On 20 May 2004 19:24:51 -0500 > > Jim Blandy wrote: > > > > > 2004-05-20 Jim Blandy > > > > > > * rs6000-tdep.c (rs6000_push_dummy_call): Remove uses of > > > DEPRECATED_REGISTER_BYTE and deprecated_registers. > > > > Would you mind revising the patch to call convert_typed_floating() > > for the floating point cases? I think that will obviate the need > > for some of the memset/memcpy calls. (See ppc_sysv_abi_push_dummy_call() > > in ppc-sysv-tdep.c.) > > > > It looks okay otherwise... > > So, wait, does this mean that the existing code like this is wrong? > > if (TYPE_CODE (type) == TYPE_CODE_FLT) > { > > /* Floating point arguments are passed in fpr's, as well as gpr's. > There are 13 fpr's reserved for passing parameters. At this point > there is no way we would run out of them. */ > > if (len > 8) > printf_unfiltered ("Fatal Error: a floating point parameter " > "#%d with a size > 8 is found!\n", argno); > > memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE > (tdep->ppc_fp0_regnum + 1 + f_argno)], > VALUE_CONTENTS (arg), > len); > ++f_argno; > } > > This code takes a floating-point value, of whatever size, and just > copies it into the left end of the floating-point register. My PPC > book says "Every instruction that interprets the contents of an FPR as > a floating-point value uses the floating-point double format for this > interpretation." > > Calls to unprototyped functions would promote arguments to double > anyway, so this isn't a big deal there, but it seems bogus for > prototyped functions. Sorry for taking so long on this one... I'm okaying your original patch since it's a faithful conversion of deprecated to non-deprecated code. We can revisit the matter of whether convert_typed_floating() should be used or not at a later date. Kevin