gcc/gcc/libfuncs.h
Eric Botcazou ee516de9b3 builtins.c (expand_builtin_memcmp): Do not emit the call here.
* builtins.c (expand_builtin_memcmp): Do not emit the call here.
	(expand_builtin_trap): Emit a regular call.
	(set_builtin_user_assembler_name): Remove obsolete cases.
	* dse.c (scan_insn): Adjust.
	* except.c: Include calls.h.
	(sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is defined,
	emit a regular call to setjmp.
	* expr.c (emit_block_move_hints): Call emit_block_copy_via_libcall.
	(block_move_libcall_safe_for_call_parm): Use memcpy builtin.
	(emit_block_move_via_libcall): Delete.
	(block_move_fn): Delete.
	(init_block_move_fn): Likewise.
	(emit_block_move_libcall_fn): Likewise.
	(emit_block_op_via_libcall): New function.
	(set_storage_via_libcall): Tidy up and use memset builtin.
	(block_clear_fn): Delete.
	(init_block_clear_fn): Likewise.
	(clear_storage_libcall_fn): Likewise.
	(expand_assignment): Call emit_block_move_via_libcall.
	Do not include gt-expr.h.
	* expr.h (emit_block_op_via_libcall): Declare.
	(emit_block_copy_via_libcall): New inline function.
	(emit_block_move_via_libcall): Likewise.
	(emit_block_comp_via_libcall): Likewise.
	(block_clear_fn): Delete.
	(init_block_move_fn): Likewise.
	(init_block_clear_fn): Likewise.
	(emit_block_move_via_libcall): Likewise.
	(set_storage_via_libcall): Add default parameter value.
	* libfuncs.h (enum libfunc_index): Remove obsolete values.
	(abort_libfunc): Delete.
	(memcpy_libfunc): Likewise.
	(memmove_libfunc): Likewise.
	(memcmp_libfunc): Likewise.
	(memset_libfunc): Likewise.
	(setbits_libfunc): Likewise.
	(setjmp_libfunc): Likewise.
	(longjmp_libfunc): Likewise.
	(profile_function_entry_libfunc): Likewise.
	(profile_function_exit_libfunc): Likewise.
	(gcov_flush_libfunc): Likewise.
	* optabs-libfuncs.c (build_libfunc_function): Set DECL_ARTIFICIAL
	and DECL_VISIBILITY on the declaration.
	(init_optabs): Do not initialize obsolete libfuncs.
	* optabs.c (prepare_cmp_insn): Call emit_block_comp_via_libcall.
	* tree-core.h (ECF_RET1): Define.
	(ECF_TM_PURE): Adjust.
	(ECF_TM_BUILTIN): Likewise.
	* tree.c (set_call_expr_flags): Deal with ECF_RET1.
	(build_common_builtin_nodes): Initialize abort builtin.
	Add ECF_RET1 on memcpy, memmove and memset builtins.
	Pass final flags for alloca and alloca_with_align builtins.
	* config/alpha/alpha.c (alpha_init_libfuncs): Do not initialize
	obsolete builtins.
	* config/ia64/ia64.c (ia64_vms_init_libfuncs): Likewise.
	* config/i386/i386.c (ix86_expand_set_or_movmem): Adjust call to
	set_storage_via_libcall and call emit_block_copy_via_libcall.

From-SVN: r236195
2016-05-13 08:49:20 +00:00

85 lines
2.5 KiB
C

/* Definitions for code generation pass of GNU compiler.
Copyright (C) 2001-2016 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_LIBFUNCS_H
#define GCC_LIBFUNCS_H
/* Enumeration of indexes into libfunc_table. */
enum libfunc_index
{
LTI_unwind_sjlj_register,
LTI_unwind_sjlj_unregister,
LTI_synchronize,
LTI_MAX
};
/* Information about an optab-related libfunc. The op field is logically
an enum optab_d, and the mode fields are logically machine_mode.
However, in the absence of forward-declared enums, there's no practical
benefit of pulling in the defining headers.
We use the same hashtable for normal optabs and conversion optabs. In
the first case mode2 is forced to VOIDmode. */
struct GTY((for_user)) libfunc_entry {
int op, mode1, mode2;
rtx libfunc;
};
/* Descriptor for libfunc_entry. */
struct libfunc_hasher : ggc_ptr_hash<libfunc_entry>
{
static hashval_t hash (libfunc_entry *);
static bool equal (libfunc_entry *, libfunc_entry *);
};
/* Target-dependent globals. */
struct GTY(()) target_libfuncs {
/* SYMBOL_REF rtx's for the library functions that are called
implicitly and not via optabs. */
rtx x_libfunc_table[LTI_MAX];
/* Hash table used to convert declarations into nodes. */
hash_table<libfunc_hasher> *GTY(()) x_libfunc_hash;
};
extern GTY(()) struct target_libfuncs default_target_libfuncs;
#if SWITCHABLE_TARGET
extern struct target_libfuncs *this_target_libfuncs;
#else
#define this_target_libfuncs (&default_target_libfuncs)
#endif
#define libfunc_table \
(this_target_libfuncs->x_libfunc_table)
/* Accessor macros for libfunc_table. */
#define unwind_sjlj_register_libfunc (libfunc_table[LTI_unwind_sjlj_register])
#define unwind_sjlj_unregister_libfunc \
(libfunc_table[LTI_unwind_sjlj_unregister])
#define synchronize_libfunc (libfunc_table[LTI_synchronize])
/* In explow.c */
extern void set_stack_check_libfunc (const char *);
#endif /* GCC_LIBFUNCS_H */