From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32719 invoked by alias); 5 Apr 2003 20:03:40 -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 32683 invoked from network); 5 Apr 2003 20:03:39 -0000 Received: from unknown (HELO mms2.broadcom.com) (63.70.210.59) by sources.redhat.com with SMTP; 5 Apr 2003 20:03:39 -0000 Received: from 63.70.210.1 by mms2.broadcom.com with ESMTP (Broadcom MMS1 SMTP Relay (MMS v5.5.2)); Sat, 05 Apr 2003 12:00:26 -0700 Received: from mail-sj1-5.sj.broadcom.com (mail-sj1-5.sj.broadcom.com [10.16.128.236]) by mon-irva-11.broadcom.com (8.9.1/8.9.1) with ESMTP id MAA22533; Sat, 5 Apr 2003 12:03:11 -0800 (PST) Received: from dt-sj3-118.sj.broadcom.com (dt-sj3-118 [10.21.64.118]) by mail-sj1-5.sj.broadcom.com (8.12.4/8.12.4/SSF) with ESMTP id h35K3RER002917; Sat, 5 Apr 2003 12:03:27 -0800 (PST) Received: (from cgd@localhost) by dt-sj3-118.sj.broadcom.com ( 8.9.1/SJ8.9.1) id MAA05598; Sat, 5 Apr 2003 12:03:20 -0800 (PST) To: kevinb@redhat.com cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] MIPS: Consolidate printing of floating point registers References: <1030405000855.ZM3033@localhost.localdomain> From: cgd@broadcom.com Date: Sat, 05 Apr 2003 20:03:00 -0000 In-Reply-To: kevinb@redhat.com's message of "Sat, 5 Apr 2003 00:09:22 +0000 (UTC)" Message-ID: MIME-Version: 1.0 X-WSS-ID: 1291EA50162356-01-01 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-SW-Source: 2003-04/txt/msg00093.txt.bz2 At Sat, 5 Apr 2003 00:09:22 +0000 (UTC), "Kevin Buettner" wrote: > Also, for some MIPS parts, floating point registers may contain values > which are not really floating point numbers, so a hex display of these > registers is useful. (Thanks to Chris Demetriou for telling me about > this.) To explain further to casual but interested readers: (a) it's possible to load/store random values thru the FP regs. (b) since the r3000 AFAIK, it's been possible to convert FP values to integer values in FP regs. (cvt.w.) Starting with MIPS III (r4k) you an also do this for 64-bit intever values, using cvt.d.. (c) MIPS V adds other formats, e.g. "Paired Single", in which two FP single values are in a single FP register. (It's v2sf in gcc modespeak. 8-) printing out FP values as singles & doubles is often the right thing (since usually a given FP reg will contain one or the other) but, to look at it another way, if you do that then between 0 and 1 of the 2 values you've printed are actually correct. Printing the hex value as well is fairly horrible, but at least you're given at least one value that's correct. 8-) chris