From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28793 invoked by alias); 21 Aug 2006 12:50:36 -0000 Received: (qmail 28781 invoked by uid 22791); 21 Aug 2006 12:50:35 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 21 Aug 2006 12:50:33 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GF9Ed-0004MV-Hc; Mon, 21 Aug 2006 08:50:31 -0400 Date: Mon, 21 Aug 2006 18:30:00 -0000 From: Daniel Jacobowitz To: Wu Zhou Cc: gdb-patches@sourceware.org Subject: Re: [RFC] decimal float point patch based on libdecnumber: gdb patch Message-ID: <20060821125031.GA16703@nevyn.them.org> Mail-Followup-To: Wu Zhou , gdb-patches@sourceware.org References: <20060821070736.tr378yu70gk8s8cc@imap.linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060821070736.tr378yu70gk8s8cc@imap.linux.ibm.com> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00146.txt.bz2 On Mon, Aug 21, 2006 at 07:07:36AM -0400, Wu Zhou wrote: > decimal128 is defined like this in libdecnumber: > > typedef struct > { > uint8_t bytes[DECIMAL128_Bytes]; /* decimal128: 1, 5, 12, 110 bits */ > } decimal128; > > It is always big-endian. > > When parsing dfp constant in our patch, we are also using a byte array > to store its value. It is big-endian too: > > struct { > gdb_byte val[16]; > struct type *type; > } typed_val_decfloat; > > But when transfering them into gdb's value system > (value_from_decfloat), we need to do endianess transfer in little > endian machine. This is why exchange_dfp is needed. Why? Why can't that use exactly the same big endian representation? It's big endian on the target, it's big endian in the library, so what are you doing that needs it to be little endian? Sorry to keep asking this; I really want to understand this one issue before I review the code. -- Daniel Jacobowitz CodeSourcery