diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-23 00:43:34 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-23 00:43:34 +0000 |
commit | 27213ba397c5c3a1319ecee3d31dd3245adf8492 (patch) | |
tree | 225e7d74032f42f96e15423bfcbf7cdf88e6d1e8 /gcc/builtins.def | |
parent | 8a4a17f4732b4d070d6b67896a36e95080cccbfc (diff) | |
download | gcc-27213ba397c5c3a1319ecee3d31dd3245adf8492.tar.gz |
Merge from gomp-branch.
* builtins.def: Move all DEF_SYNC_BUILTIN to ...
* sync-builtins.def: ... new file.
(BUILT_IN_FETCH_AND_ADD_16,
BUILT_IN_FETCH_AND_SUB_16, BUILT_IN_FETCH_AND_OR_16,
BUILT_IN_FETCH_AND_AND_16, BUILT_IN_FETCH_AND_XOR_16,
BUILT_IN_FETCH_AND_NAND_16, BUILT_IN_ADD_AND_FETCH_16,
BUILT_IN_SUB_AND_FETCH_16, BUILT_IN_OR_AND_FETCH_16,
BUILT_IN_AND_AND_FETCH_16, BUILT_IN_XOR_AND_FETCH_16,
BUILT_IN_NAND_AND_FETCH_16, BUILT_IN_BOOL_COMPARE_AND_SWAP_16,
BUILT_IN_VAL_COMPARE_AND_SWAP_16, BUILT_IN_LOCK_TEST_AND_SET_16,
BUILT_IN_LOCK_RELEASE_16): New builtins.
* builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16,
BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
* builtins.c (expand_builtin): Handle sync BUILT_IN_*_16 builtins.
* c-common.c (enum c_builtin_type): Move to top-level from
c_common_nodes_and_builtins enum builtin_type.
(builtin_types): Move from c_common_nodes_and_builtins.
(def_fn_type): New.
(c_common_nodes_and_builtins): Use it.
(def_builtin_1): Check for error_mark_node.
(sync_resolve_size): Handle also 128 bit sync builtins.
* Makefile.in (BUILTINS_DEF): New. Use it instead of builtins.def.
* config/i386/i386.h (x86_cmpxchg8b, x86_cmpxchg16b): New decls.
(TARGET_CMPXCHG8B, TARGET_CMPXCHG16B): Define.
* config/i386/i386.c (x86_cmpxchg8b, x86_cmpxchg16b): New variables.
* config/i386/sync.md (CASMODE, DCASMODE): New mode macros.
(doublemodesuffix, DCASHMODE): New mode attrs.
(sync_compare_and_swap<mode>): Change into expand, use CASMODE
instead of IMODE, if mode is wider than a word, expand into
sync_double_compare_and_swap*.
(*sync_compare_and_swap<mode>): New insn.
(sync_double_compare_and_swap<mode>): Likewise.
(*sync_double_compare_and_swapdi_pic): Likewise.
(sync_compare_and_swap_cc<mode>): Use CASMODE instead of IMODE, if
mode is wider than a word, expand into
sync_double_compare_and_swap_cc*.
(sync_double_compare_and_swap_cc<mode>): New insn.
(*sync_double_compare_and_swap_ccdi_pic): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108997 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.def')
-rw-r--r-- | gcc/builtins.def | 194 |
1 files changed, 2 insertions, 192 deletions
diff --git a/gcc/builtins.def b/gcc/builtins.def index 7788719d259..d3563612237 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -709,195 +709,5 @@ DEF_EXT_LIB_BUILTIN (BUILT_IN_VPRINTF_CHK, "__vprintf_chk", BT_FN_INT_INT_CON DEF_BUILTIN_STUB (BUILT_IN_PROFILE_FUNC_ENTER, "profile_func_enter") DEF_BUILTIN_STUB (BUILT_IN_PROFILE_FUNC_EXIT, "profile_func_exit") -/* Synchronization Primitives. The "_N" version is the one that the user - is supposed to be using. It's overloaded, and is resolved to one of the - "_1" through "_8" versions, plus some extra casts. */ - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_ADD_N, "__sync_fetch_and_add", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_ADD_1, "__sync_fetch_and_add_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_ADD_2, "__sync_fetch_and_add_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_ADD_4, "__sync_fetch_and_add_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_ADD_8, "__sync_fetch_and_add_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_SUB_N, "__sync_fetch_and_sub", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_SUB_1, "__sync_fetch_and_sub_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_SUB_2, "__sync_fetch_and_sub_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_SUB_4, "__sync_fetch_and_sub_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_SUB_8, "__sync_fetch_and_sub_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_OR_N, "__sync_fetch_and_or", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_OR_1, "__sync_fetch_and_or_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_OR_2, "__sync_fetch_and_or_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_OR_4, "__sync_fetch_and_or_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_OR_8, "__sync_fetch_and_or_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_AND_N, "__sync_fetch_and_and", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_AND_1, "__sync_fetch_and_and_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_AND_2, "__sync_fetch_and_and_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_AND_4, "__sync_fetch_and_and_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_AND_8, "__sync_fetch_and_and_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_XOR_N, "__sync_fetch_and_xor", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_XOR_1, "__sync_fetch_and_xor_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_XOR_2, "__sync_fetch_and_xor_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_XOR_4, "__sync_fetch_and_xor_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_XOR_8, "__sync_fetch_and_xor_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_NAND_N, "__sync_fetch_and_nand", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_NAND_1, "__sync_fetch_and_nand_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_NAND_2, "__sync_fetch_and_nand_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_NAND_4, "__sync_fetch_and_nand_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_NAND_8, "__sync_fetch_and_nand_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_ADD_AND_FETCH_N, "__sync_add_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_ADD_AND_FETCH_1, "__sync_add_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_ADD_AND_FETCH_2, "__sync_add_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_ADD_AND_FETCH_4, "__sync_add_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_ADD_AND_FETCH_8, "__sync_add_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_SUB_AND_FETCH_N, "__sync_sub_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_SUB_AND_FETCH_1, "__sync_sub_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_SUB_AND_FETCH_2, "__sync_sub_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_SUB_AND_FETCH_4, "__sync_sub_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_SUB_AND_FETCH_8, "__sync_sub_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_OR_AND_FETCH_N, "__sync_or_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_OR_AND_FETCH_1, "__sync_or_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_OR_AND_FETCH_2, "__sync_or_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_OR_AND_FETCH_4, "__sync_or_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_OR_AND_FETCH_8, "__sync_or_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_AND_AND_FETCH_N, "__sync_and_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_AND_AND_FETCH_1, "__sync_and_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_AND_AND_FETCH_2, "__sync_and_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_AND_AND_FETCH_4, "__sync_and_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_AND_AND_FETCH_8, "__sync_and_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_XOR_AND_FETCH_N, "__sync_xor_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_XOR_AND_FETCH_1, "__sync_xor_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_XOR_AND_FETCH_2, "__sync_xor_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_XOR_AND_FETCH_4, "__sync_xor_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_XOR_AND_FETCH_8, "__sync_xor_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_NAND_AND_FETCH_N, "__sync_nand_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_NAND_AND_FETCH_1, "__sync_nand_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_NAND_AND_FETCH_2, "__sync_nand_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_NAND_AND_FETCH_4, "__sync_nand_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_NAND_AND_FETCH_8, "__sync_nand_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_BOOL_COMPARE_AND_SWAP_N, - "__sync_bool_compare_and_swap", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_BOOL_COMPARE_AND_SWAP_1, - "__sync_bool_compare_and_swap_1", - BT_FN_BOOL_VPTR_I1_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_BOOL_COMPARE_AND_SWAP_2, - "__sync_bool_compare_and_swap_2", - BT_FN_BOOL_VPTR_I2_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_BOOL_COMPARE_AND_SWAP_4, - "__sync_bool_compare_and_swap_4", - BT_FN_BOOL_VPTR_I4_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_BOOL_COMPARE_AND_SWAP_8, - "__sync_bool_compare_and_swap_8", - BT_FN_BOOL_VPTR_I8_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_VAL_COMPARE_AND_SWAP_N, - "__sync_val_compare_and_swap", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_VAL_COMPARE_AND_SWAP_1, - "__sync_val_compare_and_swap_1", - BT_FN_I1_VPTR_I1_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_VAL_COMPARE_AND_SWAP_2, - "__sync_val_compare_and_swap_2", - BT_FN_I2_VPTR_I2_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_VAL_COMPARE_AND_SWAP_4, - "__sync_val_compare_and_swap_4", - BT_FN_I4_VPTR_I4_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_VAL_COMPARE_AND_SWAP_8, - "__sync_val_compare_and_swap_8", - BT_FN_I8_VPTR_I8_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_TEST_AND_SET_N, "__sync_lock_test_and_set", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_TEST_AND_SET_1, "__sync_lock_test_and_set_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_TEST_AND_SET_2, "__sync_lock_test_and_set_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_TEST_AND_SET_4, "__sync_lock_test_and_set_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_TEST_AND_SET_8, "__sync_lock_test_and_set_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_RELEASE_N, "__sync_lock_release", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_RELEASE_1, "__sync_lock_release_1", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_RELEASE_2, "__sync_lock_release_2", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_RELEASE_4, "__sync_lock_release_4", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_RELEASE_8, "__sync_lock_release_8", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_SYNCHRONIZE, "__sync_synchronize", - BT_FN_VOID, ATTR_NOTHROW_LIST) +/* Synchronization Primitives. */ +#include "sync-builtins.def" |