From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12332 invoked by alias); 17 Dec 2001 21:57:50 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 12311 invoked from network); 17 Dec 2001 21:57:50 -0000 Received: from unknown (HELO pintail.mail.pas.earthlink.net) (207.217.120.122) by sources.redhat.com with SMTP; 17 Dec 2001 21:57:50 -0000 Received: from 1cust82.tnt33.bos2.da.uu.net ([63.48.91.82] helo=[192.168.1.254]) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 16G5lK-0002k7-00; Mon, 17 Dec 2001 13:57:34 -0800 Mime-Version: 1.0 X-Sender: qsmgmt@pop.earthlink.net Message-Id: In-Reply-To: <200112172104.fBHL4gw01582@penguin.transmeta.com> References: <200112172104.fBHL4gw01582@penguin.transmeta.com> Date: Mon, 17 Dec 2001 14:00:00 -0000 To: Linus Torvalds From: Alan Lehotsky Subject: Re: Big-endian Gcc on Intel IA32 Cc: dewar@gnat.com, gcc@gcc.gnu.org Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2001-12/txt/msg00945.txt.bz2 At 1:04 PM -0800 12/17/01, Linus Torvalds wrote: >In article <20011217200410.D28DAF28BE@nile.gnat.com> you write: >><> If available, who is the source of >>contact and what is the effort involved here? > >>> >...... >One thing that might be helpful for portability issues like this, where >the user _is_ willing and able to recompile the application, but maybe >not able to find all subtly users of byte-order dependencies would be to >allow the notion of "byte order attributes" on data structures. > >This can be especially useful for those architectures that actually have >at least limited support for either byte-order (ie I think sparc64 has a >"load as little-endian"). It ought to be possible to add a peephole to the MD file that matches the inline expansion of htonl() or ntohl() and results in the appropriate load-endian instruction.... I don't think that any data-structure tagging would be necessary (although I admit that there might be some utility to making things work without the programmer needing to carefully wrap all the accesses and assignments with appropriate XtoY's) -- Al -- ------------------------------------------------------------------------ Quality Software Management http://home.earthlink.net/~qsmgmt apl@alum.mit.edu (978)287-0435 Voice (978)808-6836 Cell (978)287-0436 Fax Software Process Improvement and Management Consulting Language Design and Compiler Implementation