summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-05 19:49:20 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-05 19:49:20 +0000
commitf896c93243e0d8383f9902d3d71d1007b28200e0 (patch)
tree8e0aa0cf5c8ffabad8a0bb6237050ce3904720e0 /gcc/config
parent5e267248851286a5ad04ba8f9db713f0a5267714 (diff)
downloadgcc-f896c93243e0d8383f9902d3d71d1007b28200e0.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84130 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/alpha/alpha.h3
-rw-r--r--gcc/config/arc/arc.h5
-rw-r--r--gcc/config/arm/arm.h3
-rw-r--r--gcc/config/avr/avr.h2
-rw-r--r--gcc/config/c4x/c4x.h4
-rw-r--r--gcc/config/cris/aout.h5
-rw-r--r--gcc/config/elfos.h4
-rw-r--r--gcc/config/gnu.h4
-rw-r--r--gcc/config/h8300/h8300.h6
-rw-r--r--gcc/config/i386/gas.h4
-rw-r--r--gcc/config/ia64/ia64.h9
-rw-r--r--gcc/config/interix.h4
-rw-r--r--gcc/config/ip2k/ip2k.h2
-rw-r--r--gcc/config/lynx-ng.h4
-rw-r--r--gcc/config/m32r/m32r.c8
-rw-r--r--gcc/config/m32r/m32r.h5
-rw-r--r--gcc/config/mcore/mcore.h3
-rw-r--r--gcc/config/memcmp.c16
-rw-r--r--gcc/config/memcpy.c12
-rw-r--r--gcc/config/memmove.c20
-rw-r--r--gcc/config/memset.c11
-rw-r--r--gcc/config/mips/mips.h3
-rw-r--r--gcc/config/mmix/mmix.h5
-rw-r--r--gcc/config/netbsd.h5
-rw-r--r--gcc/config/openbsd.h7
-rw-r--r--gcc/config/pa/pa.h3
-rw-r--r--gcc/config/pdp11/t-pdp114
-rw-r--r--gcc/config/rs6000/rs6000.h4
-rw-r--r--gcc/config/rtems.h5
-rw-r--r--gcc/config/s390/s390.h6
-rw-r--r--gcc/config/sh/sh.h4
-rw-r--r--gcc/config/sparc/sparc.h3
-rw-r--r--gcc/config/stormy16/stormy16.h4
-rw-r--r--gcc/config/svr3.h4
-rw-r--r--gcc/config/vax/t-memfuncs3
35 files changed, 65 insertions, 129 deletions
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 8cc22caf1b4..8e03fd75310 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -1835,6 +1835,3 @@ do { \
/* 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
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index f25e5d369d3..1ee15192711 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -802,11 +802,6 @@ do { \
emit_insn (gen_flush_icache (validize_mem (gen_rtx_MEM (SImode, TRAMP)))); \
} while (0)
-/* Library calls. */
-
-/* Generate calls to memcpy, memcmp and memset. */
-#define TARGET_MEM_FUNCTIONS
-
/* Addressing modes, and classification of registers for them. */
/* Maximum number of registers that can appear in a valid memory address. */
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 4b4ddedf483..3067153131f 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -536,9 +536,6 @@ extern int arm_is_6_or_7;
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
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index c9beb30410f..da06c207604 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -803,8 +803,6 @@ extern int avr_case_values_threshold;
#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}"
diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h
index 3079c0a66c6..cff2548df77 100644
--- a/gcc/config/c4x/c4x.h
+++ b/gcc/config/c4x/c4x.h
@@ -1193,10 +1193,6 @@ CUMULATIVE_ARGS;
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. */
diff --git a/gcc/config/cris/aout.h b/gcc/config/cris/aout.h
index e77c73ce432..9a409cf8a42 100644
--- a/gcc/config/cris/aout.h
+++ b/gcc/config/cris/aout.h
@@ -139,11 +139,6 @@ Boston, MA 02111-1307, USA. */
#define MAX_OFILE_ALIGNMENT 16
-/* Node: Library Calls */
-
-#define TARGET_MEM_FUNCTIONS
-
-
/* Node: Data Output */
#define ESCAPES \
diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h
index 6a138f9f76f..743ae71ab6d 100644
--- a/gcc/config/elfos.h
+++ b/gcc/config/elfos.h
@@ -58,10 +58,6 @@ Boston, MA 02111-1307, USA. */
#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
diff --git a/gcc/config/gnu.h b/gcc/config/gnu.h
index 23a8a730ec9..79c64c77ba9 100644
--- a/gcc/config/gnu.h
+++ b/gcc/config/gnu.h
@@ -12,10 +12,6 @@
#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
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index eeafd84a24e..fcb082372a1 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -1138,12 +1138,6 @@ struct cum_arg
#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. */
diff --git a/gcc/config/i386/gas.h b/gcc/config/i386/gas.h
index 78195b97a85..9f002431018 100644
--- a/gcc/config/i386/gas.h
+++ b/gcc/config/i386/gas.h
@@ -49,10 +49,6 @@ Boston, MA 02111-1307, USA. */
#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
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index a26a1da4b87..930266c6f85 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -1556,15 +1556,6 @@ do { \
#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \
ia64_initialize_trampoline((ADDR), (FNADDR), (STATIC_CHAIN))
-/* 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
-
-
/* Addressing Modes */
/* Define this macro if the machine supports post-increment addressing. */
diff --git a/gcc/config/interix.h b/gcc/config/interix.h
index 9d05f1bcc0a..9db2d84af98 100644
--- a/gcc/config/interix.h
+++ b/gcc/config/interix.h
@@ -22,10 +22,6 @@ along with GCC; see the file COPYING. If not, write to
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 */
diff --git a/gcc/config/ip2k/ip2k.h b/gcc/config/ip2k/ip2k.h
index d78ae7779b1..c24c49370f5 100644
--- a/gcc/config/ip2k/ip2k.h
+++ b/gcc/config/ip2k/ip2k.h
@@ -808,8 +808,6 @@ extern int ip2k_reorg_merge_qimode;
#define FUNCTION_PROFILER(FILE, LABELNO) \
fprintf ((FILE), "/* profiler %d */", (LABELNO))
-#define TARGET_MEM_FUNCTIONS
-
#undef ENDFILE_SPEC
#undef LINK_SPEC
#undef STARTFILE_SPEC
diff --git a/gcc/config/lynx-ng.h b/gcc/config/lynx-ng.h
index c23ad39a77f..a1fe786b463 100644
--- a/gcc/config/lynx-ng.h
+++ b/gcc/config/lynx-ng.h
@@ -64,10 +64,6 @@ Boston, MA 02111-1307, USA. */
#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
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index 5adc498c52f..9de4eb34d28 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -2601,19 +2601,11 @@ block_move_call (rtx dest_reg, rtx src_reg, rtx bytes_rtx)
&& 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.
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index c20b0424bb0..14f266c0949 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -1260,11 +1260,6 @@ L2: .word STATIC
} \
while (0)
-/* Library calls. */
-
-/* Generate calls to memcpy, memcmp and memset. */
-#define TARGET_MEM_FUNCTIONS
-
#define RETURN_ADDR_RTX(COUNT, FRAME) m32r_return_addr (COUNT)
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, RETURN_ADDR_REGNUM)
diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index ccae6d945dd..b6e5d87a42a 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -953,9 +953,6 @@ extern const enum reg_class reg_class_from_letter[];
#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//"
diff --git a/gcc/config/memcmp.c b/gcc/config/memcmp.c
new file mode 100644
index 00000000000..2348afe1d27
--- /dev/null
+++ b/gcc/config/memcmp.c
@@ -0,0 +1,16 @@
+/* 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;
+}
diff --git a/gcc/config/memcpy.c b/gcc/config/memcpy.c
new file mode 100644
index 00000000000..58b1e405627
--- /dev/null
+++ b/gcc/config/memcpy.c
@@ -0,0 +1,12 @@
+/* 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;
+}
diff --git a/gcc/config/memmove.c b/gcc/config/memmove.c
new file mode 100644
index 00000000000..13b340af6a0
--- /dev/null
+++ b/gcc/config/memmove.c
@@ -0,0 +1,20 @@
+/* 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;
+}
diff --git a/gcc/config/memset.c b/gcc/config/memset.c
new file mode 100644
index 00000000000..3e7025ee394
--- /dev/null
+++ b/gcc/config/memset.c
@@ -0,0 +1,11 @@
+/* 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;
+}
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 1722041c542..77ea0e0e32e 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -3363,9 +3363,6 @@ while (0)
#define DONT_ACCESS_GBLS_AFTER_EPILOGUE (TARGET_ABICALLS && !TARGET_OLDABI)
-/* 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
diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h
index 01090b7771a..8e5432bb211 100644
--- a/gcc/config/mmix/mmix.h
+++ b/gcc/config/mmix/mmix.h
@@ -806,11 +806,6 @@ typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
mmix_initialize_trampoline (ADDR, FNADDR, STATIC_CHAIN)
-/* Node: Library Calls */
-
-#define TARGET_MEM_FUNCTIONS
-
-
/* Node: Addressing Modes */
#define CONSTANT_ADDRESS_P(X) \
diff --git a/gcc/config/netbsd.h b/gcc/config/netbsd.h
index e3eb0d1ffa8..40adf1a381d 100644
--- a/gcc/config/netbsd.h
+++ b/gcc/config/netbsd.h
@@ -159,11 +159,6 @@ Boston, MA 02111-1307, USA. */
#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
diff --git a/gcc/config/openbsd.h b/gcc/config/openbsd.h
index 670a0a08aa1..b472182718f 100644
--- a/gcc/config/openbsd.h
+++ b/gcc/config/openbsd.h
@@ -130,13 +130,6 @@ Boston, MA 02111-1307, USA. */
/* 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. */
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 1b6a2c8f2f0..fec6f2cf0ca 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -500,9 +500,6 @@ do { \
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,
diff --git a/gcc/config/pdp11/t-pdp11 b/gcc/config/pdp11/t-pdp11
index 0231a7b38d6..c0a23c2ec45 100644
--- a/gcc/config/pdp11/t-pdp11
+++ b/gcc/config/pdp11/t-pdp11
@@ -1,5 +1,7 @@
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
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 00aad36832d..17df6c082eb 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -2217,10 +2217,6 @@ extern int rs6000_compare_fp_p;
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;
diff --git a/gcc/config/rtems.h b/gcc/config/rtems.h
index 2656ff78b3a..301154325fb 100644
--- a/gcc/config/rtems.h
+++ b/gcc/config/rtems.h
@@ -21,11 +21,6 @@ Boston, MA 02111-1307, USA. */
/* 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.
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 30202e4b5b3..85168b4d99a 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -722,12 +722,6 @@ CUMULATIVE_ARGS;
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. */
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 0d6d1c6570c..c9f411ae72f 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -3232,10 +3232,6 @@ enum mdep_reorg_phase_e
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); \
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 595a0f5fa88..030d3ab7863 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -2207,9 +2207,6 @@ do { \
/* 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
diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h
index 051914b31d2..b2472bc841f 100644
--- a/gcc/config/stormy16/stormy16.h
+++ b/gcc/config/stormy16/stormy16.h
@@ -497,10 +497,6 @@ enum reg_class
xstormy16_initialize_trampoline (ADDR, FNADDR, STATIC_CHAIN)
-/* 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'.)
diff --git a/gcc/config/svr3.h b/gcc/config/svr3.h
index 21595eac273..b544abba91a 100644
--- a/gcc/config/svr3.h
+++ b/gcc/config/svr3.h
@@ -70,10 +70,6 @@ Boston, MA 02111-1307, USA. */
#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
diff --git a/gcc/config/vax/t-memfuncs b/gcc/config/vax/t-memfuncs
new file mode 100644
index 00000000000..6a8da6146b5
--- /dev/null
+++ b/gcc/config/vax/t-memfuncs
@@ -0,0 +1,3 @@
+LIB2FUNCS_EXTRA = \
+ $(srcdir)/config/memcmp.c $(srcdir)/config/memcpy.c \
+ $(srcdir)/config/memmove.c $(srcdir)/config/memset.c