From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23154 invoked by alias); 10 Mar 2002 17:46:54 -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 23089 invoked from network); 10 Mar 2002 17:46:52 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.135.44) by sources.redhat.com with SMTP; 10 Mar 2002 17:46:52 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4639A3CA9; Sun, 10 Mar 2002 12:46:47 -0500 (EST) Message-ID: <3C8B9C06.9020506@cygnus.com> Date: Sun, 10 Mar 2002 09:46:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Daniel Jacobowitz Cc: Don Howard , gdb-patches@sources.redhat.com Subject: Re: [RFA] mips: Fix "info registers" output References: <20010619225007.A10141@nevyn.them.org> <20020307165956.A22042@nevyn.them.org> <3C8ABF59.7080908@cygnus.com> <20020310015637.A13373@nevyn.them.org> <3C8B8A11.8070609@cygnus.com> <20020310120037.A29124@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00138.txt.bz2 > On Sun, Mar 10, 2002 at 11:30:09AM -0500, Andrew Cagney wrote: >> Suggest a FIXME and bug report here. It isn't safe to assume things >> like builtin_type_double is 64 bit. The code should use the ABI >> independant builtin_type_ieee_BLAH. But this is a separate bug and not >> your problem :-) > > > builtin_type_double = > init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT, > 0, > "double", (struct objfile *) NULL); > > > set_gdbarch_double_bit (gdbarch, 64); > > > Why isn't it safe to assume that a double is 64-bit when we explicitly > set it that way? I assume that the builtin types get swapped out when > we change gdbarch... yes, they do. Besides, is MIPS FP actually IEEE? > Oh, I suppose the values probably are and only some of the math isn't. Have a look at GCC's -fshort-double option. I'm not sure how MIPS would respond to it but I suspect it would make everyones head hurt. :-) The ``info registers'' code is both ISA and ABI dependant. ISA since that determines the raw format of registers (ieee_double_{big,little} not double) - the ABI shouldn't change a MIPS DOUBLE. ABI since that determins where bits of registers end up being saved on the stack. > Committed without that last FIXME; I'll add it if it's really > necessary Er, where's the fire? With all respect, it is always better to give the other party the chance to respond. Andrew