diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2004-07-05 20:49:20 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-07-05 20:49:20 +0100 |
commit | 8f99553ff6cdc54e5af910042f93fbfbdaac0424 (patch) | |
tree | 8e0aa0cf5c8ffabad8a0bb6237050ce3904720e0 /gcc/config/memmove.c | |
parent | bd4c82502007c08b94a8a24d7d63c00c3a4868b9 (diff) | |
download | gcc-8f99553ff6cdc54e5af910042f93fbfbdaac0424.zip gcc-8f99553ff6cdc54e5af910042f93fbfbdaac0424.tar.gz gcc-8f99553ff6cdc54e5af910042f93fbfbdaac0424.tar.bz2 |
c-decl.c, [...]: Don't check TARGET_MEM_FUNCTIONS.
* 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.
From-SVN: r84130
Diffstat (limited to 'gcc/config/memmove.c')
-rw-r--r-- | gcc/config/memmove.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/config/memmove.c b/gcc/config/memmove.c new file mode 100644 index 0000000..13b340a --- /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; +} |