This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Big-endian Gcc on Intel IA32
- From: Alan Lehotsky <apl at alum dot mit dot edu>
- To: Linus Torvalds <torvalds at transmeta dot com>
- Cc: dewar at gnat dot com, gcc at gcc dot gnu dot org
- Date: Mon, 17 Dec 2001 16:40:59 -0500
- Subject: Re: Big-endian Gcc on Intel IA32
- References: <200112172104.fBHL4gw01582@penguin.transmeta.com>
At 1:04 PM -0800 12/17/01, Linus Torvalds wrote:
>In article <20011217200410.D28DAF28BE@nile.gnat.com> you write:
>><<My question to you all is: Is there a big-endian GCC available on IA32?
>> 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