From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22863 invoked by alias); 29 Apr 2002 15:40:14 -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 22791 invoked from network); 29 Apr 2002 15:40:08 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 29 Apr 2002 15:40:08 -0000 Received: from localhost.redhat.com (remus.sfbay.redhat.com [172.16.27.252]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id IAA16213; Mon, 29 Apr 2002 08:40:05 -0700 (PDT) Received: by localhost.redhat.com (Postfix, from userid 469) id 70F5710A8C; Mon, 29 Apr 2002 11:39:39 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15565.26939.309256.444181@localhost.redhat.com> Date: Mon, 29 Apr 2002 08:40:00 -0000 To: Kevin Buettner Cc: Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [RFA] Altivec ABI patches In-Reply-To: <1020427080809.ZM32701@localhost.localdomain> References: <15561.48188.141526.557982@localhost.redhat.com> <1020426230236.ZM31350@localhost.localdomain> <15562.646.506619.140778@localhost.redhat.com> <1020427080809.ZM32701@localhost.localdomain> X-SW-Source: 2002-04/txt/msg01119.txt.bz2 Kevin Buettner writes: > On Apr 26, 9:44pm, Elena Zannoni wrote: > > > > Note that the subsequent memcpy() ends up overwriting the memory > > > zero'd by the assignment. If the assignment does serve some useful > > > purpose, I'd prefer to see memset() used instead. > > > > > > > It does seem odd, I actually just cut and pasted the code from a few > > lines above. I thought there was some reason for it, after all. > > > > { > > *(int *) ®isters[REGISTER_BYTE (greg)] = 0; > > memcpy (®isters[REGISTER_BYTE (greg)], val_buf, 4); > > greg++; > > } > > > > Should this go as well, then? > > Yes, definitely. As written, this code could yield some very > unexpected results on certain hosts. > > Thanks for pointing this out. This is very likely a mistake that I > made a while back. > > > Unless it always writes 4 bytes, but the > > size of the general register can be bigger? > > Well, the code in question doesn't work for 64-bit ABIs, but then, as > I understand it, the 64-bit PowerPC SVR4 ABI resembles the old PowerOpen > ABI than it does the 32-bit SVR4 ABI. (Actually, I don't know that > much about it. If someone could give me a pointer to an ABI spec for > the 64-bit ABI, I would appreciate it very much.) > > Kevin OK, I have removed those 2 statements and committed the rest. Elena