diff options
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/cpp.texi | 24 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 7 | ||||
-rw-r--r-- | gcc/doc/tm.texi.in | 7 |
3 files changed, 24 insertions, 14 deletions
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index a580e6108c8..ddcf81467f6 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -2265,6 +2265,30 @@ Defined to the number of bytes of the C standard data types: @code{int}, @code{double}, @code{long double}, @code{size_t}, @code{wchar_t}, @code{wint_t} and @code{ptrdiff_t}. +@item __BYTE_ORDER__ +@itemx __ORDER_LITTLE_ENDIAN__ +@itemx __ORDER_BIG_ENDIAN__ +@itemx __ORDER_PDP_ENDIAN__ +@code{__BYTE_ORDER__} is defined to one of the values +@code{__ORDER_LITTLE_ENDIAN__}, @code{__ORDER_BIG_ENDIAN__}, or +@code{__ORDER_PDP_ENDIAN__} to reflect the layout of multi-byte and +multi-word quantities in memory. If @code{__BYTE_ORDER__} is equal to +@code{__ORDER_LITTLE_ENDIAN__} or @code{__ORDER_BIG_ENDIAN__}, then +multi-byte and multi-word quantities are laid out identically: the +byte (word) at the lowest address is the least significant or most +significant byte (word) of the quantity, respectively. If +@code{__BYTE_ORDER__} is equal to @code{__ORDER_PDP_ENDIAN__}, then +bytes in 16-bit words are laid out in a little-endian fashion, whereas +the 16-bit subwords of a 32-bit quantity are laid out in big-endian +fashion. + +You should use these macros for testing like this: + +@smallexample +/* @r{Test for a little-endian machine} */ +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +@end smallexample + @item __DEPRECATED This macro is defined, with value 1, when compiling a C++ source file with warnings about deprecated constructs enabled. These warnings are diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index dd319e14069..66a092fbc1a 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -918,13 +918,6 @@ order of words in memory is the same as the order in registers. This macro need not be a constant. @end defmac -@defmac LIBGCC2_WORDS_BIG_ENDIAN -Define this macro if @code{WORDS_BIG_ENDIAN} is not constant. This must be a -constant value with the same meaning as @code{WORDS_BIG_ENDIAN}, which will be -used only when compiling @file{libgcc2.c}. Typically the value will be set -based on preprocessor defines. -@end defmac - @defmac FLOAT_WORDS_BIG_ENDIAN Define this macro to have the value 1 if @code{DFmode}, @code{XFmode} or @code{TFmode} floating point numbers are stored in memory with the word diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index a0855c0c6e1..a5fb0007920 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -912,13 +912,6 @@ order of words in memory is the same as the order in registers. This macro need not be a constant. @end defmac -@defmac LIBGCC2_WORDS_BIG_ENDIAN -Define this macro if @code{WORDS_BIG_ENDIAN} is not constant. This must be a -constant value with the same meaning as @code{WORDS_BIG_ENDIAN}, which will be -used only when compiling @file{libgcc2.c}. Typically the value will be set -based on preprocessor defines. -@end defmac - @defmac FLOAT_WORDS_BIG_ENDIAN Define this macro to have the value 1 if @code{DFmode}, @code{XFmode} or @code{TFmode} floating point numbers are stored in memory with the word |