From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5329 invoked by alias); 24 Aug 2004 22:39:41 -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 5281 invoked from network); 24 Aug 2004 22:39:40 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 24 Aug 2004 22:39:40 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7OMdeS2004600 for ; Tue, 24 Aug 2004 18:39:40 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7OMdda07460; Tue, 24 Aug 2004 18:39:39 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 3E9872B9D; Tue, 24 Aug 2004 18:38:31 -0400 (EDT) Message-ID: <412BC367.7080906@gnu.org> Date: Tue, 24 Aug 2004 22:39:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040801 MIME-Version: 1.0 To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [commit] Add BE/LE floating-point type & format tables References: <4116617A.8010601@gnu.org> <200408081951.i78JpTxK005673@elgar.kettenis.dyndns.org> <41169A0A.1020508@gnu.org> <200408091512.i79FCJfd000743@elgar.kettenis.dyndns.org> In-Reply-To: <200408091512.i79FCJfd000743@elgar.kettenis.dyndns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00676.txt.bz2 > Date: Sun, 08 Aug 2004 17:24:26 -0400 > From: Andrew Cagney > > My original post gave one example, here's another: > > static struct type * > mips_float_register_type (void) > { > if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) > return builtin_type_ieee_single_big; > else > return builtin_type_ieee_single_little; > } > > Is all over the place. This: > > builtin_type_ieee_single[gdbarch_byte_order (gdbarch)] > > is shorter and correct. > > Ah OK. But is this going to get used for some other target than MIPS? > It seems to me that you're introducing a lot of machinery just to make > life a bit easier there. I've also fixed bugs where that if (...) logic was wrong. I've a greater confidence in the correctness of this code. > Oh, and your code really needs to do some > bounds checking too, so I really doubt whether it is much simpler. ? The occasional assert (gdbarch_byte_order == BFD_ENDIAN_BIG || BFD_ENDIAN_LITTLE) might be interesting, but beyond that? > > Anyway, could we rename floatformat_ia64_quad to > > floatformat_ieee_quad. There are quite a few systems out there that > > use or will be using the same format, and I believe i will be in a new > > revision of the official IEEE standard for it. > > > > local to gdb? > > Whatever. Andrew