diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-04 22:14:56 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-04 22:14:56 +0000 |
commit | 6b53160639f10dae0b019bc8a0cafb18eca4d230 (patch) | |
tree | a30ef11d74c7da9ce0ee003131a81a63259e96d2 /gcc/expr.c | |
parent | 4fc789b6842b60da700b757c99f326062bd54539 (diff) | |
download | gcc-6b53160639f10dae0b019bc8a0cafb18eca4d230.tar.gz |
gcc/
* optabs.h (reload_in_optab, reload_out_optab, code_to_optab)
(vcond_gen_code, vcondu_gen_code, movmem_optab, setmem_optab)
(cmpstr_optab, cmpstrn_optab, cmpmem_optab, sync_add_optab)
(sync_sub_optab, sync_ior_optab, sync_and_optab, sync_xor_optab)
(sync_nand_optab, sync_old_add_optab, sync_old_sub_optab)
(sync_old_ior_optab, sync_old_and_optab, sync_old_xor_optab)
(sync_old_nand_optab, sync_new_add_optab, sync_new_sub_optab)
(sync_new_ior_optab, sync_new_and_optab, sync_new_xor_optab)
(sync_new_nand_optab): Redefine as macros.
(sync_compare_and_swap, sync_lock_test_and_set, sync_lock_release):
Delete.
(direct_optab_index): New enum.
(direct_optab_d): New structure.
(direct_optab): New typedef.
(direct_optab_table): Declare.
(direct_optab_handler, set_direct_optab_handler): New functions.
(sync_compare_and_swap_optab, sync_lock_test_and_set_optab)
(sync_lock_release_optab): New macros.
* optabs.c (direct_optab_table): New variable.
(movcc_gen_code, vcond_gen_code, vcondu_gen_code): Delete.
(prepare_cmp_insn): Use direct_optab_handler for cmpmem_optab,
cmpstr_optab and cmpstrn_optab.
(emit_conditional_move): Likewise for movcc_optab.
(can_conditionally_move_p): Likewise for movcc_gen_code.
(init_insn_codes): Clear direct_optab_table.
(init_optabs): Don't initialize the new "direct optabs" here.
(get_vcond_icode): Use direct_optab_handler for vcondu_gen_code and
vcond_gen_code.
(expand_val_compare_and_swap): Likewise sync_compare_and_swap_optab.
(expand_bool_compare_and_swap): Likewise sync_compare_and_swap_optab.
(expand_compare_and_swap_loop): Likewise sync_compare_and_swap_optab.
(expand_sync_operation): Likewise other sync_*_optabs.
(expand_sync_fetch_operation): Likewise. Rename sync_compare_and_swap
to sync_compare_and_swap_optab.
(expand_sync_lock_test_and_set): Use direct_optab_handler for
sync_lock_test_and_set and sync_compare_and_swap, adding "_optab"
to the names of both.
* builtins.c (expand_builtin_strcmp): Use direct_optab_handler for
cmpstr_optab and cmpstrn_optab.
(expand_builtin_lock_release): Likewise sync_lock_release.
* expr.c (movmem_optab, setmem_optab, cmpstr_optab, cmpstrn_optab)
(cmpmem_optab, sync_add_optab, sync_sub_optab, sync_ior_optab)
(sync_and_optab, sync_xor_optab, sync_nand_optab, sync_old_add_optab)
(sync_old_sub_optab, sync_old_ior_optab, sync_old_and_optab)
(sync_old_xor_optab, sync_old_nand_optab, sync_new_add_optab)
(sync_new_sub_optab, sync_new_ior_optab, sync_new_and_optab)
(sync_new_xor_optab, sync_new_nand_optab, sync_compare_and_swap)
(sync_lock_test_and_set, sync_lock_release): Delete.
(emit_block_move_via_movmem): Use direct_optab_handler for movmem_optab.
(emit_block_move_via_setmem): Use direct_optab_handler for setmem_optab.
* genopinit.c (optabs): Use set_direct_optab_handler for the new
macro optabs.
* omp-low.c (expand_omp_atomic_fetch_op): Update the type of
the "optab" local variable. Use direct_optab_handler for optab and
sync_compare_and_swap_optab.
* reload1.c (reload_in_optab, reload_out_optab): Delete.
* targhooks.c (default_secondary_reload): Use direct_optab_handler for
reload_in_optab and reload_out_optab.
* config/alpha/alpha.c (alpha_secondary_reload): Likewise.
* config/frv/frv.c (frv_alloc_temp_reg): Likewise.
* config/pa/pa.c (pa_secondary_reload): Likewise.
* java/builtins.c (compareAndSwapInt_builtin): Use direct_optab_handler
for sync_compare_and_swap, renaming it to sync_compare_and_swap_optab.
(compareAndSwapLong_builtin, compareAndSwapObject_builtin): Likewise.
(VMSupportsCS8_builtin): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161810 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index a21735d2670..23baa63435b 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -201,41 +201,6 @@ static bool float_extend_from_mem[NUM_MACHINE_MODES][NUM_MACHINE_MODES]; < (unsigned int) MOVE_RATIO (optimize_insn_for_speed_p ())) #endif -/* This array records the insn_code of insns to perform block moves. */ -enum insn_code movmem_optab[NUM_MACHINE_MODES]; - -/* This array records the insn_code of insns to perform block sets. */ -enum insn_code setmem_optab[NUM_MACHINE_MODES]; - -/* These arrays record the insn_code of three different kinds of insns - to perform block compares. */ -enum insn_code cmpstr_optab[NUM_MACHINE_MODES]; -enum insn_code cmpstrn_optab[NUM_MACHINE_MODES]; -enum insn_code cmpmem_optab[NUM_MACHINE_MODES]; - -/* Synchronization primitives. */ -enum insn_code sync_add_optab[NUM_MACHINE_MODES]; -enum insn_code sync_sub_optab[NUM_MACHINE_MODES]; -enum insn_code sync_ior_optab[NUM_MACHINE_MODES]; -enum insn_code sync_and_optab[NUM_MACHINE_MODES]; -enum insn_code sync_xor_optab[NUM_MACHINE_MODES]; -enum insn_code sync_nand_optab[NUM_MACHINE_MODES]; -enum insn_code sync_old_add_optab[NUM_MACHINE_MODES]; -enum insn_code sync_old_sub_optab[NUM_MACHINE_MODES]; -enum insn_code sync_old_ior_optab[NUM_MACHINE_MODES]; -enum insn_code sync_old_and_optab[NUM_MACHINE_MODES]; -enum insn_code sync_old_xor_optab[NUM_MACHINE_MODES]; -enum insn_code sync_old_nand_optab[NUM_MACHINE_MODES]; -enum insn_code sync_new_add_optab[NUM_MACHINE_MODES]; -enum insn_code sync_new_sub_optab[NUM_MACHINE_MODES]; -enum insn_code sync_new_ior_optab[NUM_MACHINE_MODES]; -enum insn_code sync_new_and_optab[NUM_MACHINE_MODES]; -enum insn_code sync_new_xor_optab[NUM_MACHINE_MODES]; -enum insn_code sync_new_nand_optab[NUM_MACHINE_MODES]; -enum insn_code sync_compare_and_swap[NUM_MACHINE_MODES]; -enum insn_code sync_lock_test_and_set[NUM_MACHINE_MODES]; -enum insn_code sync_lock_release[NUM_MACHINE_MODES]; - /* SLOW_UNALIGNED_ACCESS is nonzero if unaligned accesses are very slow. */ #ifndef SLOW_UNALIGNED_ACCESS @@ -1315,7 +1280,7 @@ emit_block_move_via_movmem (rtx x, rtx y, rtx size, unsigned int align, for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) { - enum insn_code code = movmem_optab[(int) mode]; + enum insn_code code = direct_optab_handler (movmem_optab, mode); insn_operand_predicate_fn pred; if (code != CODE_FOR_nothing @@ -2791,7 +2756,7 @@ set_storage_via_setmem (rtx object, rtx size, rtx val, unsigned int align, for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) { - enum insn_code code = setmem_optab[(int) mode]; + enum insn_code code = direct_optab_handler (setmem_optab, mode); insn_operand_predicate_fn pred; if (code != CODE_FOR_nothing |