diff options
author | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-29 12:12:39 +0000 |
---|---|---|
committer | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-29 12:12:39 +0000 |
commit | bbc26dccc791bb7cb62e3abd62d31a946ee4e330 (patch) | |
tree | a9419c14461cb91513d4f9dac632dbff36693565 /gcc/target.def | |
parent | 1f2b5ac200d9a5b1f8e5860a56bca0c4e9e126c7 (diff) | |
download | gcc-bbc26dccc791bb7cb62e3abd62d31a946ee4e330.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205522 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target.def')
-rw-r--r-- | gcc/target.def | 131 |
1 files changed, 0 insertions, 131 deletions
diff --git a/gcc/target.def b/gcc/target.def index ca1d2506c7b..524a299d4bc 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -2078,104 +2078,6 @@ built-in function.", (tree exp, rtx target, rtx subtarget, enum machine_mode mode, int ignore), default_expand_builtin) -DEFHOOK -(builtin_chkp_function, - "This hook allows target to redefine built-in functions used by\n\ -Pointer Bounds Checker for code instrumentation. Hook should return\n\ -fndecl of function implementing generic builtin whose code is\n\ -passed in @var{fcode}. Currently following built-in functions are\n\ -obtained using this hook:\n\ -@deftypefn {Built-in Function} bnd __chkp_bndmk (const void *@var{lb}, size_t @var{size})\n\ -Function code - BUILT_IN_CHKP_BNDMK. This built-in function is used\n\ -by Pointer Bounds Checker to create bound values. @var{lb} holds low\n\ -bound of the resulting bounds. @var{size} holds size of created bounds.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} void __chkp_bndstx (const void **@var{loc}, const void *@var{ptr}, bnd @var{b})\n\ -Function code - @code{BUILT_IN_CHKP_BNDSTX}. This built-in function is used\n\ -by Pointer Bounds Checker to store bounds @var{b} for pointer @var{ptr}\n\ -stored by address @var{loc}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} bnd __chkp_bndldx (const void **@var{loc}, const void *@var{ptr})\n\ -Function code - @code{BUILT_IN_CHKP_BNDLDX}. This built-in function is used\n\ -by Pointer Bounds Checker to get bounds of pointer @var{ptr} loaded by\n\ -address @var{loc}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} void __chkp_bndcl (bnd @var{b}, const void *@var{ptr})\n\ -Function code - @code{BUILT_IN_CHKP_BNDCL}. This built-in function is used\n\ -by Pointer Bounds Checker to perform check for pointer @var{ptr} against\n\ -lower bound of bounds @var{b}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} void __chkp_bndcu (bnd @var{b}, const void *@var{ptr})\n\ -Function code - @code{BUILT_IN_CHKP_BNDCU}. This built-in function is used\n\ -by Pointer Bounds Checker to perform check for pointer @var{ptr} against\n\ -upper bound of bounds @var{b}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} bnd __chkp_bndret (void *@var{ptr})\n\ -Function code - @code{BUILT_IN_CHKP_BNDRET}. This built-in function is used\n\ -by Pointer Bounds Checker to obtain bounds returned by call statement.\n\ -@var{ptr} passed to buil-in is @code{SSA_NAME} returned by call.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} bnd __chkp_arg_bnd (void *@var{arg})\n\ -Function code - @code{BUILT_IN_CHKP_ARG_BND}. This built-in function is\n\ -used by Pointer Bounds Checker to obtain bounds passed for input argument.\n\ -@var{arg} is default @code{SSA_NAME} of the @code{PARM_DECL} whose\n\ -bounds we want to obtain.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} bnd __chkp_intersect (bnd @var{b1}, bnd @var{b2})\n\ -Function code - @code{BUILT_IN_CHKP_INTERSECT}. This built-in function\n\ -returns intersection of bounds @var{b1} and @var{b2}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} bnd __chkp_narrow (const void *@var{ptr}, bnd @var{b}, size_t @var{s})\n\ -Function code - @code{BUILT_IN_CHKP_NARROW}. This built-in function\n\ -returns intersection of bounds @var{b} and\n\ -[@var{ptr}, @var{ptr} + @var{s} - @code{1}].\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} void *__chkp_set_bounds (const void *@var{ptr}, size_t @var{s})\n\ -Function code - @code{BUILT_IN_CHKP_SET_PTR_BOUNDS}. This built-in function\n\ -returns @var{ptr} with bounds [@var{ptr}, @var{ptr} + @var{s} - @code{1}].\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} size_t __chkp_sizeof (const void *@var{ptr})\n\ -Function code - @code{BUILT_IN_CHKP_SIZEOF}. This built-in function\n\ -returns size of object referenced by @var{ptr}. @var{ptr} is always\n\ -@code{ADDR_EXPR} of @code{VAR_DECL}. This built-in is used by\n\ -Pointer Boudns Checker when bounds of object cannot be computed statically\n\ -(e.g. object has incomplete type).\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} const void *__chkp_extract_lower (bnd @var{b})\n\ -Function code - @code{BUILT_IN_CHKP_EXTRACT_LOWER}. This built-in function\n\ -returns lower bound of bounds @var{b}.\n\ -@end deftypefn\n\ -\n\ -@deftypefn {Built-in Function} const void *__chkp_extract_upper (bnd @var{b})\n\ -Function code - @code{BUILT_IN_CHKP_EXTRACT_UPPER}. This built-in function\n\ -returns upper bound of bounds @var{b}.\n\ -@end deftypefn", - tree, (unsigned fcode), - default_builtin_chkp_function) - -DEFHOOK -(chkp_bound_type, - "Return type to be used for bounds", - tree, (void), - default_chkp_bound_type) - -DEFHOOK -(chkp_bound_mode, - "Return mode to be used for bounds.", - enum machine_mode, (void), - default_chkp_bound_mode) - /* Select a replacement for a target-specific builtin. This is done *before* regular type checking, and so allows the target to implement a crude form of function overloading. The result is a @@ -3426,15 +3328,6 @@ The default version of this hook returns @code{va_list_type_node}.", tree, (tree fndecl), std_fn_abi_va_list) -DEFHOOK -(fn_abi_va_list_bounds_size, - "This hook returns size for @code{va_list} object in function specified\n\ -by @var{fndecl}. This hook is used by Pointer Bounds Checker to build bounds\n\ -for @code{va_list} object. Return @code{integer_zero_node} if no bounds\n\ -should be used (e.g. @code{va_list} is a scalar pointer to the stack).", - tree, (tree fndecl), - default_fn_abi_va_list_bounds_size) - /* Get the __builtin_va_list type dependent on input type. */ DEFHOOK (canonical_va_list_type, @@ -3883,30 +3776,6 @@ not generate any instructions in this case.", default_setup_incoming_varargs) DEFHOOK -(load_bounds_for_arg, - "This hook is used by expand pass to emit insn to load bounds of\n\ -@var{arg} passed in @var{slot}. Expand pass uses this hook in case\n\ -bounds of @var{arg} are not passed in register. If @var{slot} is a\n\ -memory, then bounds are loaded as for regular pointer loaded from\n\ -memory. If @var{slot} is not a memory then @var{slot_no} is an integer\n\ -constant holding number of the target dependent special slot which\n\ -should be used to obtain bounds. Hook returns RTX holding loaded bounds.", - rtx, (rtx slot, rtx arg, rtx slot_no), - default_load_bounds_for_arg) - -DEFHOOK -(store_bounds_for_arg, - "This hook is used by expand pass to emit insns to store @var{bounds} of\n\ -@var{arg} passed in @var{slot}. Expand pass uses this hook in case\n\ -@var{bounds} of @var{arg} are not passed in register. If @var{slot} is a\n\ -memory, then @var{bounds} are stored as for regular pointer stored in\n\ -memory. If @var{slot} is not a memory then @var{slot_no} is an integer\n\ -constant holding number of the target dependent special slot which\n\ -should be used to store @var{bounds}.", - void, (rtx arg, rtx slot, rtx bounds, rtx slot_no), - default_store_bounds_for_arg) - -DEFHOOK (strict_argument_naming, "Define this hook to return @code{true} if the location where a function\n\ argument is passed depends on whether or not it is a named argument.\n\ |