From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25847 invoked by alias); 13 Jun 2007 07:08:13 -0000 Received: (qmail 25681 invoked by uid 22791); 13 Jun 2007 07:08:10 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 13 Jun 2007 07:08:05 +0000 Received: (qmail 16087 invoked from network); 13 Jun 2007 07:08:02 -0000 Received: from unknown (HELO h38.net64.aknet.ru) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 13 Jun 2007 07:08:02 -0000 From: Vladimir Prus To: Daniel Jacobowitz Subject: Re: [2/10] Remove &builtin_type_ from tdep code (amd64/s390/sparc64) Date: Wed, 13 Jun 2007 07:08:00 -0000 User-Agent: KMail/1.9.1 Cc: Ulrich Weigand , gdb-patches@sourceware.org References: <200706082314.l58NEw7j016615@d12av02.megacenter.de.ibm.com> <20070612151452.GB16068@caradoc.them.org> In-Reply-To: <20070612151452.GB16068@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706131108.00541.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00216.txt.bz2 On Tuesday 12 June 2007 19:14, Daniel Jacobowitz wrote: > On Sat, Jun 09, 2007 at 01:14:58AM +0200, Ulrich Weigand wrote: > > Hello, > > > > a number of platforms (amd64, s390, sparc64) were using a global data > > structure containing pointers to types describing the register types. > > This is broken if those types need to be platform-specific. > > > > The following patch removes those global data structures, and converts > > the affected architectures to simply return the types dynamically from > > the register_type callback, as all other platforms do as well. > > In-flight collision warning: the m68k ColdFire patch may reintroduce an > occurance of this, for the long double type. Current version of the patch indeed has this: + if (flavour == m68k_coldfire_flavour) + tdep->fpreg_type = &builtin_type_double; + else + tdep->fpreg_type = &builtin_type_m68881_ext; I suppose I can change m68k_register_type to directly return the type, but I'm not sure why return builtin_type_double; is better than: return *x; where x = &builtin_type_double; Ulrich, can you explain that to me? Thanks, Volodya