From 427911176defd91fb2ac55f17bde1da551c2c02b Mon Sep 17 00:00:00 2001 From: geoffk Date: Wed, 1 Nov 2006 05:14:40 +0000 Subject: 2006-09-07 Eric Christopher Falk Hueffner * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118361 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/optabs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/optabs.h') diff --git a/gcc/optabs.h b/gcc/optabs.h index 0f84c9828d5..b47e7623a2e 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -146,6 +146,8 @@ enum optab_index /* Abs value */ OTI_abs, OTI_absv, + /* Byteswap */ + OTI_bswap, /* Bitwise not */ OTI_one_cmpl, /* Bit scanning and counting */ @@ -312,6 +314,7 @@ extern GTY(()) optab optab_table[OTI_MAX]; #define abs_optab (optab_table[OTI_abs]) #define absv_optab (optab_table[OTI_absv]) #define one_cmpl_optab (optab_table[OTI_one_cmpl]) +#define bswap_optab (optab_table[OTI_bswap]) #define ffs_optab (optab_table[OTI_ffs]) #define clz_optab (optab_table[OTI_clz]) #define ctz_optab (optab_table[OTI_ctz]) -- cgit v1.2.1