From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30837 invoked by alias); 30 Nov 2001 01:39:06 -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 30681 invoked from network); 30 Nov 2001 01:37:48 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by hostedprojects.ges.redhat.com with SMTP; 30 Nov 2001 01:37:48 -0000 Received: from drow by nevyn.them.org with local (Exim 3.32 #1 (Debian)) id 169ccr-0005h5-00; Thu, 29 Nov 2001 20:38:01 -0500 Date: Tue, 20 Nov 2001 17:52: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: <20011129203801.A21872@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Kevin Buettner , Elena Zannoni , gdb-patches@sources.redhat.com References: <15365.39495.801289.497931@krustylu.cygnus.com> <1011129183830.ZM18856@ocotillo.lan> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C06D034.4070007@cygnus.com> User-Agent: Mutt/1.3.23i X-SW-Source: 2001-11/txt/msg00379.txt.bz2 On Thu, Nov 29, 2001 at 07:17:56PM -0500, Andrew Cagney wrote: > >>How does the "cross" part of it work then? Won't the sizes of the > >>fundamental types, struct alignment, etc. change depending upon > >>which host you compile it on? > > > > > >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. > BTW, where did this buffer layout come from? Eh? It's the layout of a ppc/linux elf_gregset_t. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From mboxrd@z Thu Jan 1 00:00:00 1970 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. Date: Thu, 29 Nov 2001 17:39:00 -0000 Message-ID: <20011129203801.A21872@nevyn.them.org> References: <15365.39495.801289.497931@krustylu.cygnus.com> <1011129183830.ZM18856@ocotillo.lan> <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> X-SW-Source: 2001-11/msg00594.html Message-ID: <20011129173900.mPkacuJUBPEM0hQqxy3Sjn8TmKdWnSdjZwnnGQifEcg@z> On Thu, Nov 29, 2001 at 07:17:56PM -0500, Andrew Cagney wrote: > >>How does the "cross" part of it work then? Won't the sizes of the > >>fundamental types, struct alignment, etc. change depending upon > >>which host you compile it on? > > > > > >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. > BTW, where did this buffer layout come from? Eh? It's the layout of a ppc/linux elf_gregset_t. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer