aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.def
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-04-11 11:13:39 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-04-11 11:13:39 +0000
commitac868f29d7e81636b988cc4b67f681dce3498175 (patch)
tree26e16c84589e707f12176d32446b9a868e2ac2b3 /gcc/builtins.def
parentcca4dd5983e33e31bfb559b7544428db628fd554 (diff)
downloadgcc-ac868f29d7e81636b988cc4b67f681dce3498175.zip
gcc-ac868f29d7e81636b988cc4b67f681dce3498175.tar.gz
gcc-ac868f29d7e81636b988cc4b67f681dce3498175.tar.bz2
re PR target/52624 (missing __builtin_bswap16)
PR target/52624 * doc/extend.texi (Other Builtins): Document __builtin_bswap16. (PowerPC AltiVec/VSX Built-in Functions): Remove it. * doc/md.texi (Standard Names): Add bswap. * builtin-types.def (BT_UINT16): New primitive type. (BT_FN_UINT16_UINT16): New function type. * builtins.def (BUILT_IN_BSWAP16): New. * builtins.c (expand_builtin_bswap): Add TARGET_MODE argument. (expand_builtin) <BUILT_IN_BSWAP16>: New case. Pass TARGET_MODE to expand_builtin_bswap. (fold_builtin_bswap): Add BUILT_IN_BSWAP16 case. (fold_builtin_1): Likewise. (is_inexpensive_builtin): Likewise. * optabs.c (expand_unop): Deal with bswap in HImode specially. Add missing bits for bswap to libcall code. * tree.c (build_common_tree_nodes): Build uint16_type_node. * tree.h (enum tree_index): Add TI_UINT16_TYPE. (uint16_type_node): New define. * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_BSWAP_HI): Delete. * config/rs6000/rs6000.c (rs6000_expand_builtin): Remove handling of above builtin. (rs6000_init_builtins): Likewise. * config/rs6000/rs6000.md (bswaphi2): Add TARGET_POWERPC predicate. c-family/ * c-common.h (uint16_type_node): Rename into... (c_uint16_type_node): ...this. * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming. * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise. From-SVN: r186308
Diffstat (limited to 'gcc/builtins.def')
-rw-r--r--gcc/builtins.def1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/builtins.def b/gcc/builtins.def
index 0cba2fe..d03e410 100644
--- a/gcc/builtins.def
+++ b/gcc/builtins.def
@@ -628,6 +628,7 @@ DEF_GCC_BUILTIN (BUILT_IN_AGGREGATE_INCOMING_ADDRESS, "aggregate_incoming
DEF_EXT_LIB_BUILTIN (BUILT_IN_ALLOCA, "alloca", BT_FN_PTR_SIZE, ATTR_MALLOC_NOTHROW_LEAF_LIST)
DEF_GCC_BUILTIN (BUILT_IN_APPLY, "apply", BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE, ATTR_NULL)
DEF_GCC_BUILTIN (BUILT_IN_APPLY_ARGS, "apply_args", BT_FN_PTR_VAR, ATTR_LEAF_LIST)
+DEF_GCC_BUILTIN (BUILT_IN_BSWAP16, "bswap16", BT_FN_UINT16_UINT16, ATTR_CONST_NOTHROW_LEAF_LIST)
DEF_GCC_BUILTIN (BUILT_IN_BSWAP32, "bswap32", BT_FN_UINT32_UINT32, ATTR_CONST_NOTHROW_LEAF_LIST)
DEF_GCC_BUILTIN (BUILT_IN_BSWAP64, "bswap64", BT_FN_UINT64_UINT64, ATTR_CONST_NOTHROW_LEAF_LIST)
DEF_EXT_LIB_BUILTIN (BUILT_IN_CLEAR_CACHE, "__clear_cache", BT_FN_VOID_PTR_PTR, ATTR_NOTHROW_LEAF_LIST)