From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25584 invoked by alias); 30 Nov 2001 00:17:59 -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 25552 invoked from network); 30 Nov 2001 00:17:58 -0000 Received: from unknown (HELO localhost.cygnus.com) (216.138.202.10) by hostedprojects.ges.redhat.com with SMTP; 30 Nov 2001 00:17:58 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id 127963DE8; Thu, 29 Nov 2001 19:17:57 -0500 (EST) Message-ID: <3C06D034.4070007@cygnus.com> Date: Tue, 20 Nov 2001 11:17:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.3) Gecko/20011020 X-Accept-Language: en-us MIME-Version: 1.0 To: Daniel Jacobowitz Cc: Kevin Buettner , Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [RFA] W.I.P. AltiVec ppc registers support. 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> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2001-11/txt/msg00374.txt.bz2 Message-ID: <20011120111700.FTn0I52mvvp-y1bYuZEnfVjmqb05qvlMI4rAh2erKj4@z> >> 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. BTW, where did this buffer layout come from? Andrew > Barring the GCC extension to get __uint128_t aligned, which I don't > actually need for anything, I can do what I need to with these; I use > explicitly target alignment. No platform other than (IIRC) x86 is > broken enough to require the tdep to do computation on elf_greg_t's > while fetching them. > > The current version also has a _ppc_pt_regs struct which contains only > unsigned longs; but the only thing it's doing there is providing struct > user, and the only thing that cares is the kernel_u_size function, and > the only reason that's there is because it was quicker at the time for > me to copy struct user than figure out the constant :) > > Arrays of arrays of unsigned char have no alignment issues. > > >