aboutsummaryrefslogtreecommitdiff
path: root/gcc/machmode.h
AgeCommit message (Collapse)AuthorFilesLines
2014-01-02Update copyright years in gcc/Richard Sandiford1-1/+1
From-SVN: r206289
2013-11-29revert: cgraph.h (varpool_node): Add need_bounds_init field.Ilya Enkovich1-3/+0
Reverted: 2013-11-20 Ilya Enkovich <ilya.enkovich@intel.com> * cgraph.h (varpool_node): Add need_bounds_init field. * lto-cgraph.c (lto_output_varpool_node): Output need_bounds_init value. (input_varpool_node): Read need_bounds_init value. * varpool.c (dump_varpool_node): Dump need_bounds_init field. Reverted: 2013-11-20 Ilya Enkovich <ilya.enkovich@intel.com> * dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE. * dwarf2out.c (gen_subprogram_die): Ignore bound args. (gen_type_die_with_usage): Skip pointer bounds. (dwarf2out_global_decl): Likewise. Reverted: 2013-11-18 Ilya Enkovich <ilya.enkovich@intel.com> * builtin-types.def (BT_FN_PTR_CONST_PTR_VAR): New. * chkp-builtins.def (BUILT_IN_CHKP_BIND_BOUNDS): New. * cfgexpand.c (expand_call_stmt): Expand BUILT_IN_CHKP_BIND_BOUNDS. * gimple.c (gimple_call_get_nobnd_arg_index): Remove. * gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS. (gimple_call_with_bounds_p): New. (gimple_call_set_with_bounds): New. (gimple_call_num_nobnd_args): Remove. (gimple_call_nobnd_arg): Remove. * tree.h (CALL_WITH_BOUNDS_P): New. * rtl.h (CALL_EXPR_WITH_BOUNDS_P): New. Reverted: 2013-11-08 Ilya Enkovich <ilya.enkovich@intel.com> * common.opt (fcheck-pointer-bounds): Move to ... * c-family/c.opt: ... here. * langhooks-def.h (LANG_HOOKS_CHKP_SUPPORTED): Remove. (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_CHKP_SUPPORTED. * langhooks.h (lang_hooks): Remove chkp_supported field. * toplev.c (process_options): Remove chkp_supported check. Reverted: 2013-10-30 Ilya Enkovich <ilya.enkovich@intel.com> * tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE. * tree.h (POINTER_BOUNDS_P): New. (BOUNDED_TYPE_P): New. (BOUNDED_P): New. (pointer_bounds_type_node): New. * tree.c (build_common_tree_nodes): Initialize pointer_bounds_type_node. * gimple.h (gimple_call_get_nobnd_arg_index): New. (gimple_call_num_nobnd_args): New. (gimple_call_nobnd_arg): New. (gimple_return_retbnd): New. (gimple_return_set_retbnd): New * gimple.c (gimple_build_return): Increase number of ops for return statement. (gimple_call_get_nobnd_arg_index): New. * gimple-pretty-print.c (dump_gimple_return): Print second op. Reverted: 2013-10-30 Ilya Enkovich <ilya.enkovich@intel.com> * ipa.c (cgraph_build_static_cdtor_1): Support contructors with "chkp ctor" and "bnd_legacy" attributes. * gimplify.c (gimplify_init_constructor): Avoid infinite loop during gimplification of bounds initializer. Reverted: 2013-10-30 Ilya Enkovich <ilya.enkovich@intel.com> * c-family/c-common.c (handle_bnd_variable_size_attribute): New. (handle_bnd_legacy): New. (c_common_attribute_table): Add bnd_variable_size and bnd_legacy. * doc/extend.texi: Document bnd_variable_size and bnd_legacy attributes. Reverted: 2013-10-29 Ilya Enkovich <ilya.enkovich@intel.com> * builtin-types.def (BT_FN_VOID_CONST_PTR): New. (BT_FN_PTR_CONST_PTR): New. (BT_FN_CONST_PTR_CONST_PTR): New. (BT_FN_PTR_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR): New. (BT_FN_VOID_PTRPTR_CONST_PTR): New. (BT_FN_VOID_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New. * chkp-builtins.def: New. * builtins.def: include chkp-builtins.def. (DEF_CHKP_BUILTIN): New. * builtins.c (expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS, BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS, BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS, BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS, BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS, BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND, BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL, BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET, BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_ARG_BND, BUILT_IN_CHKP_NARROW, BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER. * common.opt (fcheck-pointer-bounds): New. * toplev.c (process_options): Check Pointer Bounds Checker is supported. * doc/extend.texi: Document Pointer Bounds Checker built-in functions. Reverted: 2013-10-30 Ilya Enkovich <ilya.enkovich@intel.com> * target.def (builtin_chkp_function): New. (chkp_bound_type): New. (chkp_bound_mode): New. (fn_abi_va_list_bounds_size): New. (load_bounds_for_arg): New. (store_bounds_for_arg): New. * targhooks.h (default_load_bounds_for_arg): New. (default_store_bounds_for_arg): New. (default_fn_abi_va_list_bounds_size): New. (default_chkp_bound_type): New. (default_chkp_bound_mode): New. (default_builtin_chkp_function): New. * targhooks.c (default_load_bounds_for_arg): New. (default_store_bounds_for_arg): New. (default_fn_abi_va_list_bounds_size): New. (default_chkp_bound_type): New. (default_chkp_bound_mode); New. (default_builtin_chkp_function): New. * doc/tm.texi.in (TARGET_FN_ABI_VA_LIST_BOUNDS_SIZE): New. (TARGET_LOAD_BOUNDS_FOR_ARG): New. (TARGET_STORE_BOUNDS_FOR_ARG): New. (TARGET_BUILTIN_CHKP_FUNCTION): New. (TARGET_CHKP_BOUND_TYPE): New. (TARGET_CHKP_BOUND_MODE): New. * doc/tm.texi: Regenerated. * langhooks.h (lang_hooks): Add chkp_supported field. * langhooks-def.h (LANG_HOOKS_CHKP_SUPPORTED): New. (LANG_HOOKS_INITIALIZER); Add LANG_HOOKS_CHKP_SUPPORTED. Reverted: 2013-10-24 Ilya Enkovich <ilya.enkovich@intel.com> * config/i386/constraints.md (B): New. (Ti): New. (Tb): New. * config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__. * config/i386/i386-modes.def (BND32): New. (BND64): New. * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New. * config/i386/i386.c (isa_opts): Add mmpx. (regclass_map): Add bound registers. (dbx_register_map): Likewise. (dbx64_register_map): Likewise. (svr4_dbx_register_map): Likewise. (PTA_MPX): New. (ix86_option_override_internal): Support MPX ISA. (ix86_conditional_register_usage): Support bound registers. (print_reg): Likewise. (ix86_code_end): Add MPX bnd prefix. (output_set_got): Likewise. (ix86_output_call_insn): Likewise. (ix86_print_operand): Add '!' (MPX bnd) print prefix support. (ix86_print_operand_punct_valid_p): Likewise. (ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and UNSPEC_BNDMK_ADDR. (ix86_class_likely_spilled_p): Add bound regs support. (ix86_hard_regno_mode_ok): Likewise. (x86_order_regs_for_local_alloc): Likewise. (ix86_bnd_prefixed_insn_p): New. * config/i386/i386.h (FIRST_PSEUDO_REGISTER): Fix to new value. (FIXED_REGISTERS): Add bound registers. (CALL_USED_REGISTERS): Likewise. (REG_ALLOC_ORDER): Likewise. (HARD_REGNO_NREGS): Likewise. (TARGET_MPX): New. (VALID_BND_REG_MODE): New. (FIRST_BND_REG): New. (LAST_BND_REG): New. (reg_class): Add BND_REGS. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Likewise. (BND_REGNO_P): New. (ANY_BND_REG_P): New. (BNDmode): New. (HI_REGISTER_NAMES): Add bound registers. * config/i386/i386.md (UNSPEC_BNDMK): New. (UNSPEC_BNDMK_ADDR): New. (UNSPEC_BNDSTX): New. (UNSPEC_BNDLDX): New. (UNSPEC_BNDLDX_ADDR): New. (UNSPEC_BNDCL): New. (UNSPEC_BNDCU): New. (UNSPEC_BNDCN): New. (UNSPEC_MPX_FENCE): New. (BND0_REG): New. (BND1_REG): New. (type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst. (length_immediate): Likewise. (prefix_0f): Likewise. (memory): Likewise. (prefix_rep): Check for bnd prefix. (length_nobnd): New. (length): Use length_nobnd if specified. (BND): New. (bnd_ptr): New. (BNDCHECK): New. (bndcheck): New. (*jcc_1): Add bnd prefix and rename length attr to length_nobnd. (*jcc_2): Likewise. (jump): Likewise. (simple_return_internal): Likewise. (simple_return_pop_internal): Likewise. (*indirect_jump): Add MPX bnd prefix. (*tablejump_1): Likewise. (simple_return_internal_long): Likewise. (simple_return_indirect_internal): Likewise. (<mode>_mk): New. (*<mode>_mk): New. (mov<mode>): New. (*mov<mode>_internal_mpx): New. (<mode>_<bndcheck>): New. (*<mode>_<bndcheck>): New. (<mode>_ldx): New. (*<mode>_ldx): New. (<mode>_stx): New. (*<mode>_stx): New. * config/i386/predicates.md (lea_address_operand): Rename to... (address_no_seg_operand): ... this. (address_mpx_no_base_operand): New. (address_mpx_no_index_operand): New. (bnd_mem_operator): New. * config/i386/i386.opt (mmpx): New. * doc/invoke.texi: Add documentation for the flags -mmpx, -mno-mpx. * doc/rtl.texi Add documentation for BND32mode and BND64mode. Reverted: 2013-10-24 Ilya Enkovich <ilya.enkovich@intel.com> * mode-classes.def (MODE_POINTER_BOUNDS): New. * tree.def (POINTER_BOUNDS_TYPE): New. * genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS. (POINTER_BOUNDS_MODE): New. (make_pointer_bounds_mode): New. * machmode.h (POINTER_BOUNDS_MODE_P): New. * stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS. (layout_type): Support POINTER_BOUNDS_TYPE. * tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE. * tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE. (type_contains_placeholder_1): Likewise. * tree.h (POINTER_BOUNDS_TYPE_P): New. * varasm.c (output_constant): Support POINTER_BOUNDS_TYPE. * doc/rtl.texi (MODE_POINTER_BOUNDS): New. From-SVN: r205522
2013-10-25mode-classes.def (MODE_POINTER_BOUNDS): New.Ilya Enkovich1-0/+3
* mode-classes.def (MODE_POINTER_BOUNDS): New. * tree.def (POINTER_BOUNDS_TYPE): New. * genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS. (POINTER_BOUNDS_MODE): New. (make_pointer_bounds_mode): New. * machmode.h (POINTER_BOUNDS_MODE_P): New. * stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS. (layout_type): Support POINTER_BOUNDS_TYPE. * tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE. * tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE. (type_contains_placeholder_1): Likewise. * tree.h (POINTER_BOUNDS_TYPE_P): New. * varasm.c (output_constant): Support POINTER_BOUNDS_TYPE. * doc/rtl.texi (MODE_POINTER_BOUNDS): New. From-SVN: r204045
2013-09-30basic-block.h (edge_list): Prefix member names with "m_".Richard Sandiford1-8/+8
gcc/ * basic-block.h (edge_list): Prefix member names with "m_". * context.h (context): Likewise. * domwalk.h (dom_walker): Likewise. * gengtype-state.c (s_expr_writer, state_writer): Likewise. * graphite-sese-to-poly.c (sese_dom_walker): Likewise. * hash-table.h (hash_table): Likewise. * machmode.h (bit_field_mode_iterator): Likewise. * pass_manager.h (pass_list): Likewise. * tree-into-ssa.c (mark_def_dom_walker): Likewise. * tree-pass.h (pass_data): Likewise. * tree-ssa-dom.c (dom_opt_dom_walker): Likewise. * tree-ssa-phiopt.c (nontrapping_dom_walker): Likewise, * tree-ssa-uncprop.c (uncprop_dom_walker): Likewise. * asan.c (pass_data_asan): Update accordingly. * cfganal.c (control_dependences::find_control_dependence): Likewise. (control_dependences::control_dependences): Likewise. (control_dependences::~control_dependences): Likewise. (control_dependences::~control_dependences): Likewise. (control_dependences::get_edges_dependent_on): Likewise. * cgraphbuild.c (pass_data_rebuild_cgraph_edges::clone): Likewise. (pass_data_remove_cgraph_callee_edges::clone): Likewise. * context.c (gcc::context::context): Likewise. * cprop.c (pass_rtl_cprop::clone): Likewise. * domwalk.c (dom_walker::walk): Likewise. * ipa-inline-analysis.c (pass_inline_parameters::clone): Likewise. * ipa-pure-const.c (pass_local_pure_const::clone): Likewise. * mode-switching.c (pass_mode_switching::clone): Likewise. * passes.c (opt_pass::opt_pass): Likewise. (pass_manager::pass_manager): Likewise. * predict.c (pass_strip_predict_hints::clone): Likewise. * recog.c (pass_data pass_data_peephole2::clone): Likewise. (pass_split_all_insns::clone): Likewise. * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator): Likewise. (bit_field_mode_iterator::next_mode): Likewise. (bit_field_mode_iterator::prefer_smaller_modes): Likewise. * tree-cfg.c (pass_split_crit_edges::clone): Likewise. * tree-cfgcleanup.c (pass_merge_phi::clone): Likewise. * tree-complex.c (pass_lower_complex::clone): Likewise. * tree-eh.c (pass_cleanup_eh::clone): Likewise. * tree-object-size.c (pass_object_sizes::clone): Likewise. * tree-optimize.c (pass_fixup_cfg::clone): Likewise. * tree-ssa-ccp.c (pass_data_ccp::clone): Likewise. (pass_fold_builtins::clone): Likewise. * tree-ssa-copy.c (pass_data_copy_prop::clone): Likewise. * tree-ssa-copyrename.c (pass_rename_ssa_copies::clone): Likewise. * tree-ssa-dce.c (pass_dce::clone, pass_dce_loop::clone): Likewise. (pass_cd_dce::clone): Likewise. * tree-ssa-dom.c (pass_dominator::clone): Likewise. (pass_phi_only_cprop::clone): Likewise. * tree-ssa-dse.c (pass_dse::clone): Likewise. * tree-ssa-forwprop.c (pass_forwprop::clone): Likewise. * tree-ssa-loop.c (pass_lim::clone): Likewise. * tree-ssa-phiopt.c (pass_phiopt::clone): Likewise. * tree-ssa-pre.c (pass_fre::clone): Likewise. * tree-ssa-reassoc.c (pass_reassoc::clone): Likewise. * tree-ssa-uninit.c (pass_late_warn_uninitialized::clone): Likewise. * tree-tailcall.c (pass_tail_recursion::clone): Likewise. * tree-vect-generic.c (pass_lower_vector_ssa::clone): Likewise. * tree-vrp.c (pass_vrp::clone): Likewise. * tsan.c (pass_tsan::clone): Likewise. From-SVN: r203046
2013-05-10stor-layout.c (element_precision): New function.Marc Glisse1-0/+4
2013-05-10 Marc Glisse <marc.glisse@inria.fr> gcc/ * stor-layout.c (element_precision): New function. * machmode.h (element_precision): Declare it. * tree.c (build_minus_one_cst): New function. (element_precision): Likewise. * tree.h (build_minus_one_cst): Declare new function. (element_precision): Likewise. * fold-const.c (operand_equal_p): Use element_precision. (fold_binary_loc): Handle vector types. * convert.c (convert_to_integer): Use element_precision. * gimple.c (iterative_hash_canonical_type): Handle complex and vectors separately. gcc/c-family/ * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for vectors. gcc/testsuite/ * gcc.dg/vector-shift.c: New testcase. From-SVN: r198772
2013-01-10Update copyright years in gcc/Richard Sandiford1-2/+1
From-SVN: r195098
2013-01-04Update Copyright years for files modified in 2011 and/or 2012.Jakub Jelinek1-1/+1
From-SVN: r194903
2012-11-18machmode.h (bit_field_mode_iterator): New class.Richard Sandiford1-1/+24
gcc/ * machmode.h (bit_field_mode_iterator): New class. (get_best_mode): Change final parameter to bool. * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator) (bit_field_mode_iterator::next_mode): New functions, split out from... (get_best_mode): ...here. Change final parameter to bool. Use bit_field_mode_iterator. From-SVN: r193603
2012-10-07machmode.h (GET_MODE_UNIT_PRECISION): New macro.Richard Sandiford1-0/+5
gcc/ * machmode.h (GET_MODE_UNIT_PRECISION): New macro. * simplify-rtx.c (simplify_truncation): New function, extracted from simplify_subreg and (in small part) from simplify_unary_operation_1. (simplify_unary_operation_1) <TRUNCATE>: Use it. Remove sign bit test for !TRULY_NOOP_TRUNCATION_MODES_P. (simplify_subreg): Use simplify_truncate for lowpart subregs where both the inner and outer modes are scalar integers. * config/mips/mips.c (mips_truncated_op_cost): New function. (mips_rtx_costs): Adjust test for BADDU. * config/mips/mips.md (*baddu_di<mode>): Push truncates to operands. From-SVN: r192186
2012-06-19Use synth_mult for vector multiplies vs scalar constantRichard Henderson1-3/+8
From-SVN: r188786
2012-04-26re PR middle-end/52940 (conversion from MODE_PARTIAL_INT uses sign extension ↵Bernd Schmidt1-0/+1
for unsigned types) PR middle-end/52940 * machmode.h (CLASS_HAS_WIDER_MODES_P): True for MODE_PARTIAL_INT. * expr.c (convert_move): Honor unsignedp when extending partial int modes. * genmodes.c (complete_mode): Don't clear component field of partial int modes. (emit_mode_inner): Don't emit it however. (calc_wider_mode): Partial int modes widen to their component. From-SVN: r186877
2011-12-10Let GET_MODE_2XWIDER_MODE find a double-width vector mode.Richard Henderson1-0/+2
* genmodes.c (struct mode_data): Remove wider_2x member. (blank_mode): Adjust initializer. (calc_wider_mode): Use XALLOCAVEC. (emit_move_wider): Select double-width same-element vectors for 2xwider vectors. * machmode.h (GET_MODE_2XWIDER_MODE): Update documentation. * config/i386/i386.c (doublesize_vector_mode): Remove. (expand_vselect_vconcat): Use GET_MODE_2XWIDER_MODE instead. From-SVN: r182191
2011-07-27params.h (ALLOW_STORE_DATA_RACES): New.Aldy Hernandez1-1/+4
* params.h (ALLOW_STORE_DATA_RACES): New. * params.def (PARAM_ALLOW_STORE_DATA_RACES): New. * Makefile.in (expr.o): Depend on PARAMS_H. * machmode.h (get_best_mode): Add argument. * fold-const.c (optimize_bit_field_compare): Add argument to get_best_mode. (fold_truthop): Same. * ifcvt.c (noce_emit_move_insn): Add argument to store_bit_field. * expr.c (emit_group_store): Same. (copy_blkmode_from_reg): Same. (write_complex_part): Same. (optimize_bitfield_assignment_op): Add argument. Add argument to get_best_mode. (get_bit_range): New. (expand_assignment): Calculate maxbits and pass it down accordingly. (store_field): New argument. (expand_expr_real_2): New argument to store_field. Include params.h. * expr.h (store_bit_field): New argument. * stor-layout.c (get_best_mode): Restrict mode expansion by taking into account maxbits. * calls.c (store_unaligned_arguments_into_pseudos): New argument to store_bit_field. * expmed.c (store_bit_field_1): New argument. Use it. (store_bit_field): Same. (store_fixed_bit_field): Same. (store_split_bit_field): Same. (extract_bit_field_1): Pass new argument to get_best_mode. (extract_bit_field): Same. * stmt.c (store_bit_field): Pass new argument to store_bit_field. * doc/invoke.texi: Document parameter allow-store-data-races. From-SVN: r176824
2011-07-06machmode.h (HWI_COMPUTABLE_MODE_P): New macro.Bernd Schmidt1-0/+4
* machmode.h (HWI_COMPUTABLE_MODE_P): New macro. * combine.c (set_nonzero_bits_and_sign_copies): Use it. (find_split-point, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_extraction, force_to_mode, if_then_else_cond, extended_count, try_widen_shift_mode, simplify_shift_const_1, simplify_comparison, record_value_for_reg): Likewise. * expmed.c (expand_widening_mult, expand_mult_highpart): Likewise. * simplify-rtx. c (simplify_unary_operation_1, simplify_binary_operation_1, simplify_const_relational_operation): Likewise. From-SVN: r175945
2011-07-06machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): New macro.Bernd Schmidt1-0/+4
* machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): New macro. * combine.c (make_extraction, gen_lowpart_or_truncate, apply_distributive_law, simplify_comparison, reg_truncated_to_mode, record_truncated_value): Use it. * cse.c (notreg_cost): Likewise. * expmed.c (store_bit_field_1, extract_bit_field_1): Likewise. * expr.c (convert_move, convert_modes): Likewise. * optabs.c (expand_binop, expand_unop): Likewise. * postreload.c (move2add_last_label): Likewise. * regmove.c (optimize_reg_copy_3): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. From-SVN: r175921
2011-01-03Update Copyright years for files modified in 2010.Jakub Jelinek1-1/+1
From-SVN: r168438
2010-10-07machmode.h (mode_for_vector): Declare.Richard Guenther1-0/+5
2010-10-07 Richard Guenther <rguenther@suse.de> * machmode.h (mode_for_vector): Declare. * stor-layout.c (mode_for_vector): New function, split out from ... (layout_type): ... here. * tree-vectorizer.h (current_vector_size): Declare. * tree-vect-stmts.c (perm_mask_for_reverse): Check if the mask vector type is available. (get_vectype_for_scalar_type): Rename to ... (get_vectype_for_scalar_type_and_size): ... this. Get a vector size argument. (get_vectype_for_scalar_type): New wrapper around get_vectype_for_scalar_type_and_size using current_vector_size. (get_same_sized_vectype): Use get_vectype_for_scalar_type_and_size. * tree-vect-loop.c (vect_analyze_loop_2): Split out core part of vect_analyze_loop here. (vect_analyze_loop): Loop over vector sizes calling vect_analyze_loop_3. * tree-vect-slp.c (vect_slp_analyze_bb): Set current_vector_size to autodetect. * config/i386/i386.c (ix86_vectorize_builtin_conversion): Fix V8SF to V8SI conversion builtin. From-SVN: r165116
2009-04-20Fix enum conversions which are invalid in C++:Ian Lance Taylor1-5/+6
gcc/: Fix enum conversions which are invalid in C++: * auto-inc-dec.c (attempt_change): Change 0 to SET in function call. * calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function call. * cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call. * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type. * dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function call. (dbxout_parms): Likewise. * df-core.c (df_set_flags): Change changeable_flags parameter to int. (df_clear_flags): Likewise. * df-problems.c (df_rd_bb_local_compute_process_def): Change top_flag parameter to int. (df_chain_create_bb_process_use): Likewise. (df_chain_add_problem): Change chain_flags parameter to unsigned int. Remove cast. * df-scan.c (df_ref_create): Change ref_flags parameter to int. (df_ref_create_structure, df_def_record_1): Likewise. (df_defs_record, df_uses_record, df_get_call_refs): Likewise. (df_notes_rescan): Change 0 to VOIDmode in function call. (df_get_call_refs, df_insn_refs_collect): Likewise. (df_bb_regs_collect): Likewise. (df_entry_block_defs_collect): Likewise. (df_exit_block_uses_collect): Likewise. * df.h: Update declarations. * double-int.c (double_int_divmod): Add cast to enum type. * dse.c (replace_inc_dec): Reverse parameters to gen_int_mode. * dwarf2out.c (new_reg_loc_descr): Add casts to enum type. (based_loc_descr): Likewise. (loc_descriptor_from_tree_1): Change first_op and second_op to enum dwarf_location_atom. Add cast to enum type. * expmed.c (init_expmed): Change 0 to SET in function call. * expr.c (init_expr_target): Change 0 to VOIDmode in function call. (expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call. (do_store_flag): Likewise. * fixed-value.h (struct fixed_value): Change mode to enum machine_mode. * function.c (assign_parms): Change 0 to VOIDmode in function call. * genautomata.c (insert_automaton_decl): Change 1 to INSERT in function call. (insert_insn_decl, insert_decl, insert_state): Likewise. (automata_list_finish): Likewise. * genrecog.c (process_define_predicate): Add cast to enum type. * gensupport.c (init_predicate_table): Add cast to enum type. * gimple.c (gimple_build_return): Change 0 to ERROR_MARK in function call. (gimple_build_call_1, gimple_build_label): Likewise. (gimple_build_goto, gimple_build_asm_1): Likewise. (gimple_build_switch_1, gimple_build_cdt): Likewise. * gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function call. (enum fallback): Rename from enum fallback_t. (fallback_t): Typedef as int. * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to GSI_SAME_STMT in function call. * ira.c (setup_class_subset_and_memory_move_costs): Add casts to enum type. (setup_reg_class_relations): Likewise. (setup_reg_class_nregs): Change cl to int. Add casts to enum type. (setup_prohibited_class_mode_regs): Add cast to enum type. (setup_prohibited_mode_move_regs): Likewise. * ira-costs.c (record_reg_classes): Change rclass to enum reg_class. (record_address_regs): Change i to enum reg_class. * lists.c (alloc_EXPR_LIST): Add cast to enum type. * machmode.h (GET_MODE_CLASS): Cast value to enum mode_class. (GET_MODE_WIDER_MODE): Cast value to enum machine_mode. (GET_MODE_2XWIDER_MODE): Likewise. (GET_CLASS_NARROWEST_MODE): Likewise. * omp-low.c (expand_omp_for): Add cast to enum type. * optabs.c (debug_optab_libfuncs): Add casts to enum type. * opts.c (enable_warning_as_error): Change kind to diagostic_t. * postreload.c (reload_cse_simplify_operands): Change rclass local to enum reg_class. * predict.c (combine_predictions_for_insn): Change best_predictor and predictor to enum br_predictor. (combine_predictions_for_bb): Likewise. (build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to use SET_PREDICT_EXPR_OUTCOME. * real.c (real_arithmetic): Change icode to code in function call. * reginfo.c (init_move_cost): Add casts to enum type. (init_reg_sets_1, init_fake_stack_mems): Likewise. * regmove.c (regclass_compatible_p): Change class0 and class1 to enum reg_class. * reload.c (find_valid_class): Add casts to enum type. (push_reload): Change 0 to NO_REGS in function call. (find_reloads): Change this_alternative to array of enum reg_class. Remove some now-unnecessary casts. (make_memloc): Change 0 to VOIDmode in function call. * reload1.c (reload): Change 0 to VOIDmode in function call. (eliminate_regs_1, elimination_effects): Likewise. (eliminate_regs_in_insn): Likewise. (emit_input_reload_insns): Add cast to enum type. (delete_output_reload): Change 0 to VOIDmode in function call. * reorg.c (insn_sets_resource_p): Convert include_delayed_effects to enum type in function call. * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type. (SET_PREDICT_EXPR_OUTCOME): Define. * tree-dump.c (get_dump_file_info): Change phase parameter to int. (get_dump_file_name, dump_begin, dump_enabled_p): Likewise. (dump_initialized_p, dump_flag_name, dump_end): Likewise. (dump_function): Likewise. * tree-dump.h: Update declarations. * tree-pass.h: Update declarations. * varasm.c (assemble_integer): Change mclass to enum mode_class. * config/arm/arm.c (thumb_legitimize_reload_address): Add cast to enum type. (arm_rtx_costs_1): Correct parenthesization. (arm_rtx_costs): Add casts to enum type. (adjacent_mem_locations): Reverse arguments to const_ok_for_op. (vfp_emit_fstmd): Use add_rg_note. (emit_multi_reg_push, emit_sfm): Likewise. (thumb_set_frame_pointer): Likewise. (arm_expand_prologue): Likewise. (arm_regno_class): Change return type to enum reg_class. (thumb1_expand_prologue): Use add_reg_note. * config/arm/arm-protos.h (arm_regno_class): Update declaration. * config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL in function call. * config/arm/gentune.sh: Add cast to enum type. * config/arm/arm-tune.md: Rebuild. * config/i386/i386.c (ix86_expand_prologue): Use add_reg_note. (ix86_split_fp_branch, predict_jump): Likewise. (ix86_expand_multi_arg_builtin): Change sub_code from enum insn_code to enum rtx_code. (ix86_builtin_vectorized_function): Add cast to enum type. * config/i386/i386.md (truncdfsf2): Change slot to enum ix86_stack_slot. (truncxf<mode>2, isinf<mode>2): Likewise. * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to enum type. * config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note. (spill_restore_mem, do_spill, ia64_expand_prologue): Likewise. (insert_bundle_state): Change 1 to INSERT in function call. (ia64_add_bundle_selector_before): Likewise. * config/ia64/ia64.md (cpu attr): Add cast to enum type. (save_stack_nonlocal): Change 0 to LCT_NORMAL in function call. (restore_stack_nonlocal): Likewise. * config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/mips/mips.c (mips_binary_cost): Change 0 to SET in function call. (mips_rtx_costs): Likewise. (mips_override_options): Add casts to enum type. * config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/pa/pa.c (legitimize_pic_address): Use add_reg_note. (store_reg, set_reg_plus_d): Likewise. (hppa_expand_prologue, hppa_profile_hook): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add cast to enum type. (altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in function call. (emit_unlikely_jump): Use add_reg_note. (rs6000_emit_allocate_stack): Likewise. (rs6000_frame_related, rs6000_emit_prologue): Likewise. (output_toc): Change 1 to INSERT in function call. (output_profile_hook): Change 0 to LCT_NORMAL in function call. (rs6000_initialize_trampoline): Likewise. (rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in function call. * config/s390/s390.c (s390_rtx_costs): Add cast to enum type. (s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call. (s390_expand_setmem, s390_expand_cmpmem): Likewise. (save_gprs): Use add_reg_note. (s390_emit_prologue): Likewise. (s390_expand_builtin): Change 0 to EXPAND_NORMAL in function call. * config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note. (sparc_fold_builtin): Add cast to enum type. * config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to enum insn_code. (spu_expand_prologue): Use add_reg_note. (expand_builtin_args): Change 0 to EXPAND_NORMAL in function call. * c-parser.c (c_parser_attributes): Change VEC back to tree list. (c_parser_postfix_expression_after_primary): Get VEC for list of arguments. Get original types of arguments. Call build_function_call_vec. (cached_expr_list_1, cached_expr_list_2): New static variables. (c_parser_expr_list): Change return type to VEC *. Add p_orig_types parameter. Change all callers. (c_parser_release_expr): New static function. (c_parser_vec_to_tree_list): New static function. * c-typeck.c (build_function_call): Rewrite to build a VEC and call build_function_call_vec. (build_function_call_vec): New function, based on old build_function_call. (convert_arguments): Remove nargs and argarray parameters. Change values to a VEC. Add origtypes parameter. (build_modify_expr): Add rhs_origtype parameter. Change all callers. (convert_for_assignment): Add origtype parameter. Change all callers. If warn_cxx_compat, check for conversion to an enum type when calling a function. (store_init_value): Add origtype parameter. Change all callers. (digest_init): Likewise. (struct init_node): Add origtype field. (add_pending_init): Add origtype parameter. Change all callers. (output_init_element): Likewise. (output_pending_init_elements): Pass origtype from init_node to output_init_element. (process_init_elemnt): Pass origtype from c_expr to output_init_element. (c_finish_return): Add origtype parameter. Change all callers. * c-common.c (sync_resolve_size): Change params to VEC *. Change caller. (sync_resolve_params): Likewise. (sync_resolve_return): Change params to first_param. Change caller. (resolve_overloaded_builtins): Change params to VEC *. Change callers. Save first parameter around call to build_function_call_vec. * c-decl.c (finish_decl): Add origtype parameter. Change all callers. Call build_function_call_vec rather than build_function_call for cleanup. * c-tree.h: Update declarations. * c-common.h: Update declarations. * stub-objc.c (objc_rewrite_function_call): Change parameter from params to first_param. * target.h (struct gcc_target): Change resolve_overloaded_builtin params parameter from tree to void *. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change arglist parameter to have type void *, and to be a pointer to a VEC. * config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin): Update declaration. * config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change fnargs parameter to have type void *, and to be a pointer to a VEC. Call build_function_call_vec instead of build_function_call. * config/spu/spu-protos.h (spu_expand_builtin): Update declaration. gcc/cp/: * typeck.c (build_function_call_vec): New function. (cp_build_function_call): Only pass first parameter to objc_rewrite_function_call. (build_modify_expr): Add rhs_origtype parameter. Change all callers. * decl.c (finish_decl): Add origtype parameter. Change all callers. * semantics.c (finish_call_expr): Pass VEC to resolve_overloaded_builtin. gcc/objc: * objc-act.c (objc_rewrite_function_call): Change parameter from params to first_param. Change all callers. gcc/testsuite: * gcc.dg/Wcxx-compat-3.c: New testcase. From-SVN: r146451
2009-02-20Update Copyright years for files modified in 2008 and/or 2009.Jakub Jelinek1-1/+1
From-SVN: r144324
2008-08-12real.h (struct real_format): New member has_sign_dependent_rounding.Ulrich Weigand1-1/+1
* real.h (struct real_format): New member has_sign_dependent_rounding. * real.c (ieee_single_format, mips_single_format, motorola_single_format, spu_single_format, ieee_double_format, mips_double_format, motorola_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_128_format, ieee_extended_intel_96_round_53_format, ibm_extended_format, mips_extended_format, ieee_quad_format, mips_quad_format, vax_f_format, vax_d_format, vax_g_format): Initialize it. * config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Likewise. * defaults.h (MODE_HAS_NANS, MODE_HAS_INFINITIES, MODE_HAS_SIGNED_ZEROS, MODE_HAS_SIGN_DEPENDENT_ROUNDING): Remove. * config/spu/spu.h (MODE_HAS_NANS, MODE_HAS_INFINITIES, MODE_HAS_SIGN_DEPENDENT_ROUNDING): Remove. (ROUND_TOWARDS_ZERO): Likewise. * real.h (REAL_MODE_FORMAT): Protect MODE against macro expansion. (FLOAT_MODE_FORMAT): New macro. (REAL_MODE_FORMAT_COMPOSITE_P): Remove, replace by ... (MODE_COMPOSITE_P): ... this new macro. (MODE_HAS_NANS, MODE_HAS_INFINITIES, MODE_HAS_SIGNED_ZEROS, MODE_HAS_SIGN_DEPENDENT_ROUNDING): New macros. * machmode.h (GET_MODE_INNER): Cast result to enum machine_mode. * flags.h: Include "real.h". * fold-const.c (const_binop): Use MODE_COMPOSITE_P instead of REAL_MODE_FORMAT_COMPOSITE_P. * simplify-rtx.c (simplify_const_binary_operation): Likewise. * doc/tm.texi (Storage Layout): Remove documentation of MODE_HAS_NANS, MODE_HAS_INFINITIES, MODE_HAS_SIGNED_ZEROS, MODE_HAS_SIGN_DEPENDENT_ROUNDING. Update documentation of ROUND_TOWARDS_ZERO and LARGEST_EXPONENT_IS_NORMAL to clarify they only apply to libgcc2.a. From-SVN: r139016
2007-07-26Change copyright header to refer to version 3 of the GNU General Public ↵Nick Clifton1-6/+5
License and to point readers at the COPYING3 file and the FSF's license web page. From-SVN: r126948
2007-06-25rtl.texi (Machine Modes): Document QQ...Chao-ying Fu1-2/+96
* doc/rtl.texi (Machine Modes): Document QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTAmodes. Document MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. Document GET_MODE_IBIT, and GET_MODE_FBIT. * machmode.h (VECTOR_MODE_P): Test MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (SCALAR_FRACT_MODE_P, SCALAR_UFRACT_MODE_P, ALL_SCALAR_FRACT_MODE_P, SCALAR_ACCUM_MODE_P, SCALAR_UACCUM_MODE_P, ALL_SCALAR_ACCUM_MODE_P, SIGNED_SCALAR_FIXED_POINT_MODE_P, UNSIGNED_SCALAR_FIXED_POINT_MODE_P, ALL_SCALAR_FIXED_POINT_MODE_P, FRACT_MODE_P, UFRACT_MODE_P, ALL_FRACT_MODE_P, ACCUM_MODE_P, UACCUM_MODE_P, ALL_ACCUM_MODE_P, SIGNED_FIXED_POINT_MODE_P, UNSIGNED_FIXED_POINT_MODE_P, ALL_FIXED_POINT_MODE_P): New define. (CLASS_HAS_WIDER_MODES_P): Test MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (GET_MODE_IBIT, GET_MODE_FBIT): New define. * mode-classes.def (MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM): New mode classes. * machmode.def: Document FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE, ADJUST_IBIT, and ADJUST_FBIT. Add QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTA. * genmodes.c (struct mode_data): Add ibit and fbit fields. (blank_mode): Initialize ibit and fbit. (adj_ibit, adj_fbit): New to adjust ibit and fbit. (vector_class): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (new_adjust): Change required_class to required_class_from and required_class_to for testing within a range. (complete_mode): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE): New define. (make_fixed_point_mode): New. (_ADD_ADJUST): Change C to C1 and C2. (ADJUST_BYTESIZE, ADJUST_ALIGNMENT, ADJUST_FLOAT_FORMAT): Change to use a range for machine classes. (ADJUST_IBIT, ADJUST_FBIT): New. (emit_insn_modes_h): Output defines of CONST_MODE_IBIT and CONST_MODE_FBIT. (emit_mode_adjustments): Handle MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. Emit adjustment for ibit and fbit. (emit_mode_ibit, emit_mode_fbit): New. (emit_insn_modes_c): Add emit_mode_ibit and emit_mode_fbit. From-SVN: r126007
2005-12-02dfp.h, dfp.c: New files.Jon Grimm1-1/+8
2005-12-02 Jon Grimm <jgrimm2@us.ibm.com> Janis Johnson <janis187@us.ibm.com> David Edelsohn <dje@watson.ibm.com> Ben Elliston <bje@au.ibm.com> * dfp.h, dfp.c: New files. * Makefile.in (DECNUM, DECNUMINC, LIBDECNUMBER): New variables. (DECNUM_H): Likewise. (LIBDEPS, LIBS, BACKEND): Append $(LIBDECNUMBER). (INCLUDES): Append $(DECNUMINC). (OBJS-common): Add dfp.o. (dfp.o): New rule. * real.h (EXP_BITS): Pinch one bit to .. (struct real_value): Add decimal field. (real_format): Change table size, update documentation. (REAL_MODE_FORMAT): Update for to handle float, decimal float. (real_from_string3): Declare. (decimal_single_format): Declare. (decimal_double_format): Declare. (decimal_quad_format): Declare. (REAL_VALUE_TO_TARGET_DECIMAL32): New. (REAL_VALUE_TO_TARGET_DECIMAL64): New. (REAL_VALUE_TO_TARGET_DECIMAL128): New. * real.c: Include dfp.h. (normalize): Early return for decimal floats. (do_add): Zero decimal field. (do_compare): Call do_decimal_compare for decimal floats. (do_fix_trunc): Likewise, call decimal_do_fix_trunc. (real_arithmetic): Call decimal_real_arithmetic for decimal floating point operands. (real_identical): If a and b are of differing radix, return false. (real_to_integer): Call decimal_real_to_integer if the value is a decimal float. (real_to_integer2): Likewise, call decimal_real_to_integer2. (real_to_decimal): Likewise, call decimal_real_to_decimal. (real_to_hexadecimal): Place "N/A" in the return string for decimal float. (real_from_string3): New variant, given a mode. (real_maxval): Use decimal_real_maxval for decimal floats. (round_for_format): Use decimal_round_for_format for decimals. (real_convert): Use decimal_real_convert where appropriate. (significand_size): Handle base 10. (encode_decimal_single, decode_decimal_single, encode_decimal_double, decode_decimal_double, encode_decimal_quad, decode_decimal_quad): New functions. (decimal_single_format): New. (decimal_double_format): New. (decimal_quad_format): New. * machmode.def: Add SD, DD and TD decimal floating point modes. * machmode.h (FLOAT_MODE_P, SCALAR_FLOAT_MODE_P, MODES_WIDEN_P): Include MODE_DECIMAL_FLOAT. (DECIMAL_FLOAT_MODE_P): New. * mode-classes.def (MODE_DECIMAL_FLOAT): New mode class. * genmodes.c (struct mode_data): Add counter field. (struct mode_data): Update comment for format. (blank_mode): Initialise counter field. (new_mode): Increment counter field for each mode defined. (complete_mode): Handle MODE_DECIMAL_FLOAT, update check for mode using a format. (make_complex_modes): Handle modes containing `D'. (DECIMAL_FLOAT_MODE, FRACTIONAL_DECIMAL_FLOAT_MODE): New. (make_decimal_float_mode): New. (reset_float_format): Handle MODE_DECIMAL_FLOAT. (cmp_modes): Compare counter field if other characteristics similar. (emit_real_format_for_mode): Support formats for decimal floats. * doc/rtl.texi (Machine Modes): Document SD, DD and TDmodes. Document MODE_DECIMAL_FLOAT. Co-Authored-By: Ben Elliston <bje@au.ibm.com> Co-Authored-By: David Edelsohn <dje@watson.ibm.com> Co-Authored-By: Janis Johnson <janis187@us.ibm.com> From-SVN: r107861
2005-11-24machmode.h (CLASS_HAS_WIDER_MODES_P): New macro.Ben Elliston1-0/+6
* machmode.h (CLASS_HAS_WIDER_MODES_P): New macro. * optabs.c (expand_binop): Use CLASS_HAS_WIDER_MODES_P, improve formatting. (expand_twoval_unop): Likewise. (widen_clz): Likewise. (expand_parity): Likewise. (expand_unop): Likewise. (emit_cmp_and_jmp_insn_1): Likewise. (prepare_float_lib_cmp): Likewise. From-SVN: r107450
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-06-11rtl.h (to_rtx_code): Remove.Gabriel Dos Reis1-4/+0
* rtl.h (to_rtx_code): Remove. * machmode.h (to_machine_mode): Likewise. * read-rtl.c (apply_mode_macro): Replace to_machine_mode with explicit cast. (apply_mode_maps): Likewise. (read_rtx_1): Likewise. (apply_code_macro): Replace to to_rtx_code with explicit cast. (check_code_macro): Likewise. (read_rtx_1): Likewise. From-SVN: r100846
2005-06-09machmode.h (to_machine_mode): New.Gabriel Dos Reis1-0/+4
* machmode.h (to_machine_mode): New. * rtl.h (to_rtx_code): Likewise. * read-rtl.c (apply_mode_macro): Convert mode to machine_mode. (print_c_condition): Convert return value of htab_find(). (apply_code_macro): Add explicit cast when convertin to enums. (apply_mode_maps): Likewise. (check_code_macro): Likewise. (read_rtx_1): Likewise. From-SVN: r100804
2005-05-31expr.c (convert_move): When a partial_int requires multiple conversion steps...DJ Delorie1-0/+3
* expr.c (convert_move): When a partial_int requires multiple conversion steps, make sure successive steps convert the intermediate value, not the original value. * expmed.c (expand_mult): Convert partial_int multiplies to shift/add combinations too. * genmodes.c (mode_data): Add wider_2x. (calc_wider_mode): Calculate twice-wider mode too. (emit_mode_wider): Emit twice-wider mode too. * machmode.h (mode_2xwider, GET_MODE_2XWIDER_MODE): New. * expr.c (expand_expr_real_1): Use it for expanding multiplies. From-SVN: r100414
2003-11-06genmodes.c: Change the word "bitsize" to "precision" throughout.Zack Weinberg1-6/+6
* genmodes.c: Change the word "bitsize" to "precision" throughout. * machmode.def: Likewise. * machmode.h (GET_MODE_SIZE): Cast value to unsigned short. (GET_MODE_BITSIZE): Define as GET_MODE_SIZE * BITS_PER_UNIT. (GET_MODE_PRECISION): New macro. (mode_bitsize): Renamed mode_precision. * stor-layout.c (mode_for_size, smallest_mode_for_size): Use GET_MODE_PRECISION; clarify comments. ada: * misc.c (fp_prec_to_size, fp_size_to_prec): Use GET_MODE_PRECISION and update for changed meaning of GET_MODE_BITSIZE. From-SVN: r73295
2003-10-25genmodes.c (struct mode_data): Add contained and next_cont fields.Zack Weinberg1-13/+13
* genmodes.c (struct mode_data): Add contained and next_cont fields. (complete_mode): Maintain linked list of modes that have a given component. (emit_mode_unit_size): Delete. (emit_mode_nunits): New. (emit_insn_modes_c): Update to match. (emit_mode_adjustments): Propagate size and alignment adjustments from component modes to their containers. * machmode.h (mode_unit_size): Delete. (mode_nunits): New. (GET_MODE_NUNITS): Just return the value in the table. (GET_MODE_UNIT_SIZE): Compute using GET_MODE_INNER and GET_MODE_SIZE. * expmed.c (store_bit_field, extract_bit_field): Can use a plain move instruction if bitsize >= GET_MODE_BITSIZE of destination/source mode, respectively. * varasm.c (assemble_real): Write out the full size of the constant, not just its bitsize. (output_constant): Honor TYPE_MODE of TREE_REAL_CSTs. * config/ia64/ia64-modes.def: Define XFmode as well as TFmode. Use ADJUST_BYTESIZE and ADJUST_ALIGNMENT to set size and alignment of XF and TF modes in compliance with ia64 ABIs. Can now hardwire the format of both modes. * config/ia64/ia64.c: Change TFmode to XFmode wherever appropriate. (general_tfmode_operand, destination_tfmode_operand) (tfreg_or_fp01_operand, spill_tfmode_operand): Rename to general_xfmode_operand, destination_xfmode_operand, xfreg_or_fp01_operand, spill_xfmode_operand respectively. (ia64_init_builtins): Make TYPE_PRECISION of fpreg_type and float80_type be 96 so they get XFmode. Use !TARGET_HPUX, not INTEL_EXTENDED_IEEE_FORMAT, to decide how to define __float128. * config/ia64/ia64.h: Default TARGET_HPUX to 0. Change TFmode to XFmode wherever appropriate. Remove all references to INTEL_EXTENDED_IEEE_FORMAT. (LONG_DOUBLE_TYPE_SIZE): Varies with TARGET_HPUX. (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define (always 96). (PREDICATE_CODES): Update to match function renames. * config/ia64/ia64.md: Change TF to XF throughout; rename all patterns to match. Remove all references to INTEL_EXTENDED_IEEE_FORMAT. Update predicate calls to match function renames. * config/ia64/ia64-protos.c: Update all prototypes to match renamed functions. * config/ia64/hpux.h: Redefine TARGET_HPUX to 1. Remove all references to INTEL_EXTENDED_IEEE_FORMAT. * config/ia64/lib1funcs.asm: Add __divxf3 as new name for __divtf3; keep old name for backward compatibility. (L__compat): New section providing forwarding stubs for __fixtfti, __fixunstfti, __floattitf. * config/ia64/t-ia64: Add __compat to LIB1ASMFUNCS. From-SVN: r72916
2003-10-15genmodes.c: Include hashtab.h.Zack Weinberg1-2/+5
* genmodes.c: Include hashtab.h. (modes_by_name, hash_mode, eq_mode, struct mode_adjust) (adj_bytesize, adj_alignment, adj_format, new_adjust) (_ADD_ADJUST, ADJUST_BYTESIZE, ADJUST_ALIGNMENT, ADJUST_FORMAT) (print_maybe_const_decl, emit_mode_adjustments): New. (known_modes): Rename to modes. (find_mode): Kill class argument; look up in hash table. (new_mode): Insert into hash table also. (new_adjust): New. (reset_float_format, make_partial_integer_mode) (make_vector_mode): Tweak error reporting. (reset_float_format): Correct type of fourth argument. (emit_insn_modes_h): Add #defines to help make mode_size, mode_base_align, and real_format_for_mode conditionally const. (emit_mode_size, emit_mode_base_align): Use print_maybe_const_decl. (emit_real_format_for_mode): Likewise, but temporarily disabled. (emit_insn_modes_c): Call emit_mode_adjustments. (main): Initialize modes_by_name. * Makefile.in: Update dependencies. * machmode.def: Document EXPR arguments and new ADJUST_* statements. * machmode.h: Use CONST_MODE_SIZE and CONST_MODE_BASE_ALIGN in declarations of mode_size and mode_base_align. Declare init_adjust_machine_modes. * toplev.c (backend_init): Call init_adjust_machine_modes. From-SVN: r72534
2003-10-11gengenrtl.c (find_formats, genheader): Make i an unsigned int, remove cast ↵Zack Weinberg1-11/+1
of NUM_RTX_CODE. * gengenrtl.c (find_formats, genheader): Make i an unsigned int, remove cast of NUM_RTX_CODE. * machmode.h: Make the HAVE_MACHINE_MODES #ifdef encompass the entire file. Remove the #ifs on GET_MODE_MASK etc and GET_MODE_WIDER_MODE etc. From-SVN: r72321
2003-10-10genmodes.c, [...]: New files.Zack Weinberg1-29/+23
* genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-07-06jump.c: Convert prototypes to ISO C90.Andreas Jaeger1-9/+8
* jump.c: Convert prototypes to ISO C90. * langhooks-def.h: Likewise. Add extern to prototypes. * langhooks.c: Likewise. * langhooks.h: Likewise. * lcm.c: Likewise. * local-alloc.c: Likewise. * loop-init.c: Likewise. * loop-unroll.c: Likewise. * loop-unswitch.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. Add extern to prototypes. * machmode.h: Likewise. * main.c: Likewise. * mbchar.c: Likewise. * mbchar.h: Likewise. * mkdeps.c: Likewise. * mkdeps.h: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * output.h: Likewise. * gccspec.c: Likwise. * postreload.c: Likewise. * prefix.c: Likewise. * prefix.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * reg-stack.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * reload.h: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * resource.h: Likewise. * rtl-error.c: Likewise. * rtl.c: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. From-SVN: r68998
2003-06-16convert.c, [...]: Replace overly specific references to "GNU C" and "GNU C ↵Nathanael Nerode1-1/+1
Compiler" with... * convert.c, dwarf2out.c, dwarfout.c, emit-rtl.c, function.c, lists.c, print-rtl.c, print-tree.c, read-rtl.c, rtl-error.c, stmt.c, toplev.c, integrate.h, loop.h, machmode.h, rtl.h, ssa.h, tree.def: Replace overly specific references to "GNU C" and "GNU C Compiler" with references to "GCC". From-SVN: r68004
2002-11-01expr.c (emit_move_insn): Use SCALAR_FLOAT_MODE_PJan Hubicka1-0/+4
* expr.c (emit_move_insn): Use SCALAR_FLOAT_MODE_P * machmode.h (SCALAR_FLOAT_MODE_P): New macro. From-SVN: r58712
2002-08-19machmode.h (SCALAR_INT_MODE_P): New macro to test for scaler integer mode ↵Geoffrey Keating1-0/+5
(MODE_INT or MODE_PARTIAL_INT). * machmode.h (SCALAR_INT_MODE_P): New macro to test for scaler integer mode (MODE_INT or MODE_PARTIAL_INT). * explow.c (trunc_int_for_mode): Abort when the mode is not a scaler integer mode. * combine.c (expand_compound_operation): Don't expand Vector or Complex modes into shifts. (expand_field_assignment): Don't do bitwise arithmatic and shifts on Vector or Complex modes. (simplify_comparison): Don't call trunc_int_for_mode for VOIDmode. * recog.c (general_operand): Likewise. (immediate_operand): Likewise. (nonmemory_operand): Likewise. Co-Authored-By: Steve Ellcey <sje@cup.hp.com> From-SVN: r56443
2002-02-19i386.md ("mmx_uavgv8qi3"): Use const_vector.Aldy Hernandez1-1/+7
2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2001-12-231750a.h (datalbl, jmplbl): Declare array size explicitly.Kaveh R. Ghazi1-1/+1
* 1750a.h (datalbl, jmplbl): Declare array size explicitly. * a29k.h (a29k_debug_reg_map): Likewise. * arc.h (arc_regno_reg_class): Likewise. * c4x-protos.h (c4x_regclass_map, c4x_caller_save_map): Likewise. * convex.h (regno_reg_class, reg_class_from_letter): Likewise. * d30v.h (regno_reg_class, reg_class_from_letter): Likewise. * i386.h (regclass_map): Likewise. * m32r.h (m32r_hard_regno_mode_ok, m32r_punct_chars): Likewise. * mcore.h (regno_reg_class): Likewise. * mips.h (mips_print_operand_punct, mips_char_to_class): Likewise. * ns32k.h (regclass_map): Likewise. * pj.h (pj_debugreg_renumber_vec): Likewise. * s390.h (regclass_map): Likewise. * sh.h (regno_reg_class): Likewise. * sparc.h (sparc_regno_reg_class): Likewise. * hard-reg-set.h (reg_class_contents): Likewise. * machmode.h (class_narrowest_mode): Likewise. f: * bld.c (ffebld_arity_op_): Declare array size explicitly. * bld.h (ffebld_arity_op_): Likewise. From-SVN: r48281
2001-12-18machmode.h (mode_name, [...]): Set array size in declaration to ↵Kaveh R. Ghazi1-7/+7
NUM_MACHINE_MODES. * machmode.h (mode_name, mode_class, mode_size, mode_unit_size, mode_bitsize, mode_mask_array, mode_wider_mode): Set array size in declaration to NUM_MACHINE_MODES. (mode_size, mode_unit_size): Set array type to unsigned char. (mode_bitsize): Set array type to unsigned short. * rtl.c (rtx_length): Set array type to unsigned char. (rtx_length, rtx_name, rtx_format, rtx_class): Set array size to NUM_RTX_CODE. (mode_bitsize): Set array type to unsigned short. (mode_size, mode_unit_size): Set array type to unsigned char. (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array): Set array size to NUM_MACHINE_MODES. * rtl.h (rtx_length, rtx_name, rtx_format, rtx_class): Set array size in declaration to NUM_RTX_CODE. From-SVN: r48139
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
2001-01-03gencodes.c (output_predicate_decls): New function.Alexandre Oliva1-4/+10
* gencodes.c (output_predicate_decls): New function. (main): Call it. * machmode.h (GET_MODE_MASK): Arrange for it to be defined even if it is not the first time machmode.h is #included. * config/sh/sh.c (fpul_operand): Declare MODE argument. * tm.texi (PREDICATE_CODES): Document predicate declarations. * gcc.texi (Copyright): Added 2001. From-SVN: r38673
2000-09-18machmode.def: Add BImode.Richard Henderson1-2/+3
* machmode.def: Add BImode. Add a column for bitsize. * machmode.h (DEF_MACHMODE): Adjust for extra column. (GET_MODE_BITSIZE): Use it. * rtl.c (DEF_MACHMODE): Adjust for extra column. (mode_bitsize): New. (mode_mask_array): Use bitsize. * combine.c (combine_simplify_rtx): Require inner and outer modes to match on nonzero_bits optimizations. From-SVN: r36501
2000-06-24Vector support: rtx and mode definitionsBernd Schmidt1-3/+12
From-SVN: r34677
2000-03-25* Rework fields used to describe positions of bitfields andRichard Kenner1-4/+5
modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-04machmode.h (mode_for_size, [...]): SIZE now signed.Richard Kenner1-4/+5
* machmode.h (mode_for_size, smallest_mode_for_size): SIZE now signed. * stor-layout.c (mode_for_size, smallest_mode_for_size): Likewise. (mode_for_size_tree): New function. (layout_decl, layout_type): Call it and clean up BLKmode checks. * tree.h (mode_for_size_tree): New declaration. From-SVN: r32326
2000-02-24machmode.h (get_mode_alignment): Declare.Nathan Sidwell1-3/+3
* machmode.h (get_mode_alignment): Declare. (GET_MODE_ALIGNMENT): Call it. * stor-layout.c (get_mode_alignment): New function. Make sure alignment is always power of 2. From-SVN: r32134
2000-02-10combine.c (make_extraction, [...]): Avoid warning on mixed-signedness ↵Richard Kenner1-3/+4
conditionals. * combine.c (make_extraction, force_to_mode): Avoid warning on mixed-signedness conditionals. (make_field_assignment, nonzero_bits): Likewise. * expmed.c (store_fixed_bit_field): ALIGN arg now unsigned. (store_split_bit_field, extract_split_bit_field): Likewise. (extract_fixed_bit_field, store_bit_field, * expr.c: Change alignment to be unsigned everywhere. (move_by_pieces, store_constructor_field, store_constructor): Alignment parm is unsigned. (emit_block_move, emit_group_load, emit_group_store): Likewise. (clear_storage, emit_push_insn, compare_from_rtx): Likewise. (do_compare_rtx_and_jump): Likewise. (move_by_pieces_ninsns, clear_by_pieces): Likewise. Compare align with GET_MODE_ALIGNMENT. (expand_expr_unaligned): Pointer to alignment is pointer to unsigned. (get_inner_reference): Likewise. (copy_blkmode_from_reg, emit_push_insn): Remove unneeded casts. (expand_assignment): Local vars for alignment now unsigned. (store_constructor, store_field, expand_expr, do_jump): Likewise. (do_compare_and_jump): Likewise. (store_field): Call new function expr_align. * expr.h (emit_block_move, emit_group_load, emit_group_store): Alignment arg now unsigned. (clear_storage, emit_push_insn, compare_from_rtx): Likewise. (do_compare_rtx_and_jump, store_bit_field): Likewise. (extract_bit_field): Likewise. * fold-const.c (add_double): Add cast to eliminate signedness warning. * machmode.h (GET_MODE_ALIGNMENT): Result is unsigned. (get_best_mode): Alignment arg is unsigned. * rtl.h (move_by_pieces): Likewise. * store-layout.c (maximum_field_alignment, set_alignment): Now unsigned. (layout_decl): Alignment arg is now unsigned. Remove unneeded casts. (layout_record, layout_union, layout_type): Remove unneeded casts. Local alignment variables now unsigned. (get_best_mode): Alignment arg now unsigned. * tree.c (expr_align): New function. * tree.h (expr_align): Likewise. (maximum_field_alignment, set_alignment): Now unsigned. (get_inner_reference): Alignment argument is now pointer to unsigned. * varasm.c (assemble_variable): Add cast to eliminate warning. From-SVN: r31904
2000-01-17Update copyrightsKaveh Ghazi1-1/+1
From-SVN: r31465
2000-01-17machmode.h: PROTO -> PARAMS.Kaveh R. Ghazi1-4/+4
* machmode.h: PROTO -> PARAMS. * mbchar.h: Likewise. * mips-tdump.c: Likewise. * mips-tfile.c: Likewise. * optabs.c: Likewise. * output.h: Likewise. * prefix.c: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * regs.h: Likewise. From-SVN: r31459