From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1526 invoked by alias); 27 Jun 2008 19:57:58 -0000 Received: (qmail 1514 invoked by uid 22791); 27 Jun 2008 19:57:57 -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; Fri, 27 Jun 2008 19:57:37 +0000 Received: (qmail 30145 invoked from network); 27 Jun 2008 19:57:35 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 27 Jun 2008 19:57:35 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.68) (envelope-from ) id 1KCK4c-0000Sl-9W; Fri, 27 Jun 2008 19:57:34 +0000 Date: Fri, 27 Jun 2008 20:45:00 -0000 From: "Joseph S. Myers" To: Daniel Jacobowitz cc: gdb-patches@sourceware.org Subject: Re: Fix cross-endian DFP for GDB In-Reply-To: <20080627175141.GA9226@caradoc.them.org> Message-ID: References: <20080627175141.GA9226@caradoc.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: 2008-06/txt/msg00519.txt.bz2 On Fri, 27 Jun 2008, Daniel Jacobowitz wrote: > On Fri, Jun 27, 2008 at 05:40:45PM +0000, Joseph S. Myers wrote: > > 2008-06-27 Joseph Myers > > > > * dfp.c (decimal_convert): Call match_endianness before and after > > conversion. > > Does promote_decimal have the same problem? Both callers of promote_decimal call match_endianness beforehand. Thus the promote_decimal interface is that it uses host endianness. > I'm wondering why the calls can't go in decimal_to_number / > decimal_from_number... (resp. decimal_to_string). I imagine almost any choice of which set of functions use host endianness and which use target endianness would work. Given that which use which endianness isn't documented, and nor is an underlying design, I kept the existing interface for what is passed to/from each function and did the minimal change to make it work. -- Joseph S. Myers joseph@codesourcery.com