1. 03 Jan, 2018 2 commits
    • Add support for MODE_VECTOR_BOOL · 5c0caeb3
      This patch adds a new mode class to represent vectors of booleans.
      GET_MODE_BITSIZE (m) / GET_MODE_NUNITS (m) determines the number
      of bits that are used to represent each boolean; this can be 1
      for a fully-packed representation or greater than 1 for an unpacked
      representation.  In the latter case, the value of bits other than
      the lowest is not significant.
      
      These are used by the SVE port to represent predicates.
      
      2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* mode-classes.def (MODE_VECTOR_BOOL): New mode class.
      	* machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
      	for MODE_VECTOR_BOOL.
      	* machmode.def (VECTOR_BOOL_MODE): Document.
      	* genmodes.c (VECTOR_BOOL_MODE): New macro.
      	(make_vector_bool_mode): New function.
      	(complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
      	MODE_VECTOR_BOOL.
      	* lto-streamer-in.c (lto_input_mode_table): Likewise.
      	* rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
      	Likewise.
      	* stor-layout.c (int_mode_for_mode): Likewise.
      	* tree.c (build_vector_type_for_mode): Likewise.
      	* varasm.c (output_constant_pool_2): Likewise.
      	* emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
      	CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
      	for MODE_VECTOR_BOOL.
      	* expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
      	of mode class checks.
      	* tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
      	instead of a list of mode class checks.
      	(expand_vector_scalar_condition): Likewise.
      	(type_for_widest_vector_mode): Handle BImode as an inner mode.
      
      gcc/c-family/
      	* c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
      
      gcc/fortran/
      	* trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
      
      gcc/go/
      	* go-lang.c (go_langhook_type_for_mode): Handle MODE_VECTOR_BOOL.
      
      gcc/lto/
      	* lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r256202
      Richard Sandiford committed
    • Update copyright years. · 85ec4feb
      From-SVN: r256169
      Jakub Jelinek committed
  2. 01 Jan, 2017 1 commit
  3. 04 Jan, 2016 1 commit
  4. 05 Jan, 2015 1 commit
  5. 05 Nov, 2014 1 commit
    • ipa-chkp.c: New. · d5e254e1
      gcc/
      
      2014-11-05  Ilya Enkovich  <ilya.enkovich@intel.com>
      
      	* ipa-chkp.c: New.
      	* ipa-chkp.h: New.
      	* tree-chkp.c: New.
      	* tree-chkp.h: New.
      	* tree-chkp-opt.c: New.
      	* rtl-chkp.c: New.
      	* rtl-chkp.h: New.
      	* Makefile.in (OBJS): Add ipa-chkp.o, rtl-chkp.o, tree-chkp.o
      	tree-chkp-opt.o.
      	(GTFILES): Add tree-chkp.c.
      	* 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-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
      	* tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE.
      	(type_contains_placeholder_1): Likewise.
      	(build_common_tree_nodes): Initialize
      	pointer_bounds_type_node.
      	* tree.h (POINTER_BOUNDS_TYPE_P): New.
      	(pointer_bounds_type_node): New.
      	(POINTER_BOUNDS_P): New.
      	(BOUNDED_TYPE_P): New.
      	(BOUNDED_P): New.
      	(CALL_WITH_BOUNDS_P): New.
      	* gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS.
      	(gimple_call_with_bounds_p): New.
      	(gimple_call_set_with_bounds): New.
      	(gimple_return_retbnd): New.
      	(gimple_return_set_retbnd): New
      	* gimple.c (gimple_build_return): Increase number of ops
      	for return statement.
      	(gimple_build_call_from_tree): Propagate CALL_WITH_BOUNDS_P
      	flag.
      	* gimple-pretty-print.c (dump_gimple_return): Print second op.
      	* rtl.h (CALL_EXPR_WITH_BOUNDS_P): New.
      	* gimplify.c (gimplify_init_constructor): Avoid infinite
      	loop during gimplification of bounds initializer.
      	* calls.c: Include tree-chkp.h, rtl-chkp.h, bitmap.h.
      	(special_function_p): Use original decl name when analyzing
      	instrumentation clone.
      	(arg_data): Add fields special_slot, pointer_arg and
      	pointer_offset.
      	(store_bounds): New.
      	(emit_call_1): Propagate instrumentation flag for CALL.
      	(initialize_argument_information): Compute pointer_arg,
      	pointer_offset and special_slot for pointer bounds arguments.
      	(finalize_must_preallocate): Preallocate when storing bounds
      	in bounds table.
      	(compute_argument_addresses): Skip pointer bounds.
      	(expand_call): Store bounds into tables separately.  Return
      	result joined with resulting bounds.
      	* cfgexpand.c: Include tree-chkp.h, rtl-chkp.h.
      	(expand_call_stmt): Propagate bounds flag for CALL_EXPR.
      	(expand_return): Add returned bounds arg.  Handle returned bounds.
      	(expand_gimple_stmt_1): Adjust to new expand_return signature.
      	(gimple_expand_cfg): Reset rtx bounds map.
      	* expr.c: Include tree-chkp.h, rtl-chkp.h.
      	(expand_assignment): Handle returned bounds.
      	(store_expr_with_bounds): New.  Replaces store_expr with new bounds
      	target argument.  Handle bounds returned by calls.
      	(store_expr): Now wraps store_expr_with_bounds.
      	* expr.h (store_expr_with_bounds): New.
      	* function.c: Include tree-chkp.h, rtl-chkp.h.
      	(bounds_parm_data): New.
      	(use_register_for_decl): Do not registerize decls used for bounds
      	stores and loads.
      	(assign_parms_augmented_arg_list): Add bounds of the result
      	structure pointer as the second argument.
      	(assign_parm_find_entry_rtl): Mark bounds are never passed on
      	the stack.
      	(assign_parm_is_stack_parm): Likewise.
      	(assign_parm_load_bounds): New.
      	(assign_bounds): New.
      	(assign_parms): Load bounds and determine a location for
      	returned bounds.
      	(diddle_return_value_1): New.
      	(diddle_return_value): Handle returned bounds.
      	* function.h (rtl_data): Add field for returned bounds.
      	* varasm.c: Include tree-chkp.h.
      	(output_constant): Support POINTER_BOUNDS_TYPE.
      	(output_constant_pool_2): Support MODE_POINTER_BOUNDS.
      	(ultimate_transparent_alias_target): Move up.
      	(make_decl_rtl): For instrumented function use
      	name of the original decl.
      	(assemble_start_function): Mark function as global
      	in case it is instrumentation clone of the global
      	function.
      	(do_assemble_alias): Follow transparent alias chain
      	for identifier.  Check if original alias is public.
      	(maybe_assemble_visibility): Use visibility of the
      	original function for instrumented version.
      	(default_unique_section): Likewise.
      	* emit-rtl.c (immed_double_const): Support MODE_POINTER_BOUNDS.
      	(init_emit_once): Build pointer bounds zero constants.
      	* explow.c (trunc_int_for_mode): Support MODE_POINTER_BOUNDS.
      	* target.def (builtin_chkp_function): New.
      	(chkp_bound_type): New.
      	(chkp_bound_mode): New.
      	(chkp_make_bounds_constant): New.
      	(chkp_initialize_bounds): New.
      	(load_bounds_for_arg): New.
      	(store_bounds_for_arg): New.
      	(load_returned_bounds): New.
      	(store_returned_bounds): New.
      	(chkp_function_value_bounds): New.
      	(setup_incoming_vararg_bounds): New.
      	(function_arg): Update hook description with new possible return
      	value CONST_INT.
      	* targhooks.h (default_load_bounds_for_arg): New.
      	(default_store_bounds_for_arg): New.
      	(default_load_returned_bounds): New.
      	(default_store_returned_bounds): New.
      	(default_chkp_bound_type): New.
      	(default_chkp_bound_mode): New.
      	(default_builtin_chkp_function): New.
      	(default_chkp_function_value_bounds): New.
      	(default_chkp_make_bounds_constant): New.
      	(default_chkp_initialize_bounds): New.
      	(default_setup_incoming_vararg_bounds): New.
      	* targhooks.c (default_load_bounds_for_arg): New.
      	(default_store_bounds_for_arg): New.
      	(default_load_returned_bounds): New.
      	(default_store_returned_bounds): New.
      	(default_chkp_bound_type): New.
      	(default_chkp_bound_mode); New.
      	(default_builtin_chkp_function): New.
      	(default_chkp_function_value_bounds): New.
      	(default_chkp_make_bounds_constant): New.
      	(default_chkp_initialize_bounds): New.
      	(default_setup_incoming_vararg_bounds): New.
      	* builtin-types.def (BT_BND): New.
      	(BT_FN_PTR_CONST_PTR): New.
      	(BT_FN_CONST_PTR_CONST_PTR): New.
      	(BT_FN_BND_CONST_PTR): New.
      	(BT_FN_CONST_PTR_BND): 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_VOID_PTR_BND): New.
      	(BT_FN_CONST_PTR_CONST_PTR_CONST_PTR): New.
      	(BT_FN_BND_CONST_PTR_SIZE): New.
      	(BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New.
      	(BT_FN_VOID_CONST_PTR_BND_CONST_PTR): New.
      	* chkp-builtins.def: New.
      	* builtins.def: include chkp-builtins.def.
      	(DEF_CHKP_BUILTIN): New.
      	* builtins.c: Include tree-chkp.h and rtl-chkp.h.
      	(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_NARROW,
      	BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER.
      	(std_expand_builtin_va_start): Init bounds for va_list.
      	* cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add
      	__CHKP__ macro when Pointer Bounds Checker is on.
      	* params.def (PARAM_CHKP_MAX_CTOR_SIZE): New.
      	* passes.def (pass_ipa_chkp_versioning): New.
      	(pass_early_local_passes): Renamed to pass_build_ssa_passes.
      	(pass_fixup_cfg): Moved to pass_chkp_instrumentation_passes.
      	(pass_chkp_instrumentation_passes): New.
      	(pass_ipa_chkp_produce_thunks): New.
      	(pass_local_optimization_passes): New.
      	(pass_chkp_opt): New.
      	* tree-pass.h (make_pass_ipa_chkp_versioning): New.
      	(make_pass_ipa_chkp_produce_thunks): New.
      	(make_pass_chkp): New.
      	(make_pass_chkp_opt): New.
      	(make_pass_early_local_passes): Renamed to ...
      	(make_pass_build_ssa_passes): This.
      	(make_pass_chkp_instrumentation_passes): New.
      	(make_pass_local_optimization_passes): New.
      	* passes.c (pass_manager::execute_early_local_passes): Execute
      	early passes in three steps.
      	(execute_all_early_local_passes): Renamed to ...
      	(execute_build_ssa_passes): This.
      	(pass_data_early_local_passes): Renamed to ...
      	(pass_data_build_ssa_passes): This.
      	(pass_early_local_passes): Renamed to ...
      	(pass_build_ssa_passes): This.
      	(pass_data_chkp_instrumentation_passes): New.
      	(pass_chkp_instrumentation_passes): New.
      	(pass_data_local_optimization_passes): New.
      	(pass_local_optimization_passes): New.
      	(make_pass_early_local_passes): Renamed to ...
      	(make_pass_build_ssa_passes): This.
      	(make_pass_chkp_instrumentation_passes): New.
      	(make_pass_local_optimization_passes): New.
      	* c-family/c.opt (fcheck-pointer-bounds): New.
      	(fchkp-check-incomplete-type): New.
      	(fchkp-zero-input-bounds-for-main): New.
      	(fchkp-first-field-has-own-bounds): New.
      	(fchkp-narrow-bounds): New.
      	(fchkp-narrow-to-innermost-array): New.
      	(fchkp-optimize): New.
      	(fchkp-use-fast-string-functions): New.
      	(fchkp-use-nochk-string-functions): New.
      	(fchkp-use-static-bounds): New.
      	(fchkp-use-static-const-bounds): New.
      	(fchkp-treat-zero-dynamic-size-as-infinite): New.
      	(fchkp-check-read): New.
      	(fchkp-check-write): New.
      	(fchkp-store-bounds): New.
      	(fchkp-instrument-calls): New.
      	(fchkp-instrument-marked-only): New.
      	(Wchkp): New.
      	* c-family/c-common.c (handle_bnd_variable_size_attribute): New.
      	(handle_bnd_legacy): New.
      	(handle_bnd_instrument): New.
      	(c_common_attribute_table): Add bnd_variable_size, bnd_legacy
      	and bnd_instrument.  Fix documentation.
      	(c_common_format_attribute_table): Likewsie.
      	* toplev.c: include tree-chkp.h.
      	(process_options): Check Pointer Bounds Checker is supported.
      	(compile_file): Add chkp_finish_file call.
      	* ipa-cp.c (initialize_node_lattices): Use cgraph_local_p
      	to handle instrumentation clones properly.
      	(propagate_constants_accross_call): Do not propagate
      	through instrumentation thunks.
      	* ipa-pure-const.c (propagate_pure_const): Support
      	IPA_REF_CHKP.
      	* ipa-inline.c (early_inliner): Check edge has summary allocated.
      	* ipa-split.c: Include tree-chkp.h.
      	(find_retbnd): New.
      	(split_part_set_ssa_name_p): New.
      	(consider_split): Do not split retbnd and retval
      	producers.
      	(insert_bndret_call_after): new.
      	(split_function): Propagate Pointer Bounds Checker
      	instrumentation marks and handle returned bounds.
      	* tree-ssa-sccvn.h (vn_reference_op_struct): Transform opcode
      	into bit field and add with_bounds field.
      	* tree-ssa-sccvn.c (copy_reference_ops_from_call): Set
      	with_bounds field for instrumented calls.
      	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Restore
      	CALL_WITH_BOUNDS_P flag for calls.
      	* tree-ssa-ccp.c: Include tree-chkp.h.
      	(insert_clobber_before_stack_restore): Handle
      	BUILT_IN_CHKP_BNDRET calls.
      	* tree-ssa-dce.c: Include tree-chkp.h.
      	(propagate_necessity): For free call fed by alloc check
      	bounds are also provided by the same alloc.
      	(eliminate_unnecessary_stmts): Handle BUILT_IN_CHKP_BNDRET
      	used by free calls.
      	* tree-inline.c: Include tree-chkp.h.
      	(declare_return_variable): Add arg holding
      	returned bounds slot.  Create and initialize returned bounds var.
      	(remap_gimple_stmt): Handle returned bounds.
      	Return sequence of statements instead of a single statement.
      	(insert_init_stmt): Add declaration.
      	(remap_gimple_seq): Adjust to new remap_gimple_stmt signature.
      	(copy_bb): Adjust to changed return type of remap_gimple_stmt.
      	Properly handle bounds in va_arg_pack and va_arg_pack_len.
      	(expand_call_inline): Handle returned bounds.  Add bounds copy
      	for generated mem to mem assignments.
      	* tree-inline.h (copy_body_data): Add fields retbnd and
      	assign_stmts.
      	* value-prof.c: Include tree-chkp.h.
      	(gimple_ic): Support returned bounds.
      	* ipa.c (cgraph_build_static_cdtor_1): Support contructors
      	with "chkp ctor" and "bnd_legacy" attributes.
      	(symtab_remove_unreachable_nodes): Keep initial values for
      	pointer bounds to be used for checks eliminations.
      	(process_references): Handle IPA_REF_CHKP.
      	(walk_polymorphic_call_targets): Likewise.
      	* ipa-visibility.c (cgraph_externally_visible_p): Mark
      	instrumented 'main' as externally visible.
      	(function_and_variable_visibility): Filter instrumentation
      	thunks.
      	* cgraph.h (cgraph_thunk_info): Add add_pointer_bounds_args
      	field.
      	(cgraph_node): Add instrumented_version, orig_decl and
      	instrumentation_clone fields.
      	(symtab_node::get_alias_target): Allow IPA_REF_CHKP reference.
      	(varpool_node): Add need_bounds_init field.
      	(cgraph_local_p): New.
      	* cgraph.c: Include tree-chkp.h.
      	(cgraph_node::remove): Fix instrumented_version
      	of the referenced node if any.
      	(cgraph_node::dump): Dump instrumentation_clone and
      	instrumented_version fields.
      	(cgraph_node::verify_node): Check correctness of IPA_REF_CHKP
      	references and instrumentation thunks.
      	(cgraph_can_remove_if_no_direct_calls_and_refs_p): Keep
      	all not instrumented instrumentation clones alive.
      	(cgraph_redirect_edge_call_stmt_to_callee): Support
      	returned bounds.
      	* cgraphbuild.c (rebuild_cgraph_edges): Rebuild IPA_REF_CHKP
      	reference.
      	(cgraph_rebuild_references): Likewise.
      	* cgraphunit.c: Include tree-chkp.h.
      	(assemble_thunks_and_aliases): Skip thunks calling instrumneted
      	function version.
      	(varpool_finalize_decl): Register statically initialized decls
      	in Pointer Bounds Checker.
      	(walk_polymorphic_call_targets): Do not mark generated call to
      	__builtin_unreachable as with_bounds.
      	(output_weakrefs): If there are both instrumented and original
      	versions, output only one of them.
      	(cgraph_node::expand_thunk): Set with_bounds flag
      	for created call statement.
      	* ipa-ref.h (ipa_ref_use): Add IPA_REF_CHKP.
      	(ipa_ref): increase size of use field.
      	* symtab.c (ipa_ref_use_name): Add element for IPA_REF_CHKP.
      	* varpool.c (dump_varpool_node): Dump need_bounds_init field.
      	(ctor_for_folding): Do not fold constant bounds vars.
      	* lto-streamer.h (LTO_minor_version): Change minor version from
      	0 to 1.
      	* lto-cgraph.c (compute_ltrans_boundary): Keep initial values for
      	pointer bounds.
      	(lto_output_node): Output instrumentation_clone,
      	thunk.add_pointer_bounds_args and orig_decl field.
      	(lto_output_ref): Adjust to new ipa_ref::use field size.
      	(input_overwrite_node): Read instrumentation_clone field.
      	(input_node): Read thunk.add_pointer_bounds_args and orig_decl
      	fields.
      	(input_ref): Adjust to new ipa_ref::use field size.
      	(input_cgraph_1): Compute instrumented_version fields and restore
      	IDENTIFIER_TRANSPARENT_ALIAS chains.
      	(lto_output_varpool_node): Output
      	need_bounds_init value.
      	(input_varpool_node): Read need_bounds_init value.
      	* lto-partition.c (add_symbol_to_partition_1): Keep original
      	and instrumented versions together.
      	(privatize_symbol_name): Restore transparent alias chain if required.
      	(add_references_to_partition): Add references to pointer bounds vars.
      	* 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.
      	(is_base_type): Support POINTER_BOUNDS_TYPE.
      	(gen_formal_types_die): Skip pointer bounds.
      	(gen_decl_die): Likewise.
      	* var-tracking.c (vt_add_function_parameters): Skip
      	bounds parameters.
      	* ipa-icf.c (sem_function::merge): Do not merge when instrumentation
      	thunk still exists.
      	(sem_variable::merge): Reset need_bounds_init flag.
      	* doc/extend.texi: Document Pointer Bounds Checker built-in functions
      	and attributes.
      	* doc/tm.texi.in (TARGET_LOAD_BOUNDS_FOR_ARG): New.
      	(TARGET_STORE_BOUNDS_FOR_ARG): New.
      	(TARGET_LOAD_RETURNED_BOUNDS): New.
      	(TARGET_STORE_RETURNED_BOUNDS): New.
      	(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New.
      	(TARGET_SETUP_INCOMING_VARARG_BOUNDS): New.
      	(TARGET_BUILTIN_CHKP_FUNCTION): New.
      	(TARGET_CHKP_BOUND_TYPE): New.
      	(TARGET_CHKP_BOUND_MODE): New.
      	(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New.
      	(TARGET_CHKP_INITIALIZE_BOUNDS): New.
      	* doc/tm.texi: Regenerated.
      	* doc/rtl.texi (MODE_POINTER_BOUNDS): New.
      	(BND32mode): New.
      	(BND64mode): New.
      	* doc/invoke.texi (-mmpx): New.
      	(-mno-mpx): New.
      	(chkp-max-ctor-size): New.
      	* config/i386/constraints.md (w): 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: Include tree-chkp.h, rtl-chkp.h, tree-iterator.h.
      	(regclass_map): Add bound registers.
      	(dbx_register_map): Likewise.
      	(dbx64_register_map): Likewise.
      	(svr4_dbx_register_map): Likewise.
      	(isa_opts): Add -mmpx.
      	(PTA_MPX): New.
      	(ix86_option_override_internal): Support MPX ISA.
      	(ix86_conditional_register_usage): Support bound registers.
      	(ix86_code_end): Add MPX bnd prefix.
      	(output_set_got): Likewise.
      	(print_reg): Avoid prefixes for bound registers.
      	(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_BNDLDX_ADDR.
      	(ix86_output_call_insn): Add MPX bnd prefix to branch instructions.
      	(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.
      	(ix86_builtins): Add
      	IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX,
      	IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL,
      	IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET,
      	IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT,
      	IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER,
      	IX86_BUILTIN_BNDUPPER.
      	(builtin_isa): Add leaf_p and nothrow_p fields.
      	(def_builtin): Initialize leaf_p and nothrow_p.
      	(ix86_add_new_builtins): Handle leaf_p and nothrow_p
      	flags.
      	(bdesc_mpx): New.
      	(bdesc_mpx_const): New.
      	(ix86_init_mpx_builtins): New.
      	(ix86_init_builtins): Call ix86_init_mpx_builtins.
      	(ix86_emit_cmove): New.
      	(ix86_emit_move_max): New.
      	(ix86_expand_builtin): Expand IX86_BUILTIN_BNDMK,
      	IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX,
      	IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU,
      	IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW,
      	IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF,
      	IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER.
      	(ix86_function_value_bounds): New.
      	(ix86_builtin_mpx_function): New.
      	(ix86_get_arg_address_for_bt): New.
      	(ix86_load_bounds): New.
      	(ix86_store_bounds): New.
      	(ix86_load_returned_bounds): New.
      	(ix86_store_returned_bounds): New.
      	(ix86_mpx_bound_mode): New.
      	(ix86_make_bounds_constant): New.
      	(ix86_initialize_bounds):
      	(TARGET_LOAD_BOUNDS_FOR_ARG): New.
      	(TARGET_STORE_BOUNDS_FOR_ARG): New.
      	(TARGET_LOAD_RETURNED_BOUNDS): New.
      	(TARGET_STORE_RETURNED_BOUNDS): New.
      	(TARGET_CHKP_BOUND_MODE): New.
      	(TARGET_BUILTIN_CHKP_FUNCTION): New.
      	(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New.
      	(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New.
      	(TARGET_CHKP_INITIALIZE_BOUNDS): New.
      	(ix86_option_override_internal): Do not
      	support x32 with MPX.
      	(init_cumulative_args): Init stdarg, bnd_regno, bnds_in_bt
      	and force_bnd_pass.
      	(function_arg_advance_32): Return number of used integer
      	registers.
      	(function_arg_advance_64): Likewise.
      	(function_arg_advance_ms_64): Likewise.
      	(ix86_function_arg_advance): Handle pointer bounds.
      	(ix86_function_arg): Likewise.
      	(ix86_function_value_regno_p): Mark fisrt bounds registers as
      	possible function value.
      	(ix86_function_value_1): Handle pointer bounds type/mode
      	(ix86_return_in_memory): Likewise.
      	(ix86_print_operand): Analyse insn to decide abounf "bnd" prefix.
      	(ix86_expand_call): Generate returned bounds.
      	(ix86_setup_incoming_vararg_bounds): New.
      	(ix86_va_start): Initialize bounds for pointers in va_list.
      	(TARGET_SETUP_INCOMING_VARARG_BOUNDS): New.
      	* config/i386/i386.h (TARGET_MPX): New.
      	(TARGET_MPX_P): New.
      	(FIRST_PSEUDO_REGISTER): Fix to new value.
      	(FIXED_REGISTERS): Add bound registers.
      	(CALL_USED_REGISTERS): Likewise.
      	(REG_ALLOC_ORDER): Likewise.
      	(HARD_REGNO_NREGS): Likewise.
      	(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.
      	(ix86_args): Add bnd_regno, bnds_in_bt,	force_bnd_pass and
      	stdarg fields.
      	* 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.
      	(UNSPEC_SIZEOF): New.
      	(BND0_REG): New.
      	(BND1_REG): New.
      	(type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst.
      	(length_immediate): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
      	(prefix_rep): Check for bnd prefix.
      	(prefix_0f): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
      	(length_nobnd): New.
      	(length): Use length_nobnd when specified.
      	(memory): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
      	(BND): New.
      	(bnd_ptr): New.
      	(BNDCHECK): New.
      	(bndcheck): New.
      	(*jcc_1): Add MPX bnd prefix.
      	(*jcc_2): Likewise.
      	(jump): Likewise.
      	(*indirect_jump): Likewise.
      	(*tablejump_1): Likewise.
      	(simple_return_internal): Likewise.
      	(simple_return_internal_long): Likewise.
      	(simple_return_pop_internal): 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.
      	move_size_reloc_<mode>): New.
      	* config/i386/predicates.md (address_mpx_no_base_operand): New.
      	(address_mpx_no_index_operand): New.
      	(bnd_mem_operator): New.
      	(symbol_operand): New.
      	(x86_64_immediate_size_operand): New.
      	* config/i386/i386.opt (mmpx): New.
      	* config/i386/i386-builtin-types.def (BND): New.
      	(ULONG): New.
      	(BND_FTYPE_PCVOID_ULONG): New.
      	(VOID_FTYPE_BND_PCVOID): New.
      	(VOID_FTYPE_PCVOID_PCVOID_BND): New.
      	(BND_FTYPE_PCVOID_PCVOID): New.
      	(BND_FTYPE_PCVOID): New.
      	(BND_FTYPE_BND_BND): New.
      	(PVOID_FTYPE_PVOID_PVOID_ULONG): New.
      	(PVOID_FTYPE_PCVOID_BND_ULONG): New.
      	(ULONG_FTYPE_VOID): New.
      	(PVOID_FTYPE_BND): New.
      
      gcc/testsuite/
      
      2014-11-05  Ilya Enkovich  <ilya.enkovich@intel.com>
      
      	* gcc.target/i386/chkp-builtins-1.c: New.
      	* gcc.target/i386/chkp-builtins-2.c: New.
      	* gcc.target/i386/chkp-builtins-3.c: New.
      	* gcc.target/i386/chkp-builtins-4.c: New.
      	* gcc.target/i386/chkp-remove-bndint-1.c: New.
      	* gcc.target/i386/chkp-remove-bndint-2.c: New.
      	* gcc.target/i386/chkp-const-check-1.c: New.
      	* gcc.target/i386/chkp-const-check-2.c: New.
      	* gcc.target/i386/chkp-lifetime-1.c: New.
      	* gcc.dg/pr37858.c: Replace early_local_cleanups pass name
      	with build_ssa_passes.
      
      From-SVN: r217125
      Ilya Enkovich committed
  6. 02 Jan, 2014 1 commit
  7. 29 Nov, 2013 1 commit
    • revert: cgraph.h (varpool_node): Add need_bounds_init field. · 089d1227
      	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
      Ilya Enkovich committed
  8. 25 Oct, 2013 1 commit
    • mode-classes.def (MODE_POINTER_BOUNDS): New. · 65f55bac
              * 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
      Ilya Enkovich committed
  9. 10 Jan, 2013 1 commit
  10. 26 Jul, 2007 1 commit
  11. 25 Jun, 2007 1 commit
    • rtl.texi (Machine Modes): Document QQ... · 1699ec0b
      	* 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
      Chao-ying Fu committed
  12. 02 Dec, 2005 1 commit
    • dfp.h, dfp.c: New files. · 909e2256
      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
      Jon Grimm committed
  13. 25 Jun, 2005 1 commit
  14. 10 Oct, 2003 1 commit
    • genmodes.c, [...]: New files. · 0974c7d7
      	* 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
      Zack Weinberg committed
  15. 06 Jul, 2003 1 commit
    • basic-block.h: Convert prototypes to ISO C90. · f55ade6e
      	* basic-block.h: Convert prototypes to ISO C90.
      	* c-parse.in: Likewise.
      	* c-pragma.h: Likewise.
      	* c-typeck.c: Likewise.
      	* cfghooks.h: Likewise.
      	* cfgloopanal.c: Likewise.
      	* dbxout.h: Likewise.
      	* debug.h: Likewise.
      	* dwarf2asm.h: Likewise.
      	* gcov.c: Likewise.
      	* gengtype-lex.l: Likewise.
      	* sched-int.h: Likewise.
      	* timevar.c: Likewise.
      
      From-SVN: r69010
      Andreas Jaeger committed
  16. 22 Aug, 2001 1 commit
    • Makefile.in, [...]: replace "GNU CC" with "GCC". · 1322177d
      	* 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
      Lars Brinkhoff committed
  17. 19 Jul, 2001 2 commits
    • Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h. · e1772ac0
      	* Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
      	(final.o): Don't depend on xcoffout.h, dbxout.h or sdbout.h.
      	(toplev.o): Don't depend on xcoffout.h.
      	* c-decl.c: Include debug.h
      	(duplicate_decls): Use debug hook.
      	* dbxout.c (dbxout_source_file, dbxout_args): Make static.
      	(dbx_debug_hooks, xcoff_debug_hooks): Update.
      	(dbxout_types): Remove.
      	* dbxout.h (dbxout_source_file, dbxout_types, dbxout_args): Remove.
      	* debug.c (do_nothing_debug_hooks): Update.
      	(debug_true_tree, debug_nothing_rtx): New.
      	* debug.h (struct rtx_def): New.
      	(struct gcc_debug_hooks): New hooks ignore_block,
      	outlining_inline_function and label.
      	(debug_true_tree, debug_nothing_rtx, dwarf2out_frame_init,
      	dwarf2out_frame_finish): New.
      	* dwarf2out.c (dwarf2out_ignore_block, dwarf2out_abstract_function):
      	Make static, update prototype.
      	(dwarf2_debug_hooks): Update.
      	* dwarf2out.h (dwarf2out_ignore_block, dwarf2out_abstract_function,
      	dwarf2out_frame_init, dwarf2out_frame_finish): Remove.
      	* dwarfout.c (dwarf_debug_hooks): Update.
      	* emit-rtl.c: Include debug.h.
      	(remove_unnecessary_notes): Use debug hook.
      	* final.c: Don't include dbxout.h, xcoffout.h or sdbout.h.
      	(final_scan_insn): Use debug hook.
      	* integrate.c (output_inline_function): Use debug hook.
      	* sdbout.c (sdbout_toplevel_data, sdbout_label): Make static.
      	(sdb_debug_hooks): Update.
      	* sdbout.h (sdbout_label, sdbout_toplevel_data): Remove.
      	* toplev.c: Don't include xcoffout.h.
      	(note_outlining_of_inline_function, debug_ignore_block): Remove.
      	* toplev.h (note_outlining_of_inline_function, debug_ignore_block):
      	Remove.
      	* tree.h (dwarf2out_do_frame): Remove.
      
      From-SVN: r44163
      Neil Booth committed
    • Makefile.in (toplev.o, [...]): Don't depend on dwarfout.h. · 2b85879e
      	* Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on
      	dwarfout.h.
      	* dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move
      	to conditionally compiled block.
      	(dbx_debug_hooks, xcoff_debug_hooks): Update.
      	* dbxout.h (dbxout_function): Remove.
      	* debug.c (do_nothing_debug_hooks): Update.
      	* debug.h (struct gcc_debug_hooks): New hooks function_decl,
      	global_decl, deferred_inline_function.
      	* dwarf2out.c (dwarf2_debug_hooks): Update.
      	(dwarf2out_global_decl): New.
      	* dwarfout.c: Don't include dwarfout.h.
      	(dwarfout_global_decl, dwarfout_function_decl,
      	dwarfout_deferred_inline_function): New.
      	(dwarf_debug_hooks): Update.
      	* dwarfout.h: Remove.
      	* final.c: Don't include dwarfout.h.
      	* sdbout.c (sdbout_global_decl): New.
      	(sdbout_debug_hooks): Update.
      	* toplev.c: Don't include dwarfout.h.
      	(check_global_declarations, rest_of_compilation): Use new debug hooks.
      	(note_deferral_of_defined_inline_function): Remove.
      	* toplev.h (note_deferral_of_defined_inline_function): Remove.
      	* ch/Makefile.in (lex.o): No dependence on dwarfout.h.
      	* ch/lex.c: Don't include dwarfout.h.
      	* cp/Make-lang.in (decl2.o): No dependence on dwarfout.h, dwarf2out.h.
      	(semantics.o, optimize.o): Depend on debug.h not dwarfout.h.
      	* cp/decl2.c: Don't include dwarfout.h and dwarf2out.h.
      	* cp/optimize.c: Include debug.h.
      	(maybe_clone_body): Use debug hook.
      	* cp/semantics.c: Include debug.h.
      	(expand_body): Use debug hook.
      	* po/POTFILES.in: Remove dwarfout.h.
      
      From-SVN: r44145
      Neil Booth committed
  18. 17 Jul, 2001 1 commit
    • dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function. · 653e276c
      	* dbxout.c (dbxout_really_begin_function): Rename to
      	dbxout_begin_function.
      	(dbx_debug_hooks, xcoff_debug_hooks): Update.
      	(dbxout_begin_function): Remove.
      	(dbxout_function): Update.
      	(dbxout_source_line): Update prototype.
      	* dbxout.h (dbxout_begin_function): Remove.
      	* debug.c (do_nothing_debug_hooks): Update.
      	(debug_nothing_tree): Update.
      	(debug_nothing_charstar_rtx): Remove.
      	* debug.h (union tree_node): Declare.
      	(struct rtx_def): Remove.
      	(gcc_debug_hooks): New hooks begin_prologue, end_prologue,
      	begin_function.  Change source_line prototype.
      	(debug_nothing_tree): New.
      	(debug_nothing_charstar_rtx): Delete.
      	(dwarf2out_begin_prologue): Moved from ...
      	* tree.h: ... here.
      	* dwarf2out.c (dwarf2_debug_hooks): Update.
      	(dwarf2out_begin_prologue): Update prototype.  If genuine dwarf2
      	debug info, call dwarf2out_source_line.
      	(dwarf2out_souce_line): Update prototype.
      	* dwarfout.c (dwarfout_begin_function): Rename dwarfout_end_prologue.
      	Change prototype, make static.
      	(dwarfout_source_line): Update prototype.
      	(dwarf_debug_hooks): Update.
      	* dwarfout.h (dwarfout_begin_function): Remove.
      	* final.c (final_start_function, final_scan_insn): Use appropriate
      	debug hooks, update to use notice_source_line.
      	(output_source_line): Rename notice_source_line.  Don't call the
      	source_line debug hook.
      	* sdbout.c (sdbout_begin_function): Rename sdbout_begin_prologue,
      	make static, update prototype.
      	(sdbout_mark_begin_function): Rename sdbout_begin_function, update
      	prototype.
      	(sdbout_end_prologue): New.
      	(sdbout_source_line): Update prototype.
      	(sdbout_debug_hooks): Update.
      	(sdbout_symbol): Remove unused var.
      	* sdbout.h (sdbout_begin_function, sdbout_mark_begin_function):
      	Delete.
      	* varasm.c: Include debug.h.
      	(assemble_start_function): Use begin_function debug_hook.
      	* xcoffout.c (xcoffout_begin_prologue): Rename xcoffout_begin_function,
      	update with prototype.
      	(xcoffout_source_line): Update prototype.
      	* xcoffout.h (xcoffout_begin_prologue): Rename xcoffout_begin_function,
      	update prototype.
      	(xcoffout_source_line): Update prototype.
      
      From-SVN: r44087
      Neil Booth committed
  19. 15 Jul, 2001 1 commit
    • dbxout.c (dbxout_source_line): Make static, update prototype. · e2a12aca
      	* dbxout.c (dbxout_source_line): Make static, update prototype.
      	(dbx_debug_hooks, xcoff_debug_hooks): Add new hooks.
      	(dbxout_init, dbxout_finish, dbxout_source_line,
      	dbxout_begin_block, dbxout_end_block): Update for new prototypes.
      	* dbxout.h (dbxout_source_line): Delete.
      	* debug.c (debug_nothing_file, debug_nothing_file_int,
      	debug_nothing_file_charstar_rtx): New.
      	(do_nothing_debug_hooks): Update.
      	(debug_nothing_void, debug_nothing_charstar_rtx,
      	dwarf2out_end_epilogue): New.
      	(debug_nothing_file_charstar, debug_nothing_file_int_int): Rename.
      	* debug.h (struct rtx_def): Declare.
      	(gcc_debug_hooks): New hooks source_line, end_epilogue
      	and end_function.
      	(debug_nothing_void, debug_nothing_charstar_rtx,
      	dwarf2out_end_epilogue): New.
      	(debug_nothing_file_charstar, debug_nothing_file_int_int): Rename.
      	* dwarf2out.c (dwarf2out_source_line): Make static, update prototype.
      	(dwarf2_debug_hooks): Update.
      	(dwarf2out_init, dwarf2out_finish, dwarf2out_source_line,
      	dwarf2out_begin_block, dwarf2out_end_block): Update for new prototypes.
      	* dwarf2out.h (dwarf2out_source_line): Remove.
      	* dwarfout.c (dwarfout_end_epilogue, dwarfout_end_function):
      	Make static, update prototype.
      	(dwarfout_init, dwarfout_finish, dwarfout_source_line,
      	dwarfout_begin_block, dwarfout_end_block): Update for new prototypes.
      	(dwarf_debug_hooks): Update.
      	* dwarfout.h (dwarfout_end_epilogue, dwarfout_source_line,
      	dwarfout_end_function): Remove.
      	* final.c (profile_function): Use debug hooks for ending functions
      	and epilogues.
      	(output_source_line, final_end_function): Update prototype,
      	use debug hooks.
      	(final_start_function, final_scan_insn): Update.
      	* output.h (sdb_begin_function_line): Remove.
      	(final_end_function): Update prototype.
      	* sdbout.c (sdb_begin_function_line): Make static.
      	(PUT_SDB_EPILOGUE_END): Move to sdbout_end_epilogue.
      	(sdbout_source_line): New.
      	(sdbout_end_epilogue, sdbout_end_function): Make static, update
      	prototypes.
      	(sdb_debug_hooks): Update.
      	(sdbout_init, sdbout_source_line,
      	sdbout_begin_block, sdbout_end_block): Update for new prototypes.
      	* sdbout.h (sdbout_end_epilogue, sdbout_end_function): Remove.
      	* toplev.c (compile_file, rest_of_compilation): Update.
      	* tree.h (dwarf2out_end_epilogue): Move to debug.h.
      	* xcoffout.c (xcoffout_source_line, xcoffout_begin_block,
      	xcoffout_end_block, xcoffout_end_epilogue, xcoffout_end_function):
      	Update for prototype changes.
      	* xcoffout.h (xcoffout_source_line, xcoffout_begin_block,
      	xcoffout_end_block, xcoffout_end_epilogue): Update prototypes.
      
      From-SVN: r44017
      Neil Booth committed
  20. 11 Jul, 2001 1 commit
    • Makefile.in (c-lex.o): Wrap long lines. · 7f905405
      	* Makefile.in (c-lex.o): Wrap long lines.  Depend on debug.h.
      	* c-lex.c (cb_file_change, cb_define, cb_undef): Use debug
      	hooks directly.
      	* dbxout.c (dbx_debug_hooks): Add new hooks.
      	(dbxout_start_new_source_file): Rename dbxout_start_source_file,
      	make static.
      	(dbxout_resume_previous_source_file): Rename dbxout_end_source_file,
      	make static.
      	* dbxout.h (dbxout_start_new_source_file,
      	dbxout_resume_previous_source_file): Delete.
      	* debug.c (do_nothing_debug_hooks): Add new hooks.
      	(debug_nothing_init_finish): Rename debug_nothing_file_charstar.
      	(debug_nothing_int_charstar, debug_nothing_int): New.
      	* debug.h (gcc_debug_hooks): New hooks define, undef,
      	start_source_file and end_source_file.
      	(debug_nothing_init_finish): Rename debug_nothing_file_charstar.
      	(debug_nothing_int_charstar, debug_nothing_int): New.
      	* dwarf2out.c (dwarf2_debug_hooks): Add new hooks.
      	(dwarf2out_start_source_file, dwarf2out_end_source_file,
      	dwarf2out_define, dwarf2out_undef): Make static.
      	* dwarf2out.h (dwarf2out_start_source_file, dwarf2out_end_source_file,
      	dwarf2out_define, dwarf2out_undef): Remove.
      	* dwarfout.c (dwarf_debug_hooks): Add new hooks.
      	(dwarfout_start_source_file, dwarfout_end_source_file,
      	dwarfout_define, dwarfout_undef): Make static.
      	(dwarfout_start_source_file_check,
      	dwarfout_end_source_file_check): New.
      	(dwarfout_define, dwarfout_finish): Update.
      	* dwarfout.h (dwarfout_start_new_source_file,
      	dwarfout_resume_previous_source_file, dwarfout_define,
      	dwarfout_undef): Remove.
      	* sdbout.c (sdb_debug_hooks): Add new hooks.
      	(sdbout_start_new_source_file): Rename sdbout_start_source_file,
      	make static.
      	(sdbout_resume_previous_source_file): Rename sdbout_end_source_file,
      	make static, take an arg.
      	* sdbout.h (sdbout_start_new_source_file,
      	sdbout_resume_previous_source_file): Delete.
      	* toplev.c (debug_start_source_file, debug_end_source_file,
      	debug_define, debug_undef): Delete.
      	* toplev.h (debug_start_source_file, debug_end_source_file,
      	debug_define, debug_undef): Delete.
      
      	* java/jcf-parse.c: Include debug.h.
      	(parse_class_file): Update to use debug hooks directly.
      	* java/Make-lang.in (jcf-parse.o): Depend on debug.h.
      
      From-SVN: r43952
      Neil Booth committed
  21. 10 Jul, 2001 1 commit
    • Makefile.in (toplev.o, [...]): Depend on debug.h, wrap long lines. · a51d908e
      	* Makefile.in (toplev.o, sdbout.o, dbxout.o, dwarfout.o,
      	dwarf2out.o): Depend on debug.h, wrap long lines.
      	* dbxout.c: Include debug.h.
      	(dbx_debug_hooks): New.
      	(dbxout_init): Make static, take just 2 args.
      	(dbxout_finish): Make static.
      	* dbxout.h (dbxout_init, dbxout_finish): Delete.
      	* debug.c: New file.
      	* debug.h: New file.
      	* dwarf2out.c: Include debug.h.
      	(dwarf2_debug_hooks): New.
      	(dwarf2out_init): Make static.
      	(dwarf2out_finish): Make static, take 2 args.
      	* dwarf2out.h (dwarf2out_init, dwarf2out_finish): Delete.
      	* dwarfout.c: Include debug.h.
      	(dwarf_debug_hooks): New.
      	(dwarfout_init): Make static.
      	(dwarfout_finish): Make static, take 2 args.
      	* dwarfout.h (dwarfout_init, dwarfout_finish): Delete.
      	* sdbout.c: Include debug.h.
      	(sdb_debug_hooks): New.
      	(sdbout_init): Make static, take 2 args.
      	* sdbout.h (sdbout_init): Delete.
      	* toplev.c: Include debug.h.
      	(debug_hooks): New.
      	(compile_file): Set deubg_hooks based on command line options.
      	Use the hooks unconditionally rather than conditional compilation.
      
      From-SVN: r43908
      Neil Booth committed
  22. 29 Feb, 2000 1 commit
    • c-decl.c (current_function_decl): Move to toplev.c. · 00262c8a
      	* c-decl.c (current_function_decl): Move to toplev.c.
      	(init_decl_processing): Don't add current_function_decl as a ggc
      	root here.
      	* dbxout.c (dbxout_symbol): Change return type to int.
      	(dbxout_symbol_location, dbxout_syms): Likewise.
      	(dbxout_block): Don't emit LBRAC/RBRAC pairs for blocks without
      	any locals. Use current_function_func_begin_label if set.
      	* dbxout.h (dbxout_symbol, dbxout_syms): Change return type.
      	* dwarf2out.c (dwarf2out_begin_prologue): Set
      	current_function_func_begin_label.
      	* final.c (final_start_function): Reset it.
      	* toplev.c (current_function_decl): Define it here.
      	(current_function_func_begin_label): New variable.
      	(main): Add both as ggc roots.
      	* tree.h (current_function_func_begin_label): Declare.
      	* ch/decl.c (current_function_decl): Move to toplev.c.
      	* cp/decl.c (current_function_decl): Move to toplev.c.
      	* f/com.c (current_function_decl): Move to toplev.c.
      	* java/decl.c (current_function_decl): Move to toplev.c.
      
      From-SVN: r32268
      Martin v. Löwis committed
  23. 14 Jan, 2000 1 commit
    • cccp.c: PROTO -> PARAMS. · 83d2b3b9
      	* cccp.c: PROTO -> PARAMS.
      	* cexp.y: Likewise.
      	* collect2.c: Likewise.
      	* combine.c: Likewise.
      	* convert.h: Likewise.
      	* cse.c: Likewise.
      	* dbxout.c: Likewise.
      	* dbxout.h: Likewise.
      	* diagnostic.c: Likewise.
      	* doprint.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* dwarf2out.h: Likewise.
      	* dwarfout.c: Likewise.
      	* dwarfout.h: Likewise.
      	* dyn-string.h: Likewise.
      
      From-SVN: r31399
      Kaveh R. Ghazi committed
  24. 26 Oct, 1999 1 commit
    • dbxout.c (lastfile, [...]): Constify a char*. · a996cbd4
      	* dbxout.c (lastfile, cwd, dbxout_type_method_1,
      	dbxout_symbol_location, dbxout_symbol_name, dbxout_init,
      	dbxout_start_new_source_file, dbxout_source_file,
      	dbxout_source_line, dbxout_finish, dbxout_type_fields,
      	dbxout_type_methods, dbxout_symbol, dbxout_prepare_symbol):
      	Constify a char*.
      	(dbxout_types, dbxout_args, dbxout_symbol): Delete prototypes.
      	(dbxout_symbol): Mark parameter `local' with ATTRIBUTE_UNUSED.
      	(dbxout_block): Initialize variable `blocknum'.
      
      	* dbxout.h (dbxout_init, dbxout_finish,
      	dbxout_start_new_source_file, dbxout_source_file, dbxout_types,
      	dbxout_args, dbxout_source_line): Constify a char*.
      
      	* dwarfout.c (dwarf_tag_name, dwarf_attr_name,
      	dwarf_stack_op_name, dwarf_typemod_name, dwarf_fmt_byte_name,
      	dwarf_fund_type_name, name_attribute, stmt_list_attribute,
      	low_pc_attribute, high_pc_attribute, body_begin_attribute,
      	body_end_attribute, comp_dir_attribute, sf_names_attribute,
      	src_info_attribute, mac_info_attribute, producer_attribute,
      	lookup_filename, generate_macinfo_entry, fundamental_type_code,
      	dwarfout_line, dwarfout_start_new_source_file, dwarfout_define,
      	dwarfout_undef): Constify a char*.
      	(add_incomplete_type, retry_incomplete_types): Add prototypes.
      
      	* dwarfout.h (dwarfout_define, dwarfout_undef,
      	dwarfout_start_new_source_file, dwarfout_line): Constify a char*.
      
      From-SVN: r30173
      Kaveh R. Ghazi committed
  25. 25 Jun, 1998 1 commit
    • Warning fixes: · 296b8152
              * Makefile.in (xcoffout.o): Depend on toplev.h, output.h and dbxout.h.
              * config/fp-bit.c (_fpmul_parts): Move variables `x', `ylow',
              `yhigh' and `bit' into the scope in which they are used.
              (_fpdiv_parts): Remove unused variables `low', `high', `r0', `r1',
              `y0', `y1', `q', `remainder', `carry', `d0' and `d1'.
              * rs6000.c: Move include of output.h below tree.h.  Include toplev.h.
              (any_operand): Mark unused parameters `op' and `mode' with
              ATTRIBUTE_UNUSED.
              (count_register_operand): Likewise for parameter `mode'.
              (fpmem_operand): Likewise.
              (short_cint_operand): Likewise.
              (u_short_cint_operand): Likewise.
              (non_short_cint_operand): Likewise.
              (got_operand): Likewise.
              (got_no_const_operand): Likewise.
              (non_add_cint_operand): Likewise.
              (non_logical_cint_operand): Likewise.
              (mask_operand): Likewise.
              (current_file_function_operand): Likewise.
              (small_data_operand): Likewise for parameters `op' and `mode' but
              only when !TARGET_ELF.
              (init_cumulative_args): Mark parameters `libname' with
              ATTRIBUTE_UNUSED.
              (function_arg_pass_by_reference): Likewise for parameters `cum',
              `mode' and `named'.
              (expand_builtin_saveregs): Likewise for parameter `args'.
              (load_multiple_operation): Likewise for parameter `mode'.
              (store_multiple_operation): Likewise.
              (branch_comparison_operator): Likewise.
              (secondary_reload_class): Likewise.
              (print_operand): Add parentheses around & operation.
              (output_prolog): Mark parameter `size' with ATTRIBUTE_UNUSED.
              (output_epilog): Likewise.  Cast argument to fprintf to int.
              (rs6000_adjust_cost): Mark parameter `dep_insn' with ATTRIBUTE_UNUSED.
              (rs6000_valid_decl_attribute_p): Likewise for parameters `decl',
              `attributes', `identifier' and `args'.
              (rs6000_valid_type_attribute_p): Likewise for parameter `attributes'.
              (rs6000_comp_type_attributes): Likewise for parameters `type1' and
              `type2'.
              (rs6000_set_default_type_attributes): Likewise for parameter `type'.
              * rs6000.h (RTX_COSTS): Add parentheses around & operation.
              (toc_section, private_data_section, trap_comparison_operator): Add
              prototypes.
              * dbxout.h (dbxout_parms, dbxout_reg_parms, dbxout_syms): Add
              prototypes.
              * xcoffout.c: Include toplev.h, outout.h and dbxout.h.
              * xcoffout.h (stab_to_sclass, xcoffout_begin_function,
              xcoffout_begin_block, xcoffout_end_epilogue,
              xcoffout_end_function, xcoffout_end_block,
              xcoff_output_standard_types, xcoffout_declare_function,
              xcoffout_source_line): Add prototypes.
      
      From-SVN: r20717
      Kaveh R. Ghazi committed
  26. 08 Jun, 1998 1 commit
    • Warning fixes: · 50b2596f
      	* Makefile.in (varasm.o): Depend on dbxout.h.
      	(cse.o): Depend on toplev.h and output.h.
      	(gcse.o): Depend on output.h.
      	* mips.c: Include system.h and toplev.h and remove redundant code.
      	Include output.h after tree.h so all its prototypes get activated.
      	* mips.md (table_jump): Remove unused variable `dest'.
      	* sparc.h: Add prototype for `v8plus_regcmp_op'.
      	* crtstuff.c (fini_dummy, init_dummy): Mark function definitions
      	with __attribute__ ((__unused__)).
      	(__frame_dummy): Provide prototype before use, wrap it with
      	EH_FRAME_SECTION_ASM_OP.
      	* cse.c: Move inclusion of <setjmp.h> above local headers.
        	Include toplev.h and output.h.
      	* dbxout.h: Add prototype for `dbxout_begin_function'.
      	* final.c (final_scan_insn): Wrap variable `max_skip' in macro
      	ASM_OUTPUT_MAX_SKIP_ALIGN.
      	* gcse.c: Include system.h and output.h.
      	(dump_cuid_table, dump_rd_table, dump_cprop_data, dump_pre_data):
      	Make extern instead of static.
      	(compute_can_copy): Only declare variables `reg' and `insn' when
       	AVOID_CCMODE_COPIES is not defined.
      	(record_set_info): Mark parameter `setter' with ATTRIBUTE_UNUSED.
      	(hash_scan_clobber): Likewise for `x' and `insn'.
      	(hash_scan_call): Likewise.
      	(record_last_set_info): Likewise for `setter'.
      	(mark_call): Likewise for `pat'.
      	(pre_insert_insn): Wrap variable `note' in macro HAVE_cc0.
      	* libgcc2.c (__bb_init_prg): Replace bzero with memset and fix the
       	length parameter so that it multiplies the number of elements by
       	the sizeof(element).
      	* output.h: Add prototype for `weak_finish'.
      	* recog.h: Likewise for `validate_replace_src'.
      	* rtl.h: Likewise for `optimize_save_area_alloca',
       	`fix_sched_param', `purge_addressof', `gcse_main',
       	`regmove_optimize', `dbr_schedule', `branch_prob' and
       	`end_branch_prob'.
      	* toplev.h: Likewise for `set_float_handler' and
       	`output_quoted_string'.
      	* varasm.c: Include dbxout.h.
      
      From-SVN: r20351
      Kaveh R. Ghazi committed
  27. 18 May, 1998 1 commit
    • dwarfout.h, [...]: New files. · 76ead72b
              * dwarfout.h, dwarf2out.h, dbxout.h, sdbout.h:  New files.
              Prototypes for externally used functions in respective C files.
              * dwarfout.c, dbxout.c, dwarf2out.c, sdbout.c, toplev,c,
              final.c: Include above files.
              * Makefile.in (toplev.o): Add dependency for above four headers.
              (final.o): Likewise.
              (dwarfout.o, dbxout.o, dwarf2out.o, sdbout.o): Depend on four
              respective header files.
      
      From-SVN: r19835
      Robert Lipe committed
  28. 22 Feb, 1998 1 commit
  29. 06 Dec, 1997 1 commit
  30. 11 Aug, 1997 1 commit
  31. 15 Jun, 1995 1 commit
  32. 13 Feb, 1994 1 commit
  33. 30 Oct, 1993 2 commits
  34. 29 Oct, 1993 1 commit
  35. 24 May, 1993 1 commit
  36. 11 Jan, 1993 1 commit
  37. 11 Oct, 1992 1 commit