diff options
author | Eric Christopher <echristo@apple.com> | 2006-11-01 05:14:40 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2006-11-01 05:14:40 +0000 |
commit | 167fa32c09eb5d93d23c74365a4ce818762de826 (patch) | |
tree | 75385000f3e0304a84896c064ff32d8b0dc1c9bb /gcc/doc | |
parent | 5880f14fe8b5809110d1c3858c9259641fd5b92d (diff) | |
download | gcc-167fa32c09eb5d93d23c74365a4ce818762de826.zip gcc-167fa32c09eb5d93d23c74365a4ce818762de826.tar.gz gcc-167fa32c09eb5d93d23c74365a4ce818762de826.tar.bz2 |
extend.texi (__builtin_bswap32): Document.
2006-09-07 Eric Christopher <echristo@apple.com>
Falk Hueffner <falk@debian.org>
* doc/extend.texi (__builtin_bswap32): Document.
(__builtin_bswap64): Ditto.
* doc/libgcc.texi (bswapsi2): Document.
(bswapdi2): Ditto.
* doc/rtl.texi (bswap): Document.
* optabs.c (expand_unop): Don't widen a bswap.
(init_optabs): Init bswap. Set libfuncs explicitly
for bswapsi2 and bswapdi2.
* optabs.h (OTI_bswap): New.
(bswap_optab): Ditto.
* genopinit.c (optabs): Handle bswap_optab.
* tree.h (tree_index): Add TI_UINT32_TYPE and
TI_UINT64_TYPE.
(uint32_type_node): New.
(uint64_type_node): Ditto.
* tree.c (build_common_tree_nodes_2): Initialize
uint32_type_node and uint64_type_node.
* builtins.c (expand_builtin_bswap): New.
(expand_builtin): Call.
(fold_builtin_bswap): New.
(fold_builtin_1): Call.
* fold-const.c (tree_expr_nonnegative_p): Return true
for bswap.
* builtin-types.def (BT_UINT32): New.
(BT_UINT64): Ditto.
(BT_FN_UINT32_UINT32): Ditto.
(BT_FN_UINT64_UINT64): Ditto.
* builtins.def (BUILT_IN_BSWAP32): New.
(BUILT_IN_BSWAP64): Ditto.
* rtl.def (BSWAP): New.
* genattrtab.c (check_attr_value): New.
* libgcc2.c (__bswapSI2): New.
(__bswapDI2): Ditto.
* libgcc2.h (__bswapSI2): Declare.
(__bswapDI2): Ditto.
* mklibgcc.in (lib2funcs): Add _bswapsi2 and _bswapdi2.
* simplify-rtx.c (simplify_const_unary_operation): Return
0 for BSWAP.
* libgcc-std.ver (__bwapsi2): Add.
(__bswapdi2): Ditto.
* reload1.c (eliminate_regs_1): Add bswap.
(elimination_effects): Ditto.
* config/i386/i386.h (x86_bswap): New.
(TARGET_BSWAP): Use.
* config/i386/i386.c (x86_bswap): Set.
Co-Authored-By: Falk Hueffner <falk@debian.org>
From-SVN: r118361
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/extend.texi | 10 | ||||
-rw-r--r-- | gcc/doc/libgcc.texi | 6 | ||||
-rw-r--r-- | gcc/doc/rtl.texi | 5 |
3 files changed, 20 insertions, 1 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 422c422..9ec4460 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -6116,6 +6116,16 @@ Similar to @code{__builtin_powi}, except the argument and return types are @code{long double}. @end deftypefn +@deftypefn {Built-in Function} int32_t __builtin_bswap32 (int32_t x) +Returns @var{x} with the order of the bytes reversed; for example, +@code{0xaabbccdd} becomes @code{0xddccbbaa}. Byte here always means +exactly 8 bits. +@end deftypefn + +@deftypefn {Built-in Function} int64_t __builtin_bswap64 (int64_t x) +Similar to @code{__builtin_bswap32}, except the argument and return types +are 64-bit. +@end deftypefn @node Target Builtins @section Built-in Functions Specific to Particular Target Machines diff --git a/gcc/doc/libgcc.texi b/gcc/doc/libgcc.texi index f67b117..fcc55d7 100644 --- a/gcc/doc/libgcc.texi +++ b/gcc/doc/libgcc.texi @@ -212,6 +212,11 @@ These functions return the value zero if the number of bits set in These functions return the number of bits set in @var{a}. @end deftypefn +@deftypefn {Runtime Function} int32_t __bswapsi2 (int32_t @var{a}) +@deftypefnx {Runtime Function} int64_t __bswapdi2 (int64_t @var{a}) +These functions return the @var{a} byteswapped. +@end deftypefn + @node Soft float library routines @section Routines for floating point emulation @cindex soft float library @@ -728,4 +733,3 @@ document me! @deftypefn {Runtime Function} void __clear_cache (char *@var{beg}, char *@var{end}) This function clears the instruction cache between @var{beg} and @var{end}. @end deftypefn - diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index 76e8f16..d97b2b3 100644 --- a/gcc/doc/rtl.texi +++ b/gcc/doc/rtl.texi @@ -2084,6 +2084,11 @@ mode @var{m}. The mode of @var{x} will usually be an integer mode. Represents the number of 1-bits modulo 2 in @var{x}, represented as an integer of mode @var{m}. The mode of @var{x} will usually be an integer mode. + +@findex bswap +@item (bswap:@var{m} @var{x}) +Represents the value @var{x} with the order of bytes reversed, carried out +in mode @var{m}, which must be a fixed-point machine mode. @end table @node Comparisons |