This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bytes order and words order
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Richard dot Earnshaw at arm dot com
- Cc: gcc at gcc dot gnu dot org
- Date: 23 Aug 2002 14:04:58 +0200
- Subject: Re: Bytes order and words order
- Organization: CodeSourcery, LLC
- References: <200208231156.MAA15630@cam-mail2.cambridge.arm.com>
Richard Earnshaw <rearnsha@arm.com> writes:
| >
| > Hi,
| >
| > Supports for floating-point data types in the C++ runtime system
| > require me to know the bytes and words orders used by the target. I
| > would like to have means for the front-end or driver to pass those
| > information down to the library. I think a minimal path would be for
| > CPP to define some macros like
| >
| > -D__TARGET_BYTES_ORDER__=__BIG_ENDIAN__ (or __LITTLE_ENDIAN__)
| > -D__TARGET_WORDS_ORDER__=__BIG_ENDIAN__ (or __LITTLE_ENDIAN__)
| >
| > with, for example, __LITTLE_ENDIAN__ and __BIG_ENDIAN__ predefined to 0
| > and 1 respectivelly. The same set of macros would be needed for the
| > host in case of cross-compiling.
| >
| > I'll also need symbols for the floating-point model used.
| >
| > Thoughts? Neil?
|
| Don't assume that the word-order of a floating-point number will be the
| same as the word-order of an integral type. It isn't the case on the FPA
| co-processor for the ARM for instance.
OK, thanks. I was actually thinking of the word-order of
floating-point numbers not that of integral types. I think I should
name it __TARGET_FLOAT_WORDS_ORDER__ ?
Is it reasonable to assume that the byte order of integral and
floating point coincide?
-- Gaby