From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24275 invoked by alias); 30 Nov 2001 06:36:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24090 invoked from network); 30 Nov 2001 06:34:57 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by hostedprojects.ges.redhat.com with SMTP; 30 Nov 2001 06:34:57 -0000 Received: from drow by nevyn.them.org with local (Exim 3.32 #1 (Debian)) id 169hGb-0007nh-00; Fri, 30 Nov 2001 01:35:21 -0500 Date: Wed, 21 Nov 2001 05:56:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Kevin Buettner , Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [RFA] W.I.P. AltiVec ppc registers support. Message-ID: <20011130013521.A29891@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Kevin Buettner , Elena Zannoni , gdb-patches@sources.redhat.com References: <15366.44991.616576.411278@krustylu.cygnus.com> <1011129222000.ZM19585@ocotillo.lan> <20011129174621.B15429@nevyn.them.org> <1011129231229.ZM19791@ocotillo.lan> <20011129183732.A17705@nevyn.them.org> <1011129234527.ZM19890@ocotillo.lan> <20011129185802.A18421@nevyn.them.org> <3C06D034.4070007@cygnus.com> <20011129203801.A21872@nevyn.them.org> <3C06ED04.70005@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C06ED04.70005@cygnus.com> User-Agent: Mutt/1.3.23i X-SW-Source: 2001-11/txt/msg00384.txt.bz2 Message-ID: <20011121055600.Drz8TcImUeobkX2eMmQpGSozCE0rb3SqyJ7SbAB7ixw@z> On Thu, Nov 29, 2001 at 09:20:52PM -0500, Andrew Cagney wrote: > >>> > >>> > >>>How does it work? Badly. > >>> > >>>The types look like this right now: > >>> > >>>+typedef unsigned char elf_greg_t[4]; > >>>+typedef unsigned char elf_fpreg_t[8]; > >>>+typedef struct { > >>>+ unsigned char u[16]; > >>>+} __attribute((aligned(16))) __uint128_t; > >>>+/* Altivec registers */ > >>>+typedef __uint128_t elf_vrreg_t; > > > >> > >>Hmm, Kevin did have good reason to be concerned. That is wrong. > >>Mechanisms similar to shlib et.al. should be used. > > > > > >What is wrong with it? > > > >I agree that it is messy, but it is completely correct. I know of no > >platform with 8-bit bytes stupid enough to do this any way other than > >the way I intend. > > Several things come to mind: the __attribute() - there are alignment > independant functions for packing/unpacking/copying stuff; the > __unint128_t is is a name in system space. > > The shlib code does this by describing the actual layout using a very > thin interface (like how remote.c unpacks the g-packet) so host issues > aren't a problem (but yes, it would be a suprise to find one that didn't > have 8 bit chars). > > The other way of doing this is more like C++ where it creates a ``struct > type'' to describe the structure exactly how the target sees it. The __attribute__ and __uint128_t are both, as I said further down the message, are both unused :) The remainder of it is fine, AFAICT. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer