+2004-07-05 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * c-decl.c, config/m32r/m32r.c, expr.c, optabs.c: Don't check
+ TARGET_MEM_FUNCTIONS.
+ * system.h: Poison TARGET_MEM_FUNCTIONS.
+ * libfuncs.h (LTI_bcopy, LTI_bcmp, LTI_bzero, bcopy_libfunc,
+ bcmp_libfunc, bzero_libfunc): Remove.
+ * optabs.c (init_obtabs): Don't set bcopy_libfunc, bcmp_libfunc or
+ bzero_libfunc.
+ * doc/tm.texi (TARGET_MEM_FUNCTIONS): Remove.
+ * doc/standards.texi: Don't mention calling BSD string functions.
+ * doc/invoke.texi: Likewise. Mention that memmove may be called.
+ * config/vax/t-memfuncs: New.
+ * config/memcmp.c, config/memcpy.c, config/memmove.c,
+ config/memset.c: New.
+ * config/pdp11/t-pdp11 (LIB2FUNCS_EXTRA): Use these files.
+ * config.gcc (vax-*-bsd*, vax-*-sysv*, vax-*-ultrix*): Use
+ vax/t-memfuncs.
+ * config/alpha/alpha.h, config/arc/arc.h, config/arm/arm.h,
+ config/avr/avr.h, config/c4x/c4x.h, config/cris/aout.h,
+ config/elfos.h, config/gnu.h, config/h8300/h8300.h,
+ config/i386/gas.h, config/ia64/ia64.h, config/interix.h,
+ config/ip2k/ip2k.h, config/lynx-ng.h, config/m32r/m32r.h,
+ config/mcore/mcore.h, config/mips/mips.h, config/mmix/mmix.h,
+ config/netbsd.h, config/openbsd.h, config/pa/pa.h,
+ config/rs6000/rs6000.h, config/rtems.h, config/s390/s390.h,
+ config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16.h,
+ config/svr3.h: Don't define TARGET_MEM_FUNCTIONS.
+
2004-07-05 Richard Henderson <rth@redhat.com>
* function.c (assign_parm_setup_reg): Properly rename variables in
tree builtin = built_in_decls [DECL_FUNCTION_CODE (decl)];
SET_DECL_RTL (builtin, NULL_RTX);
change_decl_assembler_name (builtin, get_identifier (starred));
-#ifdef TARGET_MEM_FUNCTIONS
if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMCPY)
init_block_move_fn (starred);
else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMSET)
init_block_clear_fn (starred);
-#else
- if (DECL_FUNCTION_CODE (decl) == BUILT_IN_BCOPY)
- init_block_move_fn (starred);
- else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_BZERO)
- init_block_clear_fn (starred);
-#endif
}
SET_DECL_RTL (decl, NULL_RTX);
change_decl_assembler_name (decl, get_identifier (starred));
;;
vax-*-bsd*) # VAXen running BSD
tm_file="${tm_file} vax/bsd.h"
+ tmake_file=vax/t-memfuncs
use_collect2=yes
use_fixproto=yes
;;
vax-*-sysv*) # VAXen running system V
tm_file="${tm_file} vax/vaxv.h"
+ tmake_file=vax/t-memfuncs
use_fixproto=yes
;;
vax-*-netbsdelf*)
;;
vax-*-ultrix*) # VAXen running ultrix
tm_file="${tm_file} vax/ultrix.h"
+ tmake_file=vax/t-memfuncs
use_fixproto=yes
;;
xscale-*-elf)
/* The system headers under Alpha systems are generally C++-aware. */
#define NO_IMPLICIT_EXTERN_C
-
-/* Generate calls to memcpy, etc., not bcopy, etc. */
-#define TARGET_MEM_FUNCTIONS 1
emit_insn (gen_flush_icache (validize_mem (gen_rtx_MEM (SImode, TRAMP)))); \
} while (0)
\f
-/* Library calls. */
-
-/* Generate calls to memcpy, memcmp and memset. */
-#define TARGET_MEM_FUNCTIONS
-\f
/* Addressing modes, and classification of registers for them. */
/* Maximum number of registers that can appear in a valid memory address. */
that is controlled by the APCS-FRAME option. */
#define CAN_DEBUG_WITHOUT_FP
-#undef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS 1
-
#define OVERRIDE_OPTIONS arm_override_options ()
/* Nonzero if PIC code requires explicit qualifiers to generate
#define ADJUST_INSN_LENGTH(INSN, LENGTH) (LENGTH =\
adjust_insn_length (INSN, LENGTH))
-#define TARGET_MEM_FUNCTIONS
-
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
#define CC1_SPEC "%{profile:-p}"
fprintf (FILE, "\tpop\tar2\n"); \
}
-/* Implicit Calls to Library Routines. */
-
-#define TARGET_MEM_FUNCTIONS
-
/* CC_NOOVmode should be used when the first operand is a PLUS, MINUS, NEG
or MULT.
CCmode should be used when no special processing is needed. */
#define MAX_OFILE_ALIGNMENT 16
-/* Node: Library Calls */
-
-#define TARGET_MEM_FUNCTIONS
-
-
/* Node: Data Output */
#define ESCAPES \
#define PCC_BITFIELD_TYPE_MATTERS 1
#endif
-/* Implicit library calls should use memcpy, not bcopy, etc. */
-
-#define TARGET_MEM_FUNCTIONS
-
/* Handle #pragma weak and #pragma pack. */
#define HANDLE_SYSV_PRAGMA 1
#undef STANDARD_INCLUDE_DIR
#define STANDARD_INCLUDE_DIR "/include"
-/* Implicit library calls should use memcpy, not bcopy, etc. */
-#undef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-
/* The system headers under GNU are C++-aware. */
#define NO_IMPLICIT_EXTERN_C
#define FINAL_PRESCAN_INSN(insn, operand, nop) \
final_prescan_insn (insn, operand, nop)
-/* Define this macro if GCC should generate calls to the System V
- (and ANSI C) library functions `memcpy' and `memset' rather than
- the BSD functions `bcopy' and `bzero'. */
-
-#define TARGET_MEM_FUNCTIONS
-
#define MOVE_RATIO 3
/* Define the codes that are matched by predicates in h8300.c. */
#define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME);
-/* Implicit library calls should use memcpy, not bcopy, etc. */
-
-#define TARGET_MEM_FUNCTIONS
-
/* In the past there was confusion as to what the argument to .align was
in GAS. For the last several years the rule has been this: for a.out
file formats that argument is LOG, and for all other file formats the
#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \
ia64_initialize_trampoline((ADDR), (FNADDR), (STATIC_CHAIN))
-\f
-/* Implicit Calls to Library Routines */
-
-/* Define this macro if GCC should generate calls to the System V (and ANSI
- C) library functions `memcpy' and `memset' rather than the BSD functions
- `bcopy' and `bzero'. */
-
-#define TARGET_MEM_FUNCTIONS
-
\f
/* Addressing Modes */
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
-
/* POSIX/Uni-thread only for now. Look at the winnt version
for windows/multi thread */
#define FUNCTION_PROFILER(FILE, LABELNO) \
fprintf ((FILE), "/* profiler %d */", (LABELNO))
-#define TARGET_MEM_FUNCTIONS
-
#undef ENDFILE_SPEC
#undef LINK_SPEC
#undef STARTFILE_SPEC
#define SDB_DEBUGGING_INFO 1
-/* Generate calls to memcpy, memcmp and memset. */
-
-#define TARGET_MEM_FUNCTIONS
-
/* Handle #pragma pack and sometimes #pragma weak. */
#define HANDLE_SYSV_PRAGMA 1
&& GET_MODE (bytes_rtx) != Pmode)
bytes_rtx = convert_to_mode (Pmode, bytes_rtx, 1);
-#ifdef TARGET_MEM_FUNCTIONS
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "memcpy"), 0,
VOIDmode, 3, dest_reg, Pmode, src_reg, Pmode,
convert_to_mode (TYPE_MODE (sizetype), bytes_rtx,
TYPE_UNSIGNED (sizetype)),
TYPE_MODE (sizetype));
-#else
- emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "bcopy"), 0,
- VOIDmode, 3, src_reg, Pmode, dest_reg, Pmode,
- convert_to_mode (TYPE_MODE (integer_type_node), bytes_rtx,
- TYPE_UNSIGNED (integer_type_node)),
- TYPE_MODE (integer_type_node));
-#endif
}
/* The maximum number of bytes to copy using pairs of load/store instructions.
} \
while (0)
\f
-/* Library calls. */
-
-/* Generate calls to memcpy, memcmp and memset. */
-#define TARGET_MEM_FUNCTIONS
-\f
#define RETURN_ADDR_RTX(COUNT, FRAME) m32r_return_addr (COUNT)
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, RETURN_ADDR_REGNUM)
#define WORD_REGISTER_OPERATIONS
-/* Implicit library calls should use memcpy, not bcopy, etc. */
-#define TARGET_MEM_FUNCTIONS
-
/* Assembler output control. */
#define ASM_COMMENT_START "\t//"
--- /dev/null
+/* Public domain. */
+#include <stddef.h>
+
+int
+memcmp (const void *str1, const void *str2, size_t count)
+{
+ const unsigned char *s1 = str1;
+ const unsigned char *s2 = str2;
+
+ while (count-- > 0)
+ {
+ if (*s1++ != *s2++)
+ return s1[-1] < s2[-1] ? -1 : 1;
+ }
+ return 0;
+}
--- /dev/null
+/* Public domain. */
+#include <stddef.h>
+
+void *
+memcpy (void *dest, const void *src, size_t len)
+{
+ char *d = dest;
+ const char *s = src;
+ while (len--)
+ *d++ = *s++;
+ return dest;
+}
--- /dev/null
+/* Public domain. */
+#include <stddef.h>
+
+void *
+memmove (void *dest, const void *src, size_t len)
+{
+ char *d = dest;
+ const char *s = src;
+ if (d < s)
+ while (len--)
+ *d++ = *s++;
+ else
+ {
+ char *lasts = s + (len-1);
+ char *lastd = d + (len-1);
+ while (len--)
+ *lastd-- = *lasts--;
+ }
+ return dest;
+}
--- /dev/null
+/* Public domain. */
+#include <stddef.h>
+
+void *
+memset (void *dest, int val, size_t len)
+{
+ unsigned char *ptr = dest;
+ while (len-- > 0)
+ *ptr++ = val;
+ return dest;
+}
#define DONT_ACCESS_GBLS_AFTER_EPILOGUE (TARGET_ABICALLS && !TARGET_OLDABI)
\f
-/* Generate calls to memcpy, etc., not bcopy, etc. */
-#define TARGET_MEM_FUNCTIONS
-
#ifndef __mips16
/* Since the bits of the _init and _fini function is spread across
many object files, each potentially with its own GP, we must assume
mmix_initialize_trampoline (ADDR, FNADDR, STATIC_CHAIN)
-/* Node: Library Calls */
-
-#define TARGET_MEM_FUNCTIONS
-
-
/* Node: Addressing Modes */
#define CONSTANT_ADDRESS_P(X) \
#undef TARGET_HAS_F_SETLKW
#define TARGET_HAS_F_SETLKW
-/* Implicit library calls should use memcpy, not bcopy, etc. */
-
-#undef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS 1
-
/* Handle #pragma weak and #pragma pack. */
#define HANDLE_SYSV_PRAGMA 1
\f
/* Runtime target specification. */
-/* Implicit calls to library routines. */
-
-/* Use memcpy and memset instead of bcopy and bzero. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
-
/* Miscellaneous parameters. */
/* Controlling debugging info: dbx options. */
when given unaligned data. */
#define STRICT_ALIGNMENT 1
-/* Generate calls to memcpy, memcmp and memset. */
-#define TARGET_MEM_FUNCTIONS
-
/* Value is 1 if it is a good idea to tie two pseudo registers
when one has mode MODE1 and one has mode MODE2.
If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
TARGET_LIBGCC2_CFLAGS = -O2 -mfloat32
-LIB2FUNCS_EXTRA = $(srcdir)/config/udivmod.c $(srcdir)/config/udivmodsi4.c
+LIB2FUNCS_EXTRA = $(srcdir)/config/udivmod.c $(srcdir)/config/udivmodsi4.c \
+ $(srcdir)/config/memcmp.c $(srcdir)/config/memcpy.c \
+ $(srcdir)/config/memmove.c $(srcdir)/config/memset.c
# floating point emulation libraries
FPBIT = fp-bit.c
the end of the line. */
#define ASM_COMMENT_START " #"
-/* Implicit library calls should use memcpy, not bcopy, etc. */
-
-#define TARGET_MEM_FUNCTIONS
-
/* Flag to say the TOC is initialized */
extern int toc_initialized;
/* The system headers under RTEMS are C++-aware. */
#define NO_IMPLICIT_EXTERN_C
-/* Generate calls to memcpy, memcmp and memset. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
-
/*
* Dummy start/end specification to let linker work as
* needed by autoconf scripts using this compiler.
s390_trampoline_template (FILE)
-/* Library calls. */
-
-/* We should use memcpy, not bcopy. */
-#define TARGET_MEM_FUNCTIONS
-
-
/* Addressing modes, and classification of registers for them. */
/* Recognize any constant value that is a valid address. */
extern enum mdep_reorg_phase_e mdep_reorg_phase;
-/* Generate calls to memcpy, memcmp and memset. */
-
-#define TARGET_MEM_FUNCTIONS
-
/* Handle Renesas compiler's pragmas. */
#define REGISTER_TARGET_PRAGMAS() do { \
c_register_pragma (0, "interrupt", sh_pr_interrupt); \
/* Specify the machine mode used for addresses. */
#define Pmode (TARGET_ARCH64 ? DImode : SImode)
-/* Generate calls to memcpy, memcmp and memset. */
-#define TARGET_MEM_FUNCTIONS
-
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
return the mode to be used for the comparison. For floating-point,
CCFP[E]mode is used. CC_NOOVmode should be used when the first operand
xstormy16_initialize_trampoline (ADDR, FNADDR, STATIC_CHAIN)
\f
-/* Implicit Calls to Library Routines */
-
-#define TARGET_MEM_FUNCTIONS
-
/* Define this macro to override the type used by the library routines to pick
up arguments of type `float'. (By default, they use a union of `float' and
`int'.)
#define NO_DOLLAR_IN_LABEL
-/* Implicit library calls should use memcpy, not bcopy, etc. */
-
-#define TARGET_MEM_FUNCTIONS
-
/* System V Release 3 uses COFF debugging info. */
#define SDB_DEBUGGING_INFO 1
--- /dev/null
+LIB2FUNCS_EXTRA = \
+ $(srcdir)/config/memcmp.c $(srcdir)/config/memcpy.c \
+ $(srcdir)/config/memmove.c $(srcdir)/config/memset.c
Do not use the standard system libraries when linking.
Only the libraries you specify will be passed to the linker.
The standard startup files are used normally, unless @option{-nostartfiles}
-is used. The compiler may generate calls to memcmp, memset, and memcpy
-for System V (and ISO C) environments or to bcopy and bzero for
-BSD environments. These entries are usually resolved by entries in
+is used. The compiler may generate calls to @code{memcmp},
+@code{memset}, @code{memcpy} and @code{memmove}.
+These entries are usually resolved by entries in
libc. These entry points should be supplied through some other
mechanism when this option is specified.
@opindex nostdlib
Do not use the standard system startup files or libraries when linking.
No startup files and only the libraries you specify will be passed to
-the linker. The compiler may generate calls to memcmp, memset, and memcpy
-for System V (and ISO C) environments or to bcopy and bzero for
-BSD environments. These entries are usually resolved by entries in
+the linker. The compiler may generate calls to @code{memcmp}, @code{memset},
+@code{memcpy} and @code{memmove}.
+These entries are usually resolved by entries in
libc. These entry points should be supplied through some other
mechanism when this option is specified.
Most of the compiler support routines used by GCC are present in
@file{libgcc}, but there are a few exceptions. GCC requires the
freestanding environment provide @code{memcpy}, @code{memmove},
-@code{memset} and @code{memcmp}. Some older ports of GCC are
-configured to use the BSD @code{bcopy}, @code{bzero} and @code{bcmp}
-functions instead, but this is deprecated for new ports.
+@code{memset} and @code{memcmp}.
Finally, if @code{__builtin_trap} is used, and the target does
not implement the @code{trap} pattern, then GCC will emit a call
to @code{abort}.
macro, a reasonable default is used.
@end defmac
-@cindex @code{bcopy}, implicit usage
-@cindex @code{memcpy}, implicit usage
-@cindex @code{memmove}, implicit usage
-@cindex @code{bzero}, implicit usage
-@cindex @code{memset}, implicit usage
-@defmac TARGET_MEM_FUNCTIONS
-Define this macro if GCC should generate calls to the ISO C
-(and System V) library functions @code{memcpy}, @code{memmove} and
-@code{memset} rather than the BSD functions @code{bcopy} and @code{bzero}.
-@end defmac
-
@cindex C99 math functions, implicit usage
@defmac TARGET_C99_FUNCTIONS
When this macro is nonzero, GCC will implicitly optimize @code{sin} calls into
#endif
#endif
-/* Convert defined/undefined to boolean. */
-#ifdef TARGET_MEM_FUNCTIONS
-#undef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS 1
-#else
-#define TARGET_MEM_FUNCTIONS 0
-#endif
-
/* If this is nonzero, we do not bother generating VOLATILE
around volatile memory references, and we are willing to
return false;
}
-/* A subroutine of emit_block_move. Expand a call to memcpy or bcopy.
+/* A subroutine of emit_block_move. Expand a call to memcpy.
Return the return value from memcpy, 0 otherwise. */
static rtx
dst_tree = make_tree (ptr_type_node, dst_addr);
src_tree = make_tree (ptr_type_node, src_addr);
- if (TARGET_MEM_FUNCTIONS)
- size_mode = TYPE_MODE (sizetype);
- else
- size_mode = TYPE_MODE (unsigned_type_node);
+ size_mode = TYPE_MODE (sizetype);
size = convert_to_mode (size_mode, size, 1);
size = copy_to_mode_reg (size_mode, size);
memcpy in this context. This could be a user call to memcpy and
the user may wish to examine the return value from memcpy. For
targets where libcalls and normal calls have different conventions
- for returning pointers, we could end up generating incorrect code.
+ for returning pointers, we could end up generating incorrect code. */
- For convenience, we generate the call to bcopy this way as well. */
-
- if (TARGET_MEM_FUNCTIONS)
- size_tree = make_tree (sizetype, size);
- else
- size_tree = make_tree (unsigned_type_node, size);
+ size_tree = make_tree (sizetype, size);
fn = emit_block_move_libcall_fn (true);
arg_list = tree_cons (NULL_TREE, size_tree, NULL_TREE);
- if (TARGET_MEM_FUNCTIONS)
- {
- arg_list = tree_cons (NULL_TREE, src_tree, arg_list);
- arg_list = tree_cons (NULL_TREE, dst_tree, arg_list);
- }
- else
- {
- arg_list = tree_cons (NULL_TREE, dst_tree, arg_list);
- arg_list = tree_cons (NULL_TREE, src_tree, arg_list);
- }
+ arg_list = tree_cons (NULL_TREE, src_tree, arg_list);
+ arg_list = tree_cons (NULL_TREE, dst_tree, arg_list);
/* Now we have to build up the CALL_EXPR itself. */
call_expr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn);
gen_rtx_CLOBBER (VOIDmode, dst),
NULL_RTX));
- return TARGET_MEM_FUNCTIONS ? retval : NULL_RTX;
+ return retval;
}
/* A subroutine of emit_block_move_via_libcall. Create the tree node
{
tree args, fn;
- if (TARGET_MEM_FUNCTIONS)
- {
- fn = get_identifier ("memcpy");
- args = build_function_type_list (ptr_type_node, ptr_type_node,
- const_ptr_type_node, sizetype,
- NULL_TREE);
- }
- else
- {
- fn = get_identifier ("bcopy");
- args = build_function_type_list (void_type_node, const_ptr_type_node,
- ptr_type_node, unsigned_type_node,
- NULL_TREE);
- }
+ fn = get_identifier ("memcpy");
+ args = build_function_type_list (ptr_type_node, ptr_type_node,
+ const_ptr_type_node, sizetype,
+ NULL_TREE);
fn = build_decl (FUNCTION_DECL, fn, args);
DECL_EXTERNAL (fn) = 1;
return false;
}
-/* A subroutine of clear_storage. Expand a call to memset or bzero.
+/* A subroutine of clear_storage. Expand a call to memset.
Return the return value of memset, 0 otherwise. */
static rtx
object = copy_to_mode_reg (Pmode, XEXP (object, 0));
- if (TARGET_MEM_FUNCTIONS)
- size_mode = TYPE_MODE (sizetype);
- else
- size_mode = TYPE_MODE (unsigned_type_node);
+ size_mode = TYPE_MODE (sizetype);
size = convert_to_mode (size_mode, size, 1);
size = copy_to_mode_reg (size_mode, size);
memset in this context. This could be a user call to memset and
the user may wish to examine the return value from memset. For
targets where libcalls and normal calls have different conventions
- for returning pointers, we could end up generating incorrect code.
-
- For convenience, we generate the call to bzero this way as well. */
+ for returning pointers, we could end up generating incorrect code. */
object_tree = make_tree (ptr_type_node, object);
- if (TARGET_MEM_FUNCTIONS)
- size_tree = make_tree (sizetype, size);
- else
- size_tree = make_tree (unsigned_type_node, size);
+ size_tree = make_tree (sizetype, size);
fn = clear_storage_libcall_fn (true);
arg_list = tree_cons (NULL_TREE, size_tree, NULL_TREE);
- if (TARGET_MEM_FUNCTIONS)
- arg_list = tree_cons (NULL_TREE, integer_zero_node, arg_list);
+ arg_list = tree_cons (NULL_TREE, integer_zero_node, arg_list);
arg_list = tree_cons (NULL_TREE, object_tree, arg_list);
/* Now we have to build up the CALL_EXPR itself. */
if (RTX_UNCHANGING_P (object))
emit_insn (gen_rtx_CLOBBER (VOIDmode, object));
- return (TARGET_MEM_FUNCTIONS ? retval : NULL_RTX);
+ return retval;
}
/* A subroutine of clear_storage_via_libcall. Create the tree node
{
tree fn, args;
- if (TARGET_MEM_FUNCTIONS)
- {
- fn = get_identifier ("memset");
- args = build_function_type_list (ptr_type_node, ptr_type_node,
- integer_type_node, sizetype,
- NULL_TREE);
- }
- else
- {
- fn = get_identifier ("bzero");
- args = build_function_type_list (void_type_node, ptr_type_node,
- unsigned_type_node, NULL_TREE);
- }
+ fn = get_identifier ("memset");
+ args = build_function_type_list (ptr_type_node, ptr_type_node,
+ integer_type_node, sizetype,
+ NULL_TREE);
fn = build_decl (FUNCTION_DECL, fn, args);
DECL_EXTERNAL (fn) = 1;
size = expr_size (from);
from_rtx = expand_expr (from, NULL_RTX, VOIDmode, 0);
- if (TARGET_MEM_FUNCTIONS)
- emit_library_call (memmove_libfunc, LCT_NORMAL,
- VOIDmode, 3, XEXP (to_rtx, 0), Pmode,
- XEXP (from_rtx, 0), Pmode,
- convert_to_mode (TYPE_MODE (sizetype),
- size, TYPE_UNSIGNED (sizetype)),
- TYPE_MODE (sizetype));
- else
- emit_library_call (bcopy_libfunc, LCT_NORMAL,
- VOIDmode, 3, XEXP (from_rtx, 0), Pmode,
- XEXP (to_rtx, 0), Pmode,
- convert_to_mode (TYPE_MODE (integer_type_node),
- size,
- TYPE_UNSIGNED (integer_type_node)),
- TYPE_MODE (integer_type_node));
+ emit_library_call (memmove_libfunc, LCT_NORMAL,
+ VOIDmode, 3, XEXP (to_rtx, 0), Pmode,
+ XEXP (from_rtx, 0), Pmode,
+ convert_to_mode (TYPE_MODE (sizetype),
+ size, TYPE_UNSIGNED (sizetype)),
+ TYPE_MODE (sizetype));
preserve_temp_slots (to_rtx);
free_temp_slots ();
and then "or" in whatever non-constant ranges we need in addition.
If a large set is all zero or all ones, it is
- probably better to set it using memset (if available) or bzero.
+ probably better to set it using memset.
Also, if a large set has just a single range, it may also be
better to first clear all the first clear the set (using
- bzero/memset), and set the bits we want. */
+ memset), and set the bits we want. */
/* Check for all zeros. */
if (elt == NULL_TREE && size > 0)
/* Optimization: If startbit and endbit are constants divisible
by BITS_PER_UNIT, call memset instead. */
- if (TARGET_MEM_FUNCTIONS
- && TREE_CODE (startbit) == INTEGER_CST
+ if (TREE_CODE (startbit) == INTEGER_CST
&& TREE_CODE (endbit) == INTEGER_CST
&& (startb = TREE_INT_CST_LOW (startbit)) % BITS_PER_UNIT == 0
&& (endb = TREE_INT_CST_LOW (endbit) + 1) % BITS_PER_UNIT == 0)
LTI_abort,
LTI_memcpy,
LTI_memmove,
- LTI_bcopy,
LTI_memcmp,
- LTI_bcmp,
LTI_memset,
- LTI_bzero,
LTI_setbits,
LTI_unwind_resume,
#define abort_libfunc (libfunc_table[LTI_abort])
#define memcpy_libfunc (libfunc_table[LTI_memcpy])
#define memmove_libfunc (libfunc_table[LTI_memmove])
-#define bcopy_libfunc (libfunc_table[LTI_bcopy])
#define memcmp_libfunc (libfunc_table[LTI_memcmp])
-#define bcmp_libfunc (libfunc_table[LTI_bcmp])
#define memset_libfunc (libfunc_table[LTI_memset])
-#define bzero_libfunc (libfunc_table[LTI_bzero])
#define setbits_libfunc (libfunc_table[LTI_setbits])
#define unwind_resume_libfunc (libfunc_table[LTI_unwind_resume])
return;
}
- /* Otherwise call a library function, memcmp if we've got it,
- bcmp otherwise. */
-#ifdef TARGET_MEM_FUNCTIONS
+ /* Otherwise call a library function, memcmp. */
libfunc = memcmp_libfunc;
length_type = sizetype;
-#else
- libfunc = bcmp_libfunc;
- length_type = integer_type_node;
-#endif
result_mode = TYPE_MODE (integer_type_node);
cmp_mode = TYPE_MODE (length_type);
size = convert_to_mode (TYPE_MODE (length_type), size,
abort_libfunc = init_one_libfunc ("abort");
memcpy_libfunc = init_one_libfunc ("memcpy");
memmove_libfunc = init_one_libfunc ("memmove");
- bcopy_libfunc = init_one_libfunc ("bcopy");
memcmp_libfunc = init_one_libfunc ("memcmp");
- bcmp_libfunc = init_one_libfunc ("__gcc_bcmp");
memset_libfunc = init_one_libfunc ("memset");
- bzero_libfunc = init_one_libfunc ("bzero");
setbits_libfunc = init_one_libfunc ("__setbits");
unwind_resume_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
DBX_OUTPUT_STANDARD_TYPES BUILTIN_SETJMP_FRAME_VALUE \
SUNOS4_SHARED_LIBRARIES PROMOTE_FOR_CALL_ONLY \
SPACE_AFTER_L_OPTION NO_RECURSIVE_FUNCTION_CSE \
- DEFAULT_MAIN_RETURN
+ DEFAULT_MAIN_RETURN TARGET_MEM_FUNCTIONS
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \