aboutsummaryrefslogtreecommitdiff
path: root/gcc/genopinit.c
AgeCommit message (Collapse)AuthorFilesLines
2005-06-28builtins.c: (expand_builtin_memset): Rewrite to support ↵Adrian Straetling1-1/+1
'set_storage_via_setmem'. 2006-06-28 Adrian Straetling <straetling@de.ibm.com> * builtins.c: (expand_builtin_memset): Rewrite to support 'set_storage_via_setmem'. * expr.c: (enum insn_code setmem_optab): Define. (enum insn_code clrmem_optab): Remove. (set_storage_via_setmem): New function. (clear_storage_via_setmem): Remove. (clear_storage): Replace call to "clear_storage_via_clrmem" with "set_storage_via_setmem". * expr.h: (set_storage_via_setmem): Declare. (CLEAR_RATIO): Redefine using HAVE_setmemM. * optabs.h: (enum insn_code setmem_optab): Declare. (enum insn_code clrmem_optab): Remove. * optabs.c: (init_optabs): Initialize setmem_optab. (enum insn_code clrmem_optab): Remove. * genopinit.c: (otabs): Likewise. * doc/md.texi: Document new standard pattern 'setmem'. Remove 'clrmem'. * config/alpha/alpha.c: (alpha_expand_block_clear): Adjust 'operands' ordering. * config/frv/frv.c: (frv_expand_block_clear): Likewise. * config/rs6000/rs6000.c: (expand_block_clear): Likewise. * config/alpha/alpha.md: ("clrmemqi", "clrmemdi"): Rename to "setmemM". FAIL on operands[2]!=const0_rtx. Adjust 'operands' ordering. * config/avr/avr.md: ("clrmemhi"): Likewise. * config/frv/frv.md: ("clrmemsi"): Likewise. * config/i386/i386.md: ("clrmemsi", "clrmemdi"): Likewise. * config/pa/pa.md: ("clrmemsi", "clrmemdi"): Likewise. * config/rs6000/rs6000.md: ("clrmemsi"): Likewise. * config/s390/s390.md: ("clrmem<mode>"): Likewise. From-SVN: r101386
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-06-21genopinit.c (vec_shl_optab, [...]): Initialize new optabs.Dorit Nuzman1-1/+4
* genopinit.c (vec_shl_optab, vec_shr_optab): Initialize new optabs. (reduc_plus_optab): Removed. Replcaed with... (reduc_splus_optab, reduc_uplus_optab): Initialize new optabs. * optabs.c (optab_for_tree_code): Return reduc_splus_optab or reduc_uplus_optab instead of reduc_plus_optab. (expand_vec_shift_expr): New function. (init_optabs): Initialize new optabs. Remove initialization of reduc_plus_optab. (optab_for_tree_code): Return vec_shl_optab/vec_shr_optab for VEC_LSHIFT_EXPR/VEC_RSHIFT_EXPR. * optabs.h (OTI_reduc_plus): Removed. Replaced with... (OTI_reduc_splus, OTI_reduc_uplus): New. (reduc_plus_optab): Removed. Replcaed with... (reduc_splus_optab, reduc_uplus_optab): New optabs. (vec_shl_optab, vec_shr_optab): New optabs. (expand_vec_shift_expr): New function declaration. * tree.def (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Handle new tree-codes. * expr.c (expand_expr_real_1): Handle new tree-codes. * tree-pretty-print.c (dump_generic_node, op_symbol, op_prio): Likewise. * tree-vect-generic.c (expand_vector_operations_1): Add assert. * tree-vect-transform.c (vect_create_epilog_for_reduction): Add two alternatives for generating reduction epilog code. (vectorizable_reduction): Don't fail of direct reduction support is not available. (vectorizable_target_reduction_pattern): Likewise. * config/rs6000/altivec.md (reduc_smax_v4si, reduc_smax_v4sf, reduc_umax_v4si, reduc_smin_v4si, reduc_smin_v4sf, reduc_umin_v4si, reduc_plus_v4si, reduc_plus_v4sf): Removed. (vec_shl_<mode>, vec_shr_<mode>, altivec_vsumsws_nomode, reduc_splus_<mode>, reduc_uplus_v16qi): New. From-SVN: r101231
2005-06-18tree.def (REDUC_MAX_EXPR, [...]): New tree-codes.Dorit Nuzman1-1/+6
* tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): New tree-codes. * optabs.h (OTI_reduc_smax, OTI_reduc_umax, OTI_reduc_smin, OTI_reduc_umin, OTI_reduc_plus): New optabs for reduction. (reduc_smax_optab, reduc_umax_optab, reduc_smin_optab, reduc_umin_optab, reduc_plus_optab): New optabs for reduction. * expr.c (expand_expr_real_1): Handle new tree-codes. * tree-inline.c (estimate_num_insns_1): Handle new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio, op_symbol): Handle new tree-codes. * optabs.c (optab_for_tree_code): Handle new tree-codes. (init_optabs): Initialize new optabs. * genopinit.c (optabs): Define handlers for new optabs. * tree-vect-analyze.c (vect_analyze_operations): Fail vectorization in case of a phi that is marked as relevant. Call vectorizable_reduction. (vect_mark_relevant): Phis may be marked as relevant. (vect_mark_stmts_to_be_vectorized): The use corresponding to the reduction variable in a reduction stmt does not mark its defining phi as relevant. Update documentation accordingly. (vect_can_advance_ivs_p): Skip reduction phis. * tree-vect-transform.c (vect_get_vec_def_for_operand): Takes additional argument. Handle reduction. (vect_create_destination_var): Update call to vect_get_new_vect_var. Handle non-vector argument. (get_initial_def_for_reduction): New function. (vect_create_epilog_for_reduction): New function. (vectorizable_reduction): New function. (vect_get_new_vect_var): Handle new vect_var_kind. (vectorizable_assignment, vectorizable_operation, vectorizable_store, vectorizable_condition): Update call to vect_get_new_vect_var. (vect_transform_stmt): Call vectorizable_reduction. (vect_update_ivs_after_vectorizer): Skip reduction phis. (vect_transform_loop): Skip if stmt is both not relevant and not live. * tree-vectorizer.c (reduction_code_for_scalar_code): New function. (vect_is_simple_reduction): Was empty - added implementation. * tree-vectorizer.h (vect_scalar_var): New enum vect_var_kind value. (reduc_vec_info_type): New enum vect_def_type value. * config/rs6000/altivec.md (reduc_smax_v4si, reduc_smax_v4sf, reduc_umax_v4si, reduc_smin_v4si, reduc_umin_v4sf, reduc_smin_v4sf, reduc_plus_v4si, reduc_plus_v4sf): New define_expands. * tree-vect-analyze.c (vect_determine_vectorization_factor): Remove ENABLE_CHECKING around gcc_assert. * tree-vect-transform.c (vect_do_peeling_for_loop_bound, (vect_do_peeling_for_alignment, vect_transform_loop, vect_get_vec_def_for_operand): Likewise. From-SVN: r101155
2005-04-14re PR middle-end/14311 (builtins for atomic operations needed)Richard Henderson1-1/+24
PR middle-end/14311 * builtin-types.def (BT_BOOL, BT_VOLATILE_PTR, BT_I1, BT_I2, BT_I4, BT_I8, BT_FN_VOID_VPTR, BT_FN_I1_VPTR_I1, BT_FN_I2_VPTR_I2, BT_FN_I4_VPTR_I4, BT_FN_I8_VPTR_I8, BT_FN_BOOL_VPTR_I1_I1, BT_FN_BOOL_VPTR_I2_I2, BT_FN_BOOL_VPTR_I4_I4, BT_FN_BOOL_VPTR_I8_I8, BT_FN_I1_VPTR_I1_I1, BT_FN_I2_VPTR_I2_I2, BT_FN_I4_VPTR_I4_I4, BT_FN_I8_VPTR_I8_I8): New. * builtins.def (DEF_SYNC_BUILTIN): New. (BUILT_IN_FETCH_AND_ADD_N, BUILT_IN_FETCH_AND_ADD_1, BUILT_IN_FETCH_AND_ADD_2, BUILT_IN_FETCH_AND_ADD_4, BUILT_IN_FETCH_AND_ADD_8, BUILT_IN_FETCH_AND_SUB_N, BUILT_IN_FETCH_AND_SUB_1, BUILT_IN_FETCH_AND_SUB_2, BUILT_IN_FETCH_AND_SUB_4, BUILT_IN_FETCH_AND_SUB_8, BUILT_IN_FETCH_AND_OR_N, BUILT_IN_FETCH_AND_OR_1, BUILT_IN_FETCH_AND_OR_2, BUILT_IN_FETCH_AND_OR_4, BUILT_IN_FETCH_AND_OR_8, BUILT_IN_FETCH_AND_AND_N, BUILT_IN_FETCH_AND_AND_1, BUILT_IN_FETCH_AND_AND_2, BUILT_IN_FETCH_AND_AND_4, BUILT_IN_FETCH_AND_AND_8, BUILT_IN_FETCH_AND_XOR_N, BUILT_IN_FETCH_AND_XOR_1, BUILT_IN_FETCH_AND_XOR_2, BUILT_IN_FETCH_AND_XOR_4, BUILT_IN_FETCH_AND_XOR_8, BUILT_IN_FETCH_AND_NAND_N, BUILT_IN_FETCH_AND_NAND_1, BUILT_IN_FETCH_AND_NAND_2, BUILT_IN_FETCH_AND_NAND_4, BUILT_IN_FETCH_AND_NAND_8, BUILT_IN_ADD_AND_FETCH_N, BUILT_IN_ADD_AND_FETCH_1, BUILT_IN_ADD_AND_FETCH_2, BUILT_IN_ADD_AND_FETCH_4, BUILT_IN_ADD_AND_FETCH_8, BUILT_IN_SUB_AND_FETCH_N, BUILT_IN_SUB_AND_FETCH_1, BUILT_IN_SUB_AND_FETCH_2, BUILT_IN_SUB_AND_FETCH_4, BUILT_IN_SUB_AND_FETCH_8, BUILT_IN_OR_AND_FETCH_N, BUILT_IN_OR_AND_FETCH_1, BUILT_IN_OR_AND_FETCH_2, BUILT_IN_OR_AND_FETCH_4, BUILT_IN_OR_AND_FETCH_8, BUILT_IN_AND_AND_FETCH_N, BUILT_IN_AND_AND_FETCH_1, BUILT_IN_AND_AND_FETCH_2, BUILT_IN_AND_AND_FETCH_4, BUILT_IN_AND_AND_FETCH_8, BUILT_IN_XOR_AND_FETCH_N, BUILT_IN_XOR_AND_FETCH_1, BUILT_IN_XOR_AND_FETCH_2, BUILT_IN_XOR_AND_FETCH_4, BUILT_IN_XOR_AND_FETCH_8, BUILT_IN_NAND_AND_FETCH_N, BUILT_IN_NAND_AND_FETCH_1, BUILT_IN_NAND_AND_FETCH_2, BUILT_IN_NAND_AND_FETCH_4, BUILT_IN_NAND_AND_FETCH_8, BUILT_IN_BOOL_COMPARE_AND_SWAP_N, BUILT_IN_BOOL_COMPARE_AND_SWAP_1, BUILT_IN_BOOL_COMPARE_AND_SWAP_2, BUILT_IN_BOOL_COMPARE_AND_SWAP_4, BUILT_IN_BOOL_COMPARE_AND_SWAP_8, BUILT_IN_VAL_COMPARE_AND_SWAP_N, BUILT_IN_VAL_COMPARE_AND_SWAP_1, BUILT_IN_VAL_COMPARE_AND_SWAP_2, BUILT_IN_VAL_COMPARE_AND_SWAP_4, BUILT_IN_VAL_COMPARE_AND_SWAP_8, BUILT_IN_LOCK_TEST_AND_SET_N, BUILT_IN_LOCK_TEST_AND_SET_1, BUILT_IN_LOCK_TEST_AND_SET_2, BUILT_IN_LOCK_TEST_AND_SET_4, BUILT_IN_LOCK_TEST_AND_SET_8, BUILT_IN_LOCK_RELEASE_N, BUILT_IN_LOCK_RELEASE_1, BUILT_IN_LOCK_RELEASE_2, BUILT_IN_LOCK_RELEASE_4, BUILT_IN_LOCK_RELEASE_8, BUILT_IN_SYNCHRONIZE: New. * builtins.c (called_as_built_in): Rewrite from CALLED_AS_BUILT_IN as a function. Accept __sync_ as a prefix as well. (expand_builtin_sync_operation, expand_builtin_compare_and_swap, expand_builtin_lock_test_and_set, expand_builtin_synchronize, expand_builtin_lock_release): New. (expand_builtin): Call them. * c-common.c (DEF_BUILTIN): Don't require __builtin_ prefix if neither BOTH_P nor FALLBACK_P are defined. (builtin_type_for_size): New. (sync_resolve_size, sync_resolve_params, sync_resolve_return): New. (resolve_overloaded_builtin): New. * c-common.h (resolve_overloaded_builtin): Declare. (builtin_type_for_size): Declare. * c-typeck.c (build_function_call): Invoke resolve_overloaded_builtin. * expr.c (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_compare_and_swap_cc, sync_lock_test_and_set, sync_lock_release): New. * optabs.h: Declare them. * expr.h (expand_val_compare_and_swap, expand_bool_compare_and_swap, expand_sync_operation, expand_sync_fetch_operation, expand_sync_lock_test_and_set): Declare. * genopinit.c (optabs): Add sync optabs. * optabs.c (init_optabs): Initialize sync optabs. (expand_val_compare_and_swap_1, expand_val_compare_and_swap, expand_bool_compare_and_swap, expand_compare_and_swap_loop, expand_sync_operation, expand_sync_fetch_operation, expand_sync_lock_test_and_set): New. * doc/extend.texi (Atomic Builtins): New section * doc/md.texi (Standard Names): Add sync patterns. From-SVN: r98154
2005-04-11* builtins.def (BUILT_IN_LCEIL, BUILT_IN_LCEILF, BUILT_IN_LCEILL)Uros Bizjak1-0/+1
(BUILT_IN_LLCEIL, BUILT_IN_LLCEILF, BUILT_IN_LLCEILL): New. * optabs.h (enum optab_index): Add new OTI_lceil. (lceil_optab): Define corresponding macro. * optabs.c (init_optabs): Initialize lceil_optab. * genopinit.c (optabs): Implement lceil_optab using lceilsi2 and lceildi2 patterns. * builtins.c (expand_builtin_int_roundingfn): Handle BUILT_IN_LCEIL{,F,L} and BUILT_IN_LLCEIL{,F,L}. (fold_builtin_int_roundingfn): Handle BUILT_IN_LCEIL{,F,L} and BUILT_IN_LLCEIL{,F,L}. (fold_builtin_1): Fold BUILT_IN_LCEIL{,F,L} and BUILT_IN_LLCEIL{,F,L} using fold_builtin_int_roundingfn. (mathfn_built_in): Handle BUILT_IN LCEIL and BUILT_IN_LLCEIL. (expand_builtin): Expand BUILT_IN_LCEIL{,F,L} and BUILT_IN_LLCEIL{,F,L} using expand_builtin_int_roundingfn. * convert.c (convert_to_integer): Convert (long int)ceil{,f,l}, into lceil built-in function and (long long int)ceil{,f,l} into llceil built-in function. * fold-const.c (tree_expr_nonnegative_p): Add BUILT_IN_LCEIL and BUILT_IN_LLCEIL. testsuite: * gcc.dg/builtins-53.c: Also check (int)ceil* and (long long int)ceil*. From-SVN: r97964
2005-04-09* builtins.def (BUILT_IN_LFLOOR, BUILT_IN_LFLOORF, BUILT_IN_LFLOORL)Uros Bizjak1-0/+1
(BUILT_IN_LLFLOOR, BUILT_IN_LLFLOORF, BUILT_IN_LLFLOORL): New. * optabs.h (enum optab_index): Add new OTI_lfloor. (lfloor_optab): Define corresponding macro. * optabs.c (init_optabs): Initialize lfloor_optab. * genopinit.c (optabs): Implement lfloor_optab using lfloorsi2 and lfloordi2 patterns. * builtins.c (expand_builtin_int_roundingfn): New prototype. (expand_builtin_int_roundingfn): New function. (fold_builtin_int_roundingfn): New prototype. (fold_builtin_int_roundingfn): New function, renamed from fold_builtin_lround. Handle BUILT_IN_LROUND{,F,L}, BUILT_IN_LLROUND{,F,L} and BUILT_IN_LFLOOR{,F,L}, BUILT_IN_LLFLOOR{,F,L}. (fold_builtin_1): Fold BUILT_IN_LFLOOR{,F,L} and BUILT_IN_LLFLOOR{,F,L} using fold_builtin_int_roundingfn. (mathfn_built_in): Handle BUILT_IN LFLOOR and BUILT_IN_LLFLOOR. (expand_builtin): Expand BUILT_IN_LFLOOR{,F,L} and BUILT_IN_LLFLOOR{,F,L} using expand_builtin_int_roundingfn. * convert.c (convert_to_integer): Convert (long int)floor{,f,l}, into lfloor built-in function and (long long int)floor{,f,l} into llfloor built-in function. * fold-const.c (tree_expr_nonnegative_p): Add BUILT_IN_LFLOOR and BUILT_IN_LLFLOOR. testsuite: * gcc.dg/builtins-53.c: New test. From-SVN: r97886
2005-03-24optabs.h (enum optab_index): Remove OTI_llrint.Uros Bizjak1-1/+0
* optabs.h (enum optab_index): Remove OTI_llrint. (llrint_optab): Remove macro. * optabs.c (init_optabs): Remove llrint_optab initialization. * genopinit.c (optabs): Remove llrint_optab implementation. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LLRINT{,F,L} using lrint_optab. From-SVN: r96983
2005-03-21optabs.h (enum optab_index): Add new OTI_lrint and OTI_llrint.Uros Bizjak1-0/+2
* optabs.h (enum optab_index): Add new OTI_lrint and OTI_llrint. (lrint_optab, llrint_optab): Define corresponding macros. * optabs.c (init_optabs): Initialize lrint_optab and llrint_optab. * genopinit.c (optabs): Implement lrint_optab using lrintsi2 pattern and llrint_optab using llrintdi2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LRINT{,F,L} using lrint_optab and BUILT_IN_LLRINT{,F,L} using llrint_optab. (expand_builtin): Expand BUILT_IN_LRINT{,F,L} and BUILT_IN_LLRINT{,F,L} using expand_builtin_mathfn if flag_unsafe_math_optimizations is set. testsuite: * gcc.dg/builtins-46.c: Also check lrint* and llrint*. From-SVN: r96802
2005-02-12optabs.h (enum optab_index): Add new OTI_ldexp.Uros Bizjak1-0/+1
* optabs.h (enum optab_index): Add new OTI_ldexp. (ldexp_optab): Define corresponding macro. * optabs.c (init_optabs): Initialize ldexp_optab. * genopinit.c (optabs): Implement ldexp_optab using ldexp?f3 patterns. * builtins.c (expand_builtin_mathfn_2): Handle BUILT_IN_LDEXP{,F,L} using ldexp_optab. (expand_builtin): Expand BUILT_IN_LDEXP{,F,L} using expand_builtin_mathfn_2 if flag_unsafe_math_optimizations is set. * config/i386/i386.md (ldexpsf3, ldexpdf3, ldexpxf3): New expanders to implement ldexpf, ldexp and ldexpl built-ins as inline x87 intrinsics. testsuite: * gcc.dg/builtins-34.c: Also check ldexp*. From-SVN: r94931
2005-01-27builtins.c (expand_builtin_copysign): New.Richard Henderson1-0/+1
* builtins.c (expand_builtin_copysign): New. (expand_builtin): Call it. * genopinit.c (optabs): Add copysign_optab. * optabs.c (init_optabs): Initialize it. (expand_copysign): New. * optabs.h (OTI_copysign, copysign_optab): New. (expand_copysign): Declare. * config/alpha/alpha.md (UNSPEC_COPYSIGN): New. (copysignsf3, ncopysignsf3, copysigndf3, ncopysigndf3): New. * config/i386/i386.c (ix86_build_signbit_mask): Split from ... (ix86_expand_fp_absneg_operator): ... here. (ix86_split_copysign): New. * config/i386/i386-protos.h: Update. * config/i386/i386.md (UNSPEC_COPYSIGN): New. (copysignsf3, copysigndf3): New. * config/ia64/ia64.md (UNSPEC_COPYSIGN): New. (copysignsf3, ncopysignsf3): New. (copysigndf3, ncopysigndf3): New. (copysignxf3, ncopysignxf3): New. * config/ia64/ia64.c (rtx_needs_barrier): Handle UNSPEC_COPYSIGN. From-SVN: r94357
2005-01-22genopinit.c (optabs): Use smin/smax for floating point too.Richard Henderson1-5/+3
* genopinit.c (optabs): Use smin/smax for floating point too. * doc/md.texi: Update to match. Clarify that floating point results are undefined for +0/-0 and NaN. * doc/rtl.texi: Likewise. * rtl.def (SMIN, SMAX): Likewise * tree.def (MIN_EXPR, MAX_EXPR): Likewise. * config/alpha/alpha.md (smaxdf3, smindf3, smaxsf3, sminsf3): Add leading 's' to the name. * config/ia64/ia64.md (smaxsf3, sminsf3, smaxdf3, smindf3, smaxxf3, sminxf3): Likewise. * config/rs6000/rs6000.md (smaxdf3, smindf3, smaxsf3, sminsf3): Likewise. From-SVN: r94083
2004-12-22optabs.h (OTI_movmisalign, [...]): New.Richard Henderson1-0/+1
* optabs.h (OTI_movmisalign, movmisalign_optab): New. * optabs.c (init_optabs): Create it. * genopinit.c (optabs): Initialize it. * expr.c (expand_expr_real_1) <MISALIGNED_INDIRECT_REF>: Use it. * tree-vectorizer.c (vect_supportable_dr_alignment): Likewise. * target-def.h (TARGET_VECTORIZE_MISALIGNED_MEM_OK): Remove. * target.h (vectorize.misaligned_mem_ok): Remove. * targhooks.c (default_vect_misaligned_mem_ok): Remove. * doc/md.texi (movmisalign): New. * doc/tm.texi (TARGET_VECTORIZE_MISALIGNED_MEM_OK): Remove. From-SVN: r92537
2004-12-09genopinit.c (vec_realign_store_optab): Initialization removed.Dorit Naishlos1-1/+0
2004-12-09 Dorit Naishlos <dorit@il.ibm.com> * genopinit.c (vec_realign_store_optab): Initialization removed. * optabs.c (optab_for_tree_code): REALIGN_STORE_EXPR case removed. * optabs.h (optab_index): OTI_vec_realign_store Removed. (vec_realign_store_optab): Removed. * target-def.h (TARGET_VECTORIZE_BUILTIN_MASK_FOR_STORE): Removed. * target.h (builtin_mask_for_store): Removed. * tree.def (REALIGN_STORE_EXPR): Removed. * config/rs6000/rs6000.c (rs6000_builtin_mask_for_store): Removed. (altivec_builtin_mask_for_store): Removed. (altivec_init_builtins): Removed initialization of altivec_builtin_mask_for_store. * doc/tm.texi (TARGET_VECTORIZE_MISALIGNED_MEM_OK): New. (TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD): New. From-SVN: r91932
2004-09-27expr.c (expand_expr_real_1): Handle VEC_COND_EXPR.Devang Patel1-1/+3
* expr.c (expand_expr_real_1): Handle VEC_COND_EXPR. * genopinit.c (optabs): New entry for vcond_gen_code and vcondu_gen_code. * optabs.c (vcond_gen_code, vcondu_gen_code): New optabs. (get_rtx_code): New function. (vector_compare_rtx): New function. (init_optabs): Initialize vcond_gen_code and vcondu_gen_code. (expand_vec_cond_expr_p): New function. (expand_vec_cond_expr): New function. (get_vcond_icode): New function. * optabs.h (expand_vec_cond_expr, expand_vec_cond_expr_p): New externs. (vcond_gen_code, vcondu_gen_code): Same. From-SVN: r88209
2004-09-23tree.def (ALIGN_INDIRECT_REF, [...]): New tree-codes.Dorit Naishlos1-1/+3
2004-09-23 Dorit Naishlos <dorit@il.ibm.com> * tree.def (ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF): New tree-codes. * tree.h (REF_ORIGINAL): Consider ALIGN_INDIRECT_REF and MISALIGNED_INDIRECT_REF. * alias.c (get_alias_set, nonoverlapping_memrefs_p): Likewise. * emit-rtl.c (mem_expr_equal_p, set_mem_attributes_minus_bitpos): Likewise. * expr.c (safe_from_p, expand_expr_real_1, rewrite_address_base) (find_interesting_uses_address): Likewise. * fold-const.c (non_lvalue, operand_equal_p): Likewise. (build_fold_addr_expr_with_type): Likewise. * gimplify.c (gimplify_addr_expr, gimplify_expr): Likewise. * print-rtl.c (print_mem_expr): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-gimple.c (is_gimple_addressable, get_base_address): Likewise. * tree-pretty-print.c (op_prio, op_symbol, dump_generic_node): Likewise. * tree-ssa-alias.c (find_ptr_dereference, ptr_is_dereferenced_by): Likewise. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise. * tree-ssa-dom.c (record_equivalences_from_stmt): Likewise. * tree-ssa-loop-im.c (for_each_index, is_call_clobbered_ref): Likewise. * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Likewise. (add_address_candidates, rewrite_address_base): Likewise. * tree-ssa-operands.c (get_expr_operands, get_indirect_ref_operands): Likewise. * tree.c (staticp, build1_stat): Likewise. * tree.def (REALIGN_LOAD_EXPR, REALIGN_STORE_EXPR): New tree-codes. * tree-pretty-print.c (dump_generic_node): Consider REALIGN_LOAD_EXPR. * tree-ssa-operands.c (get_expr_operands): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.h (vec_realign_store_optab, vec_realign_load_optab): New optabs. (OTI_vec_realign_store, OTI_vec_realign_load): New optab_index values for the new optabs. (expand_ternary_op): New function. * genopinit.c (optabs): Handle the new optabs. * optabs.c (optab_for_tree_code): Add cases for the new tree-codes. (init_optabs): Initialize vec_realign_load_optab. (expand_ternary_op): New functions. * target-def.h (TARGET_VECTORIZE): New member for struct gcc_target. (TARGET_VECTORIZE_MISALIGNED_MEM_OK): New member for targetm.vectorize. (TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD): Likewise. (TARGET_VECTORIZE_BUILTIN_MASK_FOR_STORE): Likewise. * target.h (struct vectorize): New member for struct gcc_target. (misaligned_mem_ok): New member for targetm.vectorize. (builtin_mask_for_load): Likewise. (builtin_mask_for_store): Likewise. * targethooks.c (default_vect_misaligned_mem_ok): New function. * targethooks.h (default_vect_misaligned_mem_ok): New function. * config/rs6000/altivec.md (build_vector_mask_for_load): New define_expand. (vec_realign_load_v4si, vec_realign_load_v4sf, vec_realign_load_v8hi) (vec_realign_load_v16qi): New define_insn. * config/rs6000/rs6000.h (ALTIVEC_BUILTIN_MASK_FOR_LOAD): (ALTIVEC_BUILTIN_MASK_FOR_STORE): New target builtins. * config/rs6000/rs6000.c (altivec_builtin_mask_for_load): (altivec_builtin_mask_for_store): New variables. (rs6000_builtin_mask_for_load): New function. Implements TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD. (rs6000_builtin_mask_for_store): New function. Implements TARGET_VECTORIZE_BUILTIN_MASK_FOR_STORE. (rs6000_expand_builtin): Expand the target builtins builtin_mask_for_load and builtin_mask_for_store. (altivec_init_builtins): Initialize the new target builtins. * config/i386/i386.c (ix86_misaligned_mem_ok): New function. Implements the target hook TARGET_VECTORIZE_MISALIGNED_MEM_OK. * tree-vectorizer.c (vect_create_data_ref): Renamed to vect_create_data_ref_ptr. Returns a pointer instead of an array-ref. (vect_create_addr_base_for_vector_ref): Additional argument (offset). (vectorizable_store): Call vect_create_data_ref_ptr with additional arguments, and create an indirect_ref with its return value data_ref. Check aligned_access_p. (vectorizable_load): Handle misaligned loads, using software-pipelined scheme with REALIGN_LOAD_EXPR and ALIGN_INDIRECT_REF if vec_realign_load_optab is supported, or using a scheme without software-pipelining with MISALIGNED_INDIRECT_REF if the target hook misaligned_mem_ok is supported. (vect_finish_stmt_generation): Typo. (vect_enhance_data_refs_alignment): Rename loop_vinfo to loop_info. (vect_analyze_data_refs_alignment): Don't fail vectorization in the presence of misaligned loads. (vect_analyze_data_ref_access): Add check for constant init. (vect_get_symbl_and_dr): Remove duplicate line. * tree-vectorizer.h (DR_MISALIGNMENT): Add comment. From-SVN: r87948
2004-09-09Makefile.in (gengtype): Use $(BUILD_ERRORS).Nathan Sidwell1-1/+1
* Makefile.in (gengtype): Use $(BUILD_ERRORS). (gengtype.o): Depend on errors.h. * genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable. (attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr, attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn, write_test_expr, write_attr_value, write_eligible_delay, make_internal_attr, make_numeric_value): Likewise. * genautomata.c (regexp_name, get_str_vect, gen_presence_absence_set, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps, process_regexp_cycles, reserv_sets_cmp, set_unit_reserv, test_unit_reserv, it_is_empty_reserv_sets, reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or, reserv_sets_and, output_cycle_reservs, get_free_state, intersected_state_reservs_p, states_union, remove_arc, copy_insn_regexp, transform_1, transform_2, transform_3, regexp_transform_func, store_alt_unit_usage, check_regexp_units_distribution, process_seq_for_forming_states, process_alts_for_forming_states, make_automaton, form_arcs_marked_by_insn, create_composed_state, set_out_arc_insns_equiv_num, partition_equiv_class, process_insn_equiv_class, set_insn_equiv_classes, units_to_automata_heuristic_distr, form_regexp, longest_path_length, output_dfa_max_issue_rate, add_vect, out_state_arcs_num, add_vect_el, output_trans_table, output_state_alts_table, output_dead_lock_vect, output_max_insn_queue_index_def, output_min_insn_conflict_delay_func, output_internal_insn_latency_func, output_print_reservation_func, output_cpu_unit_reservation_p, output_state_arcs, make_insn_alts_attr, make_internal_dfa_insn_code_attr, make_default_insn_latency_attr, form_important_insn_automata_lists): Likewise. * genemit.c (gen_exp, output_add_clobbers, output_added_clobbers_hard_reg_p): Likewise. * genextract.c (print_path, main): Likewise. * genflags.c (gen_macro): Likewise. * gengenrtl.c: Include errors.h (type_from_format, accessor_from_format): Likewise. * gengtype.c (get_file_basename, output_mangled_typename, walk_type, write_types_process_field, write_types_local_process_field): Likewise. * genmodes.c (complete_mode): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (output_insn_data, check_constraint_len, constraint_len): Likewise. * genpreds.c (add_mode_tests):Likewise. * gen-protos.c (add_hash): Likewise. * genrecog.c (find_operand, find_matching_operand, validate_pattern, add_to_sequence, maybe_both_true, nodes_identical_1, merge_trees, write_switch, write_cond, write_action, is_unconditional, make_insn_sequence, debug_decision_2): Likewise. * gensupport.c (is_predicable, collect_insn_data, alter_predicate_for_insn, maybe_eval_c_test): Likewise. From-SVN: r87236
2004-09-04builtins.c (expand_builtin_mathfn): Handle BUILT_IN_RINT{,F,L} using rint_optab.Uros Bizjak1-1/+2
2004-09-04 Uros Bizjak <uros@kss-loka.si> * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_RINT{,F,L} using rint_optab. (expand_builtin): Expand BUILT_IN_RINT{,F,L} using expand_builtin_mathfn. * genopinit.c (optabs): Rename trunc_optab to btrunc_optab. Use btrunc?f patterns for btrunc_optab. Implement rint_optab using rint?f patterns. * optabs.c (init_optabs): Initialize rint_optab. * optabs.h (enum optab_index): Rename OTI_trunc to OTI_btrunc. Add new OTI_rint. (btrunc_optab): Rename macro from trunc_optab. (rint_optab): Define corresponding macro. * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FRNDINT_FLOOR, UNSPEC_FRNDINT_CEIL, UNSPEC_FRNDINT_TRUNC, UNSPEC_FRNDINT_MASK_PM. * config/i386/i386-protos.h (emit_i387_cw_initialization): Change prototype. Add new int parameter. * config/i386/i386.c (emit_i387_cw_initialization): Handle new rounding modes. * config/i386/i386.h (enum fp_cw_mode): Delete. (MODE_NEEDED): Handle new rounding modes. (EMIT_MODE_SET): Change condition to handle new rounding modes. * config/i386/i386.md (UNSPEC_FRNDINT_FLOOR, UNSPEC_FRNDINT_CEIL, UNSPEC_FRNDINT_TRUNC, UNSPEC_FRNDINT_MASK_PM): New unspecs to represent different rounding modes of frndint insn. (type): Add frndint type. (i387, length, memory): Handle this type. (i387_cw): New attribute definition. (*fix_truncdi_1, fix_truncdi_nomemory, fix_truncdi_memory, *fix_truncsi_1, fix_truncsi_nomemory, fix_truncsi_memory, *fix_trunchi_1, fix_trunchi_nomemory, fix_trunchi_memory): Add "i387_cw" attribute defined to "trunc". (x86_fnstcw_1): Remove comment. (*frndintxf2): Rename insn definition to frndintxf2. Move insn definition near rint?f2 expanders. (rintdf2, rintsf2, rintxf2): New expanders to implement rint, rintf and rintl built-ins as inline x87 intrinsics. (frndintxf2_floor): New pattern to implement floor rounding mode with frndint x87 instruction. (floordf2, floorsf2, floorxf2): New expanders to implement floor, floorf and floorl built-ins as inline x87 intrinsics. (frndintxf2_ceil): New pattern to implement ceil rounding mode with frndint x87 instruction. (ceildf2, ceilsf2, ceilxf2): New expanders to implement ceil, ceilf and ceill built-ins as inline x87 intrinsics. (frndintxf2_trunc): New pattern to implement trunc rounding mode with frndint x87 instruction. (btruncdf2, btruncsf2, btruncxf2): New expanders to implement trunc, truncf and truncl built-ins as inline x87 intrinsics. (frndintxf2_mask_pm): New pattern to implement rounding mode with exceptions with frndint x87 instruction. (nearbyintdf2, nearbyintsf2, nearbyintxf2): New expanders to implement nearbyint, nearbyintf and nearbyintl built-ins as inline x87 intrinsics. * testsuite/gcc.dg/builtins-46.c: New. From-SVN: r87076
2004-08-03gensupport.c (init_md_reader_args_cb): Renamed from init_md_reader_args.Zack Weinberg1-3/+0
* gensupport.c (init_md_reader_args_cb): Renamed from init_md_reader_args. Add third option, callback function for parsing program-specific options. Add diagnosis of incorrect number of input files. (init_md_reader): Fold into init_md_reader_args_cb. (init_md_reader_args): Now a thin wrapper around init_md_reader_args_cb. * gensupport.h: Update prototypes. * genattr.c, genattrtab.c, gencodes.c, genconfig.c, genemit.c * genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c * genrecog.c: No need to diagnose lack of an input file; init_md_reader_args will handle it. * genconditions.c: Likewise, and use init_md_reader_args. * genconstants.c: Likewise, and no need to call read_md_rtx. From-SVN: r85511
2004-08-02* genopinit.c (gen_insn): Check for MODE_COMPLEX_FLOAT patterns for $F.J"orn Rennecke1-0/+1
From-SVN: r85435
2004-07-07builtins.c: Rename movstr*, except for movstrict*, to movmem* and clrstr* to ↵Alexandre Oliva1-2/+2
clrmem*. gcc/ChangeLog: * builtins.c: Rename movstr*, except for movstrict*, to movmem* and clrstr* to clrmem*. * expr.c: Likewise. * expr.h: Likewise. * genopinit.c: Likewise. * integrate.c: Likewise. * local-alloc.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * config/alpha/alpha.h: Likewise. * config/alpha/alpha.md: Likewise. * config/arm/arm-protos.h: Likewise. * config/arm/arm.c: Likewise. * config/arm/arm.md: Likewise. * config/avr/avr.md: Likewise. * config/c4x/c4x.c: Likewise. * config/c4x/c4x.md: Likewise. * config/frv/frv.md: Likewise. * config/i386/i386-protos.h: Likewise. * config/i386/i386.c: Likewise. * config/i386/i386.h: Likewise. * config/i386/i386.md: Likewise. * config/i860/i860.c: Likewise. * config/i860/i860.md: Likewise. * config/ip2k/ip2k.md: Likewise. * config/ip2k/libgcc.S: Likewise. * config/ip2k/t-ip2k: Likewise. * config/m32r/m32r.c: Likewise. * config/m32r/m32r.md: Likewise. * config/mcore/mcore.md: Likewise. * config/mips/mips.c: Likewise. * config/mips/mips.md: Likewise. * config/ns32k/ns32k.c: Likewise. * config/ns32k/ns32k.h: Likewise. * config/ns32k/ns32k.md: Likewise. * config/pa/pa.c: Likewise. * config/pa/pa.md: Likewise. * config/pdp11/pdp11.h: Likewise. * config/pdp11/pdp11.md: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rs6000/rs6000.md: Likewise. * config/s390/s390-protos.h: Likewise. * config/s390/s390.c: Likewise. * config/s390/s390.md: Likewise. * config/sh/lib1funcs.asm: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh.md: Likewise. * config/sh/t-sh: Likewise. * config/sparc/sparc.h: Likewise. * config/vax/vax.md: Likewise. * config/xtensa/xtensa.c: Likewise. * config/xtensa/xtensa.md: Likewise. * doc/invoke.texi: Likewise. * doc/md.texi: Likewise. * doc/rtl.texi: Likewise. gcc/testsuite/ChangeLog: * gcc.c-torture/execute/builtins/mempcpy-2.c: Rename movstr*, except for movstrict*, to movmem* and clrstr* to clrmem*. From-SVN: r84222
2004-05-07optabs.h (enum optab_index): Add new OTI_log1p.Uros Bizjak1-0/+1
* optabs.h (enum optab_index): Add new OTI_log1p. (log1p_optab): Define corresponding macro. * optabs.c (init_optabs): Initialize log1p_optab. * genopinit.c (optabs): Implement log1p_optab using log1p?f2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOG1P{,F,L} using log1p_optab. (expand_builtin): Expand BUILT_IN_LOG1P{,F,L} using expand_builtin_mathfn if flag_unsafe_math_optimizations is set. * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FYL2XP1. * config/i386/i386.c (ix86_emit_i387_log1p): New function. * config/i386/i386-protos.h (ix86_emit_i387_log1p): Prototype here. * config/i386/i386.md (UNSPEC_FYL2XP1): New unspec to represent x87's fyl2xp1 instruction. (*fyl2x_xf3): Rename insn definition to fyl2x_xf3. (fyl2xp1_xf3): New pattern to implement fyl2xp1 x87 instruction. (log1psf2, log1pdf2, log1pxf2): New expanders to implement log1pf, log1p and log1pl built-ins as inline x87 intrinsics. * testsuite/gcc.dg/builtins-33.c: Also check log1p*. From-SVN: r81606
2004-05-06optabs.h (enum optab_index): Add new OTI_fmod and OTI_drem.Uros Bizjak1-0/+2
* optabs.h (enum optab_index): Add new OTI_fmod and OTI_drem. (fmod_optab): Define corresponding macros. * optabs.c (init_optabs): Initialize fmod_optab and drem_optab. * genopinit.c (optabs): Implement fmod_optab and drem_optab using fmod?f3 and drem?f3 patterns. * builtins.c (expand_builtin_mathfn_2): Handle BUILT_IN_FMOD{,F,L} using fmod_optab and BUILT_IN_DREM{,F,L} using drem_optab. (expand_builtin): Expand BUILT_IN_FMOD{,F,L} and BUILT_IN_DREM{,F,L} using expand_builtin_mathfn_2 if flag_unsafe_math_optimizations is set. * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FPREM_F, UNSPEC_FPREM_U, UNSPEC_FPREM1_F and UNSPEC_FPREM1_U. * config/i386/i386.c (ix86_emit_fp_unordered_jump): New function. * config/i386/i386-protos.h (ix86_emit_fp_unordered_jump): Prototype here. * config/i386/i386.md (UNSPEC_FPREM_F, UNSPEC_FPREM_U, UNSPEC_FPREM1_F, UNSPEC_FPREM1_U): New unspecs to represent x87's fprem and fprem1 instructions. (*x86_fnstsw_1): Change input parameter to (reg:CCFP 18). Rename insn definition to x86_fnstsw_1. (fpremxf4, fprem1xf4): New patterns to implement fprem and fprem1 x87 instructions. (fmodsf3, fmoddf3, fmodxf3): New expanders to implement fmodf, fmod and fmodl built-ins as inline x87 intrinsics. (dremsf3, dremdf3, dremxf3): New expanders to implement dremf, drem and dreml built-ins as inline x87 intrinsics. * testsuite/gcc.dg/builtins-40.c: New test. From-SVN: r81555
2004-05-03optabs.h (enum optab_index): Add new OTI_expm1.Uros Bizjak1-0/+1
2004-05-03 Uros Bizjak <uros@kss-loka.si> * optabs.h (enum optab_index): Add new OTI_expm1. (expm1_optab): Define corresponding macro. * optabs.c (init_optabs): Initialize expm1_optab. * genopinit.c (optabs): Implement expm1_optab using expm1?f2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXPM1{,F,L} using expm1_optab. (expand_builtin): Expand BUILT_IN_EXPM1{,F,L} using expand_builtin_mathfn if flag_unsafe_math_optimizations is set. * config/i386/i386.md (expm1df2, expm1sf2, expm1xf2): New expanders to implement expm1, expm1f and expm1l built-ins as inline x87 intrinsics. testsuite: * gcc.dg/builtins-34.c: Also check expm1*. From-SVN: r81425
2004-04-20optabs.h (enum optab_index): Add new OTI_asin and OTI_acos.Uros Bizjak1-0/+2
2004-04-20 Uros Bizjak <uros@kss-loka.si> * optabs.h (enum optab_index): Add new OTI_asin and OTI_acos. (asin_optab, acos_optab): Define corresponding macros. * optabs.c (init_optabs): Initialize asin_optab and acos_optab. * genopinit.c (optabs): Implement asin_optab and acos_optab using asin?f2 and acos?f2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_ASIN{,F,L} using asin_optab, and BUILT_IN_ACOS{,F,L} using acos_optab. (expand_builtin): Expand BUILT_IN_ASIN{,F,L} and BUILT_IN_ACOS{,F,L} using expand_builtin_mathfn if flag_unsafe_math_optimizations is set. * config/i386/i386.md (asindf2, asinsf2, asinxf2, acosdf2, acossf2, acosxf2): New expanders to implement asin, asinf, asinl, acos, acosf and acosl built-ins as inline x87 intrinsics. * gcc.dg/builtins-39.c: New test. From-SVN: r80921
2004-04-15optabs.h (enum optab_index): Add new OTI_logb and OTI_ilogb.Uros Bizjak1-0/+2
2004-04-14 Uros Bizjak <uros@kss-loka.si> * optabs.h (enum optab_index): Add new OTI_logb and OTI_ilogb. (logb_optab, ilogb_optab): Define corresponding macros. * optabs.c (init_optabs): Initialize logb_optab and ilogb_optab. * genopinit.c (optabs): Implement logb_optab and ilogb_optab using logb?f2 and ilogb?i2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOGB{,F,L} using logb_optab, and BUILT_IN_ILOGB{,F,L} using ilogb_optab. (expand_builtin): Expand BUILT_IN_LOGB{,F,L} and BUILT_IN_ILOGB{,F,L} using expand_builtin_mathfn if flag_unsafe_math_optimizations is set. * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_XTRACT_FRACT and UNSPEC_XTRACT_EXP. * config/i386/i386.md (*fxtractdf3, *fxtractsf3, *fxtractxf3): New patterns to implement fxtract x87 instruction. (logbdf2, logbsf2, logbxf2, ilogbsi2): New expanders to implement logb, logbf, logbl, ilogb, ilogbf and ilogbl built-ins as inline x87 intrinsics. (UNSPEC_XTRACT_FRACT, UNSPEC_XTRACT_EXP): New unspecs to represent x87's fxtract insn. * gcc.dg/builtins-38.c: New test. From-SVN: r80709
2004-04-06builtins.c: Implement support for sincos function.Uros Bizjak1-0/+1
2004-04-06 Uros Bizjak <uros@kss-loka.si> * builtins.c: Implement support for sincos function. (expand_builtin_mathfn): Remove BUILT_IN_SIN{,F,L} and BUILT_IN_COS{,F,L}. (expand_builtin_mathfn_3): New function. (expand_builtin): Expand BUILT_IN_SIN{,F,L} and BUILT_IN_COS{,F,L} using expand_builtin_mathfn_3 if flag_unsafe_math_optimization is set. * optabs.h (enum optab_index): Add new OTI_sincos. (sincos_optab): Define corresponding macro. * optabs.c (init_optabs): Initialize sincos_optab. (expand_twoval_unop): New function. * genopinit.c (optabs): Implement sincos_optab using sincos?f3 patterns. * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_SINCOS_COS and UNSPEC_SINCOS_SIN. * config/i386/i386.md (sincosdf3, sincossf3, *sincosextendsfdf3, sincosxf3): New patterns to implement sincos, sincosf and sincosl built-ins as inline x87 intrinsics. Define splits for sindf2, sinsf2, *sinextendsfdf2, sinxf2, cosdf2, cossf2, *cosextendsfdf2 and cosxf2 patterns from corresponding sincos patterns. (sindf2, sinsf2, sinxf2): Rename to *sindf2, *sinsf2, *sinxf2. (cosdf2, cossf2, cosxf2): Rename to *cosdf2, *cossf2, *cosxf2. (UNSPEC_SINCOS_SIN, UNPEC_SINCOS_COS): New unspecs to represent x87's unspec insn. * gcc.dg/builtins-36.c: New test. From-SVN: r80463
2004-03-10optabs.h (enum optab_index): Add new OTI_exp10 and OTI_exp2.Uros Bizjak1-0/+2
2004-03-10 Uros Bizjak <uros@kss-loka.si> * optabs.h (enum optab_index): Add new OTI_exp10 and OTI_exp2. (exp10_optab, exp2_optab): Define corresponding macros. * optabs.c (init_optabs): Initialize exp10_optab and exp2_optab. * genopinit.c (optabs): Implement exp10_optab and exp2_optab using exp10?f2 and exp2?f2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXP10{,F,L} using exp10_optab, and BUILT_IN_EXP2{,F,L} using exp2_optab. (expand_builtin): Expand BUILT_IN_EXP10{,F,L} and BUILT_IN_EXP2{,F,L} using expand_builtin_mathfn if flag_unsafe_math_optimizations is set. * config/i386/i386.md (exp10sf2, exp10df2, exp10xf2, exp2sf2, exp2df2, exp2xf2): New patterns to implement exp10, exp10f, exp10l, exp2, exp2f and exp2l built-ins as inline x87 intrinsics. * gcc.dg/builtins-34.c: New test. From-SVN: r79279
2004-03-03alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new ↵Paolo Bonzini1-1/+3
rtx class codes... 2004-02-07 Paolo Bonzini <bonzini@gnu.org> * alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes, possibly splitting conditionals that tested against '<' and 'o'. * caller-save.c (save_call_clobbered_regs): Likewise. * combine.c (contains_muldiv, find_split_point, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_compound_operation, if_then_else_cond, known_cond, apply_distributive_law, cached_nonzero_bits, cached_num_sign_bit_copies, simplify_shift_const, gen_binary, simplify_comparison, update_table_tick, record_value_for_reg, get_lsat_value_validate): Likewise. * cse.c (mention_regs, find_best_addr, find_comparison_args, fold_rtx, cse_insn, invalidate_memory, cse_basic_block): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * expr.c (force_operand): Likewise. * final.c (final_scan_insn, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond): Likewise. * function.c (update_epilogue_consts): Likewise. * genattrtab.c (attr_rtx_1): Likewise. * genopinit.c (gen_insn): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, delete_related_insns, rtx_renumbered_equal_p): Likewise. * local-alloc.c (block_alloc): Likewise. * loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv, canonicalize_condition): Likewise. * loop-iv.c (simplify_using_conditions, iv_number_of_iterations): Likewise. * optabs.c (add_equal_node, expand_binop): Likewise. * predict.c (estimate_probability): Likewise. * ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise. * recog.c (validate_replace_rtx_1, comparison_operator, offsettable_address_p, constrain_operands): Likewise. * reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (stable_and_no_regs_but_for_p): Likewise. * regrename.c (kill_autoinc_value): Likewise. * reload.c (find_reusable_reload, find_reloads, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (gen_reload, delete_address_reloads_1): Likewise. * rtl.c (copy_rtx): Likewise. * rtl.h (CONSTANT_P, INSN_P): Likewise. * rtlanal.c (commutative_operand_precedence): Likewise. * sched-deps.c (conditions_mutex_p): Likewise. * sched-rgn.c (is_cfg_nonregular): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational, simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_ternary_operation, simplify_rtx): Likewise. * unroll.c (reg_dead_after_loop): Likewise. * config/alpha/alpha.c (alpha_swapped_comparison_operator, print_operand): Likewise. * config/arc/arc.c (proper_comparison_operator): Likewise. * config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode): Likewise. * config/avr/avr.c (_reg_unused_after): Likewise. * config/frv/frv.c (frv_ifcvt_modify_tests, frv_ifcvt_modify_insn, frv_pack_insn): Likewise. * config/i386/i386.c (ix86_comparison_operator, ix86_carry_flag_operator, fcmov_comparison_operator, arith_or_logical_operator, print_operand, ix86_expand_binary_operator, ix86_binary_operator_ok): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (not_postinc_memory_operand, ia64_print_operand, update_set_flags, errata_emit_nops): Likewise. * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS, CONSTRAINT_OK_FOR_S): Likewise. * config/ip2k/ip2k.c (mdr_resequence_xy_yx, mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p, ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator): Likewise. * config/iq2000/iq2000.c (cmp_op, symbolic_expression_p, eqne_comparison_operator, signed_comparison_operator): Likewise. * config/mips/mips.c (cmp_op, symbolic_expression_p): Likewise. * config/mmix/mmix (mmix_foldable_comparison_operator, mmix_comparison_operator): Likewise. * config/pa/pa.c (hppa_legitimize_address): Likewise. * config/rs6000/rs6000.c (stmw_operation, branch_comparison_operator, trap_comparison_operator, ccr_bit): Likewise. * config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise. * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison):L Likewise. * config/sh/sh.c (gen_block_redirect, reg_unused_after): Likewise. * config/sparc/sparc.c (eq_or_neq, normal_comp_operator, noov_compare_op, noov_compare64_op, v9_regcmp_op, emit_hard_tfmode_operation, reg_unused_after) * doc/md.texi, doc/rtl.texi: Likewise. * ra-debug.c: Add 2004 to list of copyright years. * unroll.c: Likewise. * combine.c (simplify_logical): Remove dummy test, (apply_distributive_law): Fix typo in comment. GET_CODE (x) == AND so x is a commutative binary op. * jump.c (delete_related_insns): simplify loop condition, move testing of RTX codes inside the loop. (rtx_renumbered_equal_p): do not use RTX_CODE. * rtl.c (rtx_class): Declare as enum rtx_class. * rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED): Move to RTX_COMM_COMPARE class. (HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE): Move to RTX_CONST_OBJ class. * rtl.h (enum rtx_class): New declaration, (RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK, RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT, RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK, RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT, RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P, ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P, SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P, OBJECT_P): New macros. * config/sparc/sparc.c (noov_compare_op): Remove register from parameter. From-SVN: r78824
2004-02-11optabs.h (enum optab_index): Add new OTI_log10 and OTI_log2.Uros Bizjak1-0/+2
2004-02-11 Uros Bizjak <uros@kss-loka.si> * optabs.h (enum optab_index): Add new OTI_log10 and OTI_log2. (log10_optab, log2_optab): Define corresponding macros. * optabs.c (init_optabs): Initialize log10_optab and log2_optab. * genopinit.c (optabs): Implement log10_optab and log2_optab using log10?f2 and log2?f2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOG10{,F,L} using log10_optab, and BUILT_IN_LOG2{,F,L} using log2_optab. (expand_builtin): Expand BUILT_IN_LOG10{,F,L} and BUILT_IN_LOG2{,F,L} using expand_builtin_mathfn if flag_unsafe_math_optimizations is set. * config/i386/i386.md (log10sf2, log10df2, log10xf2, log2sf2, log2df2, log2xf2): New patterns to implement log10, log10f, log10l, log2, log2f and log2l built-ins as inline x87 intrinsics. * gcc.dg/builtins-33.c: New test. From-SVN: r77675
2004-01-21alias.c, [...]: Update copyright.Kazu Hirata1-1/+1
* alias.c, basic-block.h, c-common.c, c-common.h, c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c, calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c, combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c, cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h, defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c, expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c, genautomata.c, genconditions.c, genemit.c, genflags.c, gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c, ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c, langhooks-def.h, langhooks.c, langhooks.h, line-map.c, line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c, ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c, rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h, target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h, unwind.h, varray.c, varray.h: Update copyright. From-SVN: r76302
2004-01-01expmed.c (store_bit_field, [...]): Use new named patternsJan Hubicka1-1/+4
* expmed.c (store_bit_field, extract_bit_field): Use new named patterns * expr.c (store_constructor): Use vec_init pattern. * genopinit.c (optabs): Initailize vec_set/vec_extract/vec_init. * optabs.h (optab_index): ADD OTI_vec_set/OTI_vec_extract/OTI_vec_init (vec_set_optab, vec_extract_optab, vec_init_optab): New. * i386.md (vec_setv2df, vec_extractv2df, vec_setv4sf, vec_extractv4sf): New patterns. (sse2_unpc?pd): Fix pattern. (sse2_movlpd): Kill. (sse2_movsd): Deal with movlpd too. * i386.c (ix86_expand_builtin): Use sse2_movsd instead of sse2_movlpd. (ix86_expand_vector_init): New. * emmintrin.h (__mm_set_pd, __mm_set_ps): Use vector extensions. * md.texi (vec_set, vec_extract): Document From-SVN: r75304
2003-10-13Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with ↵Zack Weinberg1-1/+1
min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-08genopinit.c (main): Output code to declare undefined variables.Kazu Hirata1-0/+5
* genopinit.c (main): Output code to declare undefined variables. From-SVN: r72220
2003-10-07expr.c (cmpstr_optab, [...]): New.Zack Weinberg1-1/+3
* expr.c (cmpstr_optab, cmpmem_optab): New. * genopinit.c: Initialize them. * optabs.h: Declare them. * optabs.c (init_optabs): Clear them. (prepare_cmp_insn): Use cmpstr_optab and cmpmem_optab to find block memory compare insns, not conditional chains. Restructure the fallback generation of a call to memcmp/bcmp for better readability. From-SVN: r72185
2003-10-07* libfuncs.h (LTI_extendsfdf2, LTI_extendsfxf2, LTI_extendsftf2)Zack Weinberg1-29/+39
(LTI_extenddfxf2, LTI_extenddftf2, LTI_truncdfsf2, LTI_truncxfsf2) (LTI_trunctfsf2, LTI_truncxfdf2, LTI_trunctfdf2, LTI_floatsisf) (LTI_floatdisf, LTI_floattisf, LTI_floatsidf, LTI_floatdidf) (LTI_floattidf, LTI_floatsixf, LTI_floatdixf, LTI_floattixf) (LTI_floatsitf, LTI_floatditf, LTI_floattitf, LTI_fixsfsi, LTI_fixsfdi) (LTI_fixsfti, LTI_fixdfsi, LTI_fixdfdi, LTI_fixdfti, LTI_fixxfsi) (LTI_fixxfdi, LTI_fixxfti, LTI_fixtfsi, LTI_fixtfdi, LTI_fixtfti) (LTI_fixunssfsi, LTI_fixunssfdi, LTI_fixunssfti, LTI_fixunsdfsi) (LTI_fixunsdfdi, LTI_fixunsdfti, LTI_fixunsxfsi, LTI_fixunsxfdi) (LTI_fixunsxfti, LTI_fixunstfsi, LTI_fixunstfdi, LTI_fixunstfti) (extendsfdf2_libfunc, extendsfxf2_libfunc, extendsftf2_libfunc) (extenddfxf2_libfunc, extenddftf2_libfunc, truncdfsf2_libfunc) (truncxfsf2_libfunc, trunctfsf2_libfunc, truncxfdf2_libfunc) (trunctfdf2_libfunc, floatsisf_libfunc, floatdisf_libfunc) (floattisf_libfunc, floatsidf_libfunc, floatdidf_libfunc) (floattidf_libfunc, floatsixf_libfunc, floatdixf_libfunc) (floattixf_libfunc, floatsitf_libfunc, floatditf_libfunc) (floattitf_libfunc, fixsfsi_libfunc, fixsfdi_libfunc, fixsfti_libfunc) (fixdfsi_libfunc, fixdfdi_libfunc, fixdfti_libfunc, fixxfsi_libfunc) (fixxfdi_libfunc, fixxfti_libfunc, fixtfsi_libfunc, fixtfdi_libfunc) (fixtfti_libfunc, fixunssfsi_libfunc, fixunssfdi_libfunc) (fixunssfti_libfunc, fixunsdfsi_libfunc, fixunsdfdi_libfunc) (fixunsdfti_libfunc, fixunsxfsi_libfunc, fixunsxfdi_libfunc) (fixunsxfti_libfunc, fixunstfsi_libfunc, fixunstfdi_libfunc) (fixunstfti_libfunc): Delete. * optabs.h (struct optab_handlers): Break out of struct optab. (struct convert_optab, convert_optab, enum convert_optab_index, convert_optab_table, sext_optab, zext_optab, trunc_optab, sfix_optab, ufix_optab, sfixtrunc_optab, ufixtrunc_optab, sfloat_optab, ufloat_optab): New. (set_conv_libfunc): Prototype. (GEN_FCN): Use C90 indirect call syntax, remove unnecessary cast. (trunc_optab): Renamed btrunc_optab. * builtins.c (expand_builtin_mathfn): Update to match. * optabs.c (extendtab, fixtab, fixtrunctab, floattab): Delete. (convert_optab_table, new_convert_optab, init_convert_optab) (init_interclass_conv_libfuncs, init_intraclass_conv_libfuncs) (set_conv_libfunc): New. (can_extend_p, gen_extend_insn, can_fix_p, can_float_p) (expand_float, expand_fix): Use new conversion optabs, not old insn code tables or long chains of ifs. (init_optabs): No need to clear old insn code tables. Initialize the new optabs, not the old libfunc array entries. Don't handle FIXUNS_TRUNC_LIKE_FIX_TRUNC here. * genopinit.c: Initialize conversion optabs, not the former insn code tables. Remove unnecessary casts. Handle FIXUNS_TRUNC_LIKE_FIX_TRUNC here. * expr.c (convert_move): Remove redundant check that to_real==from_real. Use the conversion optabs instead of long chains of tests of modes. Move partial-integer-mode interconversion above all integer conversion. Do not recurse on a value forced into a register in the original mode. * config/gofast.h, config/frv/frv.c, config/ia64/ia64.c * config/mips/mips.c, config/pa/pa.c, config/rs6000/rs6000.c * config/sparc/sparc.c: Use set_conv_libfunc to adjust entries in new conversion optabs; do not reference the old libfunc array entries. No need to include libfuncs.h. From-SVN: r72178
2003-07-05genattr.c (internal_dfa_insn_code): Output prototype.Kaveh R. Ghazi1-1/+1
* genattr.c (internal_dfa_insn_code): Output prototype. * genattrtab.c: Don't output unnecessary decls, output in ISO C. * genautomata.c: Likewise. * genconditions.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * gengenrtl.c: Likewise. * gengtype.c: Likewise. * genopinit.c: Likewise. * genoutput.c: Likewise. * genpeep.c: Likewise. * genrecog.c: Likewise. From-SVN: r68959
2003-06-16optabs.h (enum optab_index): Add new OTI_tan and OTI_atan.Roger Sayle1-0/+2
* optabs.h (enum optab_index): Add new OTI_tan and OTI_atan. (tan_optab, atan_optab): Define corresponding macros. * optabs.c (init_optabs): Initialize tan_optab and atan_optab. * genopinit.c (optabs): Implement tan_optab and atan_optab using tan?f2 and atan?f2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_TAN{,F,L} using tan_optab, and BUILT_IN_ATAN{,F,L} using atan_optab. Change the default value of errno_set to false. (expand_builtin): Expand BUILT_IN_TAN{,F,L} and BUILT_IN_ATAN{,F,L} using expand_builtin_mathfn. * config/i386/i386.md (atansf2, atandf2, atanxf2, atantf2): New expander patterns implemented using existing atan2?f3 patterns. * gcc.dg/i386-387-5.c: New test case. * gcc.dg/i386-387-6.c: New test case. * gcc.dg/builtins-23.c: New test case. From-SVN: r68013
2003-06-01genrecog.c: Use ISO C90 prototypes.Andreas Jaeger1-9/+5
* genrecog.c: Use ISO C90 prototypes. (nodes_identical): Correct declaration to match prototype. (maybe_both_true): Likewise. (merge_trees): Likewise. * genpeep.c (gen_peephole): Remove #if 0 code. Use ISO C90 prototypes. * genattrtab.c (copy_rtx_unchanging): Remove #if 0'ed code. Remove #if 0'ed function simplify_by_alternatives. (optimize_attrs): Remove #if 0'ed code. Remove ^L. Use ISO C90 prototypes. (make_canonical): Remove #if 0'ed code. (convert_const_symbol_ref): Remove #if 0'ed function. * gen-protos.c (main): Check for argument. * rtl.h: Use ISO C90 prototypes for functions from lists.c. * params.h: Use ISO C90 prototypes. * params.c: Likewise. * intl.c: Likewise. * intl.h: Likewise. * lists.c: Likewise. * errors.c: Likewise. * errors.h: Likewise. * gencodes.c: Likewise. * genpreds.c: Likewise. * genattr.c: Likewise. * gen-protos.c: Likewise. * genflags.c: Likewise * genconditions.c: Likewise. * genautomata.c: Likewise. * gencheck.c: Likewise. * genconfig.c: Likewise. * genconstants.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * gengenrtl.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genopinit.c: Likewise. * genoutput.c: Likewise. * gensupport.c: Likewise. * gensupport.h: Likewise. From-SVN: r67296
2003-02-11optabs.h (enum optab_index): Add new OTI_pow and OTI_atan2.Roger Sayle1-2/+4
* optabs.h (enum optab_index): Add new OTI_pow and OTI_atan2. (pow_optab, atan2_optab): Define corresponding macros. * optabs.c (init_optabs): Initialize pow_optab and atan2_optab. * genopinit.c (optabs): Implement pow_optab and atan2_optab using pow?f3 and atan2?f3 patterns. * builtins.c (expand_errno_check): New function to update errno if necessary, split out from expand_builtin_mathfn. (expand_builtin_mathfn): Use expand_errno_check. (expand_builtin_mathfn_2): New function to handle expanding binary math functions, reusing the code in expand_errno_check. (expand_builtin): Handle the pow and atan2 math built-ins, BUILT_IN_{POW,POWF,POWL,ATAN2,ATAN2F,ATAN2L} via the new function expand_builtin_mathfn_2. * doc/md.texi: Document new pow?f3 and atan2?f3 patterns. From-SVN: r62708
2003-02-01[multiple changes]Richard Henderson1-0/+4
2003-02-01 Richard Henderson <rth@redhat.com> * optabs.c (expand_unop): Use word_mode for outmode of bit scaners. * libgcc2.c (__ffsdi2, __clzsi2, __clzdi2, __ctzsi2, __ctzdi2, __popcountsi2, __popcountdi2, __paritysi2 __paritydi2): Change return type to Wtype. * libgcc-std.ver (GCC_3.4): Fix inheritance. * config/i386/i386.md (ffssi2): Use nonimmediate_operand for expander input constraint. 2003-02-01 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> * optabs.h (optab_index): Add OTI_clz, OTI_ctz, OTI_popcount and OTI_parity. (clz_optab, ctz_optab, popcount_optab, parity_optab): New. * optabs.c (widen_clz, expand_parity): New. (expand_unop): Handle clz and parity. Hardcode SImode as outmode for libcalls to clz, ctz, popcount, and parity. (init_optabs): Init clz_optab, ctz_optab, popcount_optab and parity_optab, and set up libfunc handlers. * libgcc2.c (__clzsi2, __clzdi2, __ctzsi2, __ctzdi2, __popcountsi2, __popcountdi2, __paritysi2 __paritydi2, __popcount_tab): New. * libgcc2.h: Declare them. * libgcc-std.ver (GCC_3.4): Add new functions from libgcc2.c. * genopinit.c (optabs): Add clz_optab, ctz_optab, popcount_optab and parity_optab. * builtin-types.def (BT_FN_INT_LONG, BT_FN_INT_LONGLONG): New. * builtins.def (BUILT_IN_CLZ, BUILT_IN_CTZ, BUILT_IN_POPCOUNT, BUILT_IN_PARITY, BUILT_IN_FFSL, BUILT_IN_CLZL, BUILT_IN_CTZL, BUILT_IN_POPCOUNTL, BUILT_IN_PARITYL, BUILT_IN_FFSLL, BUILT_IN_CLZLL, BUILT_IN_CTZLL, BUILT_IN_POPCOUNTLL, BUILT_IN_PARITYLL): New. * builtins.c (expand_builtin_unop): Rename from expand_builtin_ffs and add optab argument. (expand_builtin): Expand BUILT_IN_{FFS,CLZ,POPCOUNT,PARITY}*. * tree.def (CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR, PARITY_EXPR): New. * expr.c (expand_expr): Handle them. * fold-const.c (tree_expr_nonnegative_p): Likewise. * rtl.def (CLZ, CTZ, POPCOUNT, PARITY): New. * reload1.c (eliminate_regs): Handle them. (elimination_effects): Likewise. * function.c (instantiate_virtual_regs_1): Likewise * genattrtab.c (check_attr_value): Likewise. * simplify-rtx.c (simplify_unary_operation): Likewise. * c-common.c (c_common_truthvalue_conversion): Handle POPCOUNT_EXPR. * combine.c (combine_simplify_rtx): Handle POPCOUNT and PARITY. (nonzero_bits): Handle CLZ, CTZ, POPCOUNT and PARITY. * config/alpha/alpha.md (clzdi2, ctzdi2, popcountdi2): New. * config/arm/arm.c (arm_init_builtins): Rename __builtin_clz to __builtin_arm_clz. * Makefile.in (LIB2FUNCS_1, LIB2FUNCS_2): Move... * mklibgcc.in (lib2funcs): ...here and merge. Add new members. * doc/extend.texi (Other Builtins): Add new builtins. * doc/md.texi (Standard Names): Add new patterns. From-SVN: r62252
2003-01-07re PR target/8322 (SSE2 intrinsics broken?)Jan Hubicka1-0/+1
* genopinit.c (optabs): Add addc_optab. * ifcvt.c (noce_try_store_flag): Rename to ... (noce_try_addcc): ... this one; handle generic conditional increment. (noce_process_if_block): Update noce_try_addcc call. * optabs.c (emit_conditional_add): New. (init_obtabs): Initialize addc_optab. * optabs.h (optab_index): Add OTI_addcc. (addcc_optab): New macro. * md.texi: Document addMcc PR target/8322 * i386.c (ix86_init_mmx_sse_builtins): Constify arguments of loads. * xmmintrin.h (_mm_load*_si128. _mm_store*_si128): Add casts. * xmmintrin.h (_mm_load*_si128. _mm_store*_si128): Add casts. * reload1.c (delete_output_reload): Avoid repeated attempts to delete insn. From-SVN: r61019
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-1/+10
From-SVN: r60174
2002-08-03builtins.def: Define new builtin functions exp...Roger Sayle1-0/+2
* builtins.def: Define new builtin functions exp, expf, expl, log, logf and logl (and their __builtin_* variants). * optabs.h (enum optab_index): Add new OTI_exp and OTI_log. Define exp_optab and log_optab. * optabs.c (init_optans): Initialize exp_optab and log_optab. * genopinit.c (optabs): Implement exp_optab and log_optab using exp?f2 and log?f2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXP* and BUILT_IN_LOG* using exp_optab and log_optab respectively. (expand_builtin): Ignore the new builtins (and all cos and sin variants) when not optimizing. Expand new builtins via expand_builtin_mathfn when flag_unsafe_math_optimizations. * doc/extend.texi: Document new exp and log builtins. * doc/md.texi: Document new exp?f2 and log?f2 patterns (and previously undocumented cos?f2 and sin?f2 patterns). From-SVN: r56010
2001-12-02c-decl.c (duplicate_decls, [...]): Remove leading capital from diagnostics.Neil Booth1-1/+1
* c-decl.c (duplicate_decls, push_parm_decl): Remove leading capital from diagnostics. * c-lex.c (cb_file_change): Similarly. * c-parse.in : Similarly. * cfgrtl.c (verify_flow_info): Similarly. * collect2.c: Similarly. * cppfiles.c (find_include_file): Similarly. * cppinit.c (cpp_handle_option): Similarly. * cpplex.c (cpp_spell_token): Similarly. * cppmain.c (do_preprocessing): Similarly. * gcc.c (translate_options, process_command, do_spec1, main, pfatal_execute): Similarly. * genattr.c (main): Similarly. * genattrtab.c (check_attr_test, operate_exp, simplify_test_exp, write_test_expr, main): Similarly. * gencodes.c (main): Similarly. * genconfig.c (main): Similarly. * genconstants.c (main): Similarly. * genemit.c (main): Similarly. * genextract.c (main): Similarly. * genflags.c (main): Similarly. * genopinit.c (main): Similarly. * genoutput.c (process_template, main): Similarly. * genpeep.c (main): Similarly. * genrecog.c (main): Similarly. * gensupport.c (is_predicable, identify_predicable_attribute, alter_predicate_for_insn, init_md_reader_args, main): Similarly. * ggc-page.c (alloc_anon): Similarly. * mips-tfile.c (add_string, add_procedure, add_file, read_line, parse_begin, parse_bend, parse_def, parse_end, parse_file, parse_stabs_common, parse_stabs, write_varray, write_object, read_seek, copy_object, main, error): Similarly. * profile.c (compute_branch_probabilities): Similarly. * reg-stack.c (check_asm_stack_operands): Similarly. * reload.c (find_reloads): Similarly. * reload1.c (spill_failure, failed_reload): Similarly. * rtl-error.c (_fatal_insn_not_found): Similarly. * toplev.c (read_integral_parameter, crash_signal, decode_f_option, set_target_switch, parse_options_and_default_flags) : Similarly. * tradcif.y (parse_number, yylex): Similarly. * tradcpp.c (main, fancy_abort): Similarly. * tree.c (tree_check_failed): Similarly. * varray.c (varray_check_failed): Similarly. * xcoffout.c (xcoff_output_standard_types): Similarly. cp: * call.c (build_java_interface_fn_ref): Similarly. * except.c (is_admissible_throw_operand): Similarly. * init.c (build_java_class_ref): Similarly. * xref.c (open_xref_file): Similarly. objc: * objc-act.c (get_object_ref, lookup_and_install_protocols, build_objc_string_object, objc_declare_alias, build_ivar_chain, finish_message_expr, build_protocol_expr, is_public, start_class): Similarly. testsuite: * objc.dg/alias.m: Update. * objc.dg/class-1.m: Update. * objc.dg/const-str-1.m: Update. * objc.dg/fwd-proto-1.m: Update. * objc.dg/id-1.m: Update. * objc.dg/super-class-1.m: Update. From-SVN: r47518
2001-12-01c-decl.c (duplicate_decls, [...]): Remove trailing period from diagnostics.Neil Booth1-1/+1
* c-decl.c (duplicate_decls, parmlist_tags_warning): Remove trailing period from diagnostics. * c-lex.c (cb_file_change): Similarly. * cppmacro.c (check_trad_stringification): Similarly. * gcc.c (do_spec_1): Similarly. * genattr.c (main): Similarly. * genattrtab.c (main, operate_exp, make_length_attrs): Similarly. * gencodes.c (main): Similarly. * genconfig.c (main): Similarly. * genconstants.c (main): Similarly. * genemit.c (main): Similarly. * genextract.c (main): Similarly. * genopinit.c (main): Similarly. * genoutput.c (main): Similarly. * genpeep.c (main): Similarly. * genrecog.c (main): Similarly. * mips-tfile.c (add_file, error): Similarly. * profile.c (init_branch_prob): Similarly. * reload1.c (spill_failure): Similarly. * stmt.c (parse_output_constraint): Similarly. * varasm.c (assemble_variable): Similarly. cp: * class.c (finish_struct): Similarly. * decl.c (check_tag_decl): Similarly. * lex.c (cxx_set_yydebug): Similarly. * typeck2.c (friendly_abort): Similarly. java: * expr.c (expand_byte_code): Similarly. * jcf-parse.c (load_class, jcf_parse): Similarly. * jcf-write.c (generate_classfile): Similarly. * lex.c (java_lex): Similarly. From-SVN: r47517
2001-11-30genopinit.c (gen_insn): Handle MODE_VECTOR_INT and MODE_VECTOR_FLOAT as allowed.Daniel Berlin1-3/+6
2001-11-30 Daniel Berlin <dan@cgsoftware.com> * genopinit.c (gen_insn): Handle MODE_VECTOR_INT and MODE_VECTOR_FLOAT as allowed. From-SVN: r47476
2001-11-14rtl.def (INCLUDE): Define.Alan Matsuoka1-1/+1
2001-11-05 Alan Matsuoka <alanm@redhat.com> * rtl.def (INCLUDE) : Define. * gensupport.c (init_include_reader, process_include, save_string) : New functions to implement an include facility in .md files. * gensupport.h : Add prototype for init_md_reader_args. * genattr.c genattrtab.c gencodes.c genconfig.c genemit.c genextract.c genflags.c genopinit.c genoutput.c genpeep.c genrecog.c: Change call to init_md_reader to init_md_reader_args. * md.texi: Document (include "path") and -I directives for RTL generation tools. From-SVN: r47020
2001-09-13c-parse.in (yyerror): Const-ification and/or static-ization.Kaveh R. Ghazi1-1/+1
* c-parse.in (yyerror): Const-ification and/or static-ization. * c-typeck.c (push_member_name): Likewise. * collect2.c (main): Likewise. * dbxout.c (dbxout_parms): Likewise. * diagnostic.c (format_with_decl): Likewise. * dwarf2out.c (output_ranges): Likewise. * dwarfout.c (fundamental_type_code): Likewise. * except.c (dw2_output_call_site_table): Likewise. * gcc.c (do_spec_1): Likewise. * genopinit.c (optabs): Likewise. * objc/objc-act.c (synth_id_with_class_suffix, start_class, gen_declaration_1, handle_impent): Likewise. * protoize.c (default_include, in_system_include_dir, abspath): Likewise. * sched-vis.c (visualize_stall_cycles): Likewise. * sdbout.c (plain_type_1, sdbout_end_function, sdbout_end_epilogue): Likewise. * varasm.c (decode_reg_name): Likewise. * 1750a.c (mod_regno_adjust): Likewise. * alpha.c (alpha_write_one_linkage, unicosmk_output_default_externs): Likewise. * arm.c (arm_condition_codes): Likewise. * arm.h (arm_condition_codes): Likewise. * avr.c (output_movsisf, encode_section_info): Likewise. * darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL): Likewise. * i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * m88k.c (output_function_profiler): Likewise. * mips.c (mips_output_conditional_branch): Likewise. * ns32k.c (ns32k_out_reg_names): Likewise. * ns32k.h (ns32k_out_reg_names): Likewise. * pj.c (pj_output_rval): Likewise. * rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise. * sparc.c (sparc_flat_function_prologue, sparc_flat_function_epilogue): Likewise. cp: * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): Const-ification. * pt.c (tsubst_decl): Likewise. f: * bad.c (ffebad_finish): Const-ification and/or static-ization. * intrin.c (ffeintrin_cmp_name_): Likewise. * stc.c (ffestc_R904): Likewise. java: * expr.c (expand_invoke): Const-ification. * parse.y (patch_method_invocation): Likewise. From-SVN: r45581
2001-08-22Makefile.in, [...]: replace "GNU CC" with "GCC".Lars Brinkhoff1-12/+12
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105