Commit 2e09e75a by Joseph Myers Committed by Joseph Myers

calls.c (expand_call, [...]): Use memcpy () instead of bcopy ().

	* calls.c (expand_call, emit_library_call_value_1), collect2.c
	(scan_prog_file), config/a29k/a29k.c (print_operand),
	config/sparc/sparc.c (order_regs_for_local_alloc): Use memcpy ()
	instead of bcopy ().
	* real.h: Use memcmp () instead of bcmp ().
	* config/m88k/m88k.c (m88k_layout_frame), config/sh/sh.c
	(split_branches), config/sparc/sparc.c (ultra_flush_pipeline,
	ultrasparc_sched_init, ultrasparc_sched_reorder),
	config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Use memset ()
	instead of bzero ().
	* config/vax/xm-xms.h (FILE_NAME_NONDIRECTORY): Use strrchr ()
	instead of rindex ().
	* configure.in: Don't check for bzero, bcmp, index or rindex.
	* configure, config.in: Regenerate.
	* system.h: Don't include declarations for bzero, bcmp, index or
	rindex.
	* config/i386/xm-beos.h, config/rs6000/xm-beos.h: Don't define
	bzero, bcmp, index or rindex.

java:
	* parse.y (create_new_parser_context): Use memset () instead of
	bzero ().

From-SVN: r37334
parent 03fb4780
2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
* calls.c (expand_call, emit_library_call_value_1), collect2.c
(scan_prog_file), config/a29k/a29k.c (print_operand),
config/sparc/sparc.c (order_regs_for_local_alloc): Use memcpy ()
instead of bcopy ().
* real.h: Use memcmp () instead of bcmp ().
* config/m88k/m88k.c (m88k_layout_frame), config/sh/sh.c
(split_branches), config/sparc/sparc.c (ultra_flush_pipeline,
ultrasparc_sched_init, ultrasparc_sched_reorder),
config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Use memset ()
instead of bzero ().
* config/vax/xm-xms.h (FILE_NAME_NONDIRECTORY): Use strrchr ()
instead of rindex ().
* configure.in: Don't check for bzero, bcmp, index or rindex.
* configure, config.in: Regenerate.
* system.h: Don't include declarations for bzero, bcmp, index or
rindex.
* config/i386/xm-beos.h, config/rs6000/xm-beos.h: Don't define
bzero, bcmp, index or rindex.
Wed Nov 8 21:58:20 2000 Christopher Faylor <cgf@cygnus.com> Wed Nov 8 21:58:20 2000 Christopher Faylor <cgf@cygnus.com>
* config/i386/cygwin.h: Add -no-win32 switch. Separate -mno-cygwin * config/i386/cygwin.h: Add -no-win32 switch. Separate -mno-cygwin
......
...@@ -2782,8 +2782,8 @@ expand_call (exp, target, ignore) ...@@ -2782,8 +2782,8 @@ expand_call (exp, target, ignore)
= (char *) alloca (highest_outgoing_arg_in_use); = (char *) alloca (highest_outgoing_arg_in_use);
if (initial_highest_arg_in_use) if (initial_highest_arg_in_use)
bcopy (initial_stack_usage_map, stack_usage_map, memcpy (stack_usage_map, initial_stack_usage_map,
initial_highest_arg_in_use); initial_highest_arg_in_use);
if (initial_highest_arg_in_use != highest_outgoing_arg_in_use) if (initial_highest_arg_in_use != highest_outgoing_arg_in_use)
memset (&stack_usage_map[initial_highest_arg_in_use], 0, memset (&stack_usage_map[initial_highest_arg_in_use], 0,
...@@ -3766,8 +3766,8 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) ...@@ -3766,8 +3766,8 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
stack_usage_map = (char *) alloca (highest_outgoing_arg_in_use); stack_usage_map = (char *) alloca (highest_outgoing_arg_in_use);
if (initial_highest_arg_in_use) if (initial_highest_arg_in_use)
bcopy (initial_stack_usage_map, stack_usage_map, memcpy (stack_usage_map, initial_stack_usage_map,
initial_highest_arg_in_use); initial_highest_arg_in_use);
if (initial_highest_arg_in_use != highest_outgoing_arg_in_use) if (initial_highest_arg_in_use != highest_outgoing_arg_in_use)
memset (&stack_usage_map[initial_highest_arg_in_use], 0, memset (&stack_usage_map[initial_highest_arg_in_use], 0,
......
...@@ -3057,7 +3057,7 @@ scan_prog_file (prog_name, which_pass) ...@@ -3057,7 +3057,7 @@ scan_prog_file (prog_name, which_pass)
if (rw) if (rw)
{ {
load_union_t *ptr = (load_union_t *) xmalloc (load_hdr->hdr.ldci_cmd_size); load_union_t *ptr = (load_union_t *) xmalloc (load_hdr->hdr.ldci_cmd_size);
bcopy ((char *)load_hdr, (char *)ptr, load_hdr->hdr.ldci_cmd_size); memcpy ((char *)ptr, (char *)load_hdr, load_hdr->hdr.ldci_cmd_size);
load_hdr = ptr; load_hdr = ptr;
/* null out old command map, because we will rewrite at the end. */ /* null out old command map, because we will rewrite at the end. */
......
...@@ -120,18 +120,12 @@ ...@@ -120,18 +120,12 @@
/* Define if you have the atoq function. */ /* Define if you have the atoq function. */
#undef HAVE_ATOQ #undef HAVE_ATOQ
/* Define if you have the bcmp function. */
#undef HAVE_BCMP
/* Define if you have the bcopy function. */ /* Define if you have the bcopy function. */
#undef HAVE_BCOPY #undef HAVE_BCOPY
/* Define if you have the bsearch function. */ /* Define if you have the bsearch function. */
#undef HAVE_BSEARCH #undef HAVE_BSEARCH
/* Define if you have the bzero function. */
#undef HAVE_BZERO
/* Define if you have the dcgettext function. */ /* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT #undef HAVE_DCGETTEXT
...@@ -159,9 +153,6 @@ ...@@ -159,9 +153,6 @@
/* Define if you have the iconv function. */ /* Define if you have the iconv function. */
#undef HAVE_ICONV #undef HAVE_ICONV
/* Define if you have the index function. */
#undef HAVE_INDEX
/* Define if you have the isascii function. */ /* Define if you have the isascii function. */
#undef HAVE_ISASCII #undef HAVE_ISASCII
...@@ -183,9 +174,6 @@ ...@@ -183,9 +174,6 @@
/* Define if you have the putenv function. */ /* Define if you have the putenv function. */
#undef HAVE_PUTENV #undef HAVE_PUTENV
/* Define if you have the rindex function. */
#undef HAVE_RINDEX
/* Define if you have the setenv function. */ /* Define if you have the setenv function. */
#undef HAVE_SETENV #undef HAVE_SETENV
...@@ -355,18 +343,6 @@ ...@@ -355,18 +343,6 @@
#undef HAVE_DECL_BCOPY #undef HAVE_DECL_BCOPY
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found this declaration otherwise define to 0. */
#undef HAVE_DECL_BZERO
/* Define to 1 if we found this declaration otherwise define to 0. */
#undef HAVE_DECL_BCMP
/* Define to 1 if we found this declaration otherwise define to 0. */
#undef HAVE_DECL_INDEX
/* Define to 1 if we found this declaration otherwise define to 0. */
#undef HAVE_DECL_RINDEX
/* Define to 1 if we found this declaration otherwise define to 0. */
#undef HAVE_DECL_GETENV #undef HAVE_DECL_GETENV
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found this declaration otherwise define to 0. */
......
...@@ -1122,7 +1122,7 @@ print_operand (file, x, code) ...@@ -1122,7 +1122,7 @@ print_operand (file, x, code)
{ {
union real_extract u; union real_extract u;
bcopy ((char *) &CONST_DOUBLE_LOW (x), (char *) &u, sizeof u); memcpy ((char *) &u, (char *) &CONST_DOUBLE_LOW (x), sizeof u);
fprintf (file, "$double1(%.20e)", u.d); fprintf (file, "$double1(%.20e)", u.d);
} }
else if (GET_CODE (x) == REG) else if (GET_CODE (x) == REG)
...@@ -1186,8 +1186,8 @@ print_operand (file, x, code) ...@@ -1186,8 +1186,8 @@ print_operand (file, x, code)
fprintf (file, "$float"); fprintf (file, "$float");
else else
fprintf (file, "$double%d", SUBREG_WORD (XEXP (x, 0))); fprintf (file, "$double%d", SUBREG_WORD (XEXP (x, 0)));
bcopy ((char *) &CONST_DOUBLE_LOW (SUBREG_REG (XEXP (x, 0))), memcpy ((char *) &u,
(char *) &u, sizeof u); (char *) &CONST_DOUBLE_LOW (SUBREG_REG (XEXP (x, 0))), sizeof u);
fprintf (file, "(%.20e)", u.d); fprintf (file, "(%.20e)", u.d);
} }
...@@ -1196,7 +1196,7 @@ print_operand (file, x, code) ...@@ -1196,7 +1196,7 @@ print_operand (file, x, code)
{ {
union real_extract u; union real_extract u;
bcopy ((char *) &CONST_DOUBLE_LOW (x), (char *) &u, sizeof u); memcpy ((char *) &u, (char *) &CONST_DOUBLE_LOW (x), sizeof u);
fprintf (file, "$%s(%.20e)", fprintf (file, "$%s(%.20e)",
GET_MODE (x) == SFmode ? "float" : "double0", u.d); GET_MODE (x) == SFmode ? "float" : "double0", u.d);
} }
......
...@@ -38,14 +38,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -38,14 +38,6 @@ Boston, MA 02111-1307, USA. */
#undef bcopy #undef bcopy
#define bcopy(s,d,n) memmove((d),(s),(n)) #define bcopy(s,d,n) memmove((d),(s),(n))
#undef bzero
#define bzero(d,n) memset((d),0,(n))
#undef bcmp
#define bcmp(l,r,n) memcmp((l),(r),(n))
#undef index
#define index strchr
#undef rindex
#define rindex strrchr
/* BeOS is closer to USG than BSD */ /* BeOS is closer to USG than BSD */
......
...@@ -1786,7 +1786,7 @@ m88k_layout_frame () ...@@ -1786,7 +1786,7 @@ m88k_layout_frame ()
frame_laid_out++; frame_laid_out++;
bzero ((char *) &save_regs[0], sizeof (save_regs)); memset ((char *) &save_regs[0], 0, sizeof (save_regs));
sp_size = nregs = nxregs = 0; sp_size = nregs = nxregs = 0;
frame_size = get_frame_size (); frame_size = get_frame_size ();
......
...@@ -57,14 +57,6 @@ extern void *alloca (); ...@@ -57,14 +57,6 @@ extern void *alloca ();
#undef bcopy #undef bcopy
#define bcopy(s,d,n) memmove((d),(s),(n)) #define bcopy(s,d,n) memmove((d),(s),(n))
#undef bzero
#define bzero(d,n) memset((d),0,(n))
#undef bcmp
#define bcmp(l,r,n) memcmp((l),(r),(n))
#undef index
#define index strchr
#undef rindex
#define rindex strrchr
/* BeOS is closer to USG than BSD */ /* BeOS is closer to USG than BSD */
......
...@@ -3381,7 +3381,7 @@ split_branches (first) ...@@ -3381,7 +3381,7 @@ split_branches (first)
shorten_branches (first); shorten_branches (first);
uid_branch = (struct far_branch **) alloca (max_uid * sizeof *uid_branch); uid_branch = (struct far_branch **) alloca (max_uid * sizeof *uid_branch);
bzero ((char *) uid_branch, max_uid * sizeof *uid_branch); memset ((char *) uid_branch, 0, max_uid * sizeof *uid_branch);
for (insn = first; insn; insn = NEXT_INSN (insn)) for (insn = first; insn; insn = NEXT_INSN (insn))
if (! INSN_P (insn)) if (! INSN_P (insn))
......
...@@ -5440,8 +5440,9 @@ order_regs_for_local_alloc () ...@@ -5440,8 +5440,9 @@ order_regs_for_local_alloc ()
if (regs_ever_live[15] != last_order_nonleaf) if (regs_ever_live[15] != last_order_nonleaf)
{ {
last_order_nonleaf = !last_order_nonleaf; last_order_nonleaf = !last_order_nonleaf;
bcopy ((char *) reg_alloc_orders[last_order_nonleaf], memcpy ((char *) reg_alloc_order,
(char *) reg_alloc_order, FIRST_PSEUDO_REGISTER * sizeof (int)); (char *) reg_alloc_orders[last_order_nonleaf],
FIRST_PSEUDO_REGISTER * sizeof (int));
} }
} }
...@@ -7553,7 +7554,7 @@ ultra_flush_pipeline () ...@@ -7553,7 +7554,7 @@ ultra_flush_pipeline ()
{ {
ultra_cur_hist = (ultra_cur_hist + 1) & (ULTRA_NUM_HIST - 1); ultra_cur_hist = (ultra_cur_hist + 1) & (ULTRA_NUM_HIST - 1);
ultra_cycles_elapsed += 1; ultra_cycles_elapsed += 1;
bzero ((char *) &ultra_pipe, sizeof ultra_pipe); memset ((char *) &ultra_pipe, 0, sizeof ultra_pipe);
ultra_pipe.free_slot_mask = 0xf; ultra_pipe.free_slot_mask = 0xf;
} }
...@@ -7563,7 +7564,7 @@ ultrasparc_sched_init (dump, sched_verbose) ...@@ -7563,7 +7564,7 @@ ultrasparc_sched_init (dump, sched_verbose)
FILE *dump ATTRIBUTE_UNUSED; FILE *dump ATTRIBUTE_UNUSED;
int sched_verbose ATTRIBUTE_UNUSED; int sched_verbose ATTRIBUTE_UNUSED;
{ {
bzero ((char *) ultra_pipe_hist, sizeof ultra_pipe_hist); memset ((char *) ultra_pipe_hist, 0, sizeof ultra_pipe_hist);
ultra_cur_hist = 0; ultra_cur_hist = 0;
ultra_cycles_elapsed = 0; ultra_cycles_elapsed = 0;
ultra_pipe.free_slot_mask = 0xf; ultra_pipe.free_slot_mask = 0xf;
...@@ -7899,7 +7900,7 @@ ultrasparc_sched_reorder (dump, sched_verbose, ready, n_ready) ...@@ -7899,7 +7900,7 @@ ultrasparc_sched_reorder (dump, sched_verbose, ready, n_ready)
} }
else else
{ {
bzero ((char *) &ultra_pipe, sizeof ultra_pipe); memset ((char *) &ultra_pipe, 0, sizeof ultra_pipe);
ultra_pipe.free_slot_mask = 0xf; ultra_pipe.free_slot_mask = 0xf;
} }
} }
......
...@@ -1118,7 +1118,7 @@ do \ ...@@ -1118,7 +1118,7 @@ do \
fixed_regs[31] = 1; \ fixed_regs[31] = 1; \
reg_names[FRAME_POINTER_REGNUM] = "%i7"; \ reg_names[FRAME_POINTER_REGNUM] = "%i7"; \
/* Disable leaf functions */ \ /* Disable leaf functions */ \
bzero (sparc_leaf_regs, FIRST_PSEUDO_REGISTER); \ memset (sparc_leaf_regs, 0, FIRST_PSEUDO_REGISTER); \
} \ } \
if (profile_block_flag) \ if (profile_block_flag) \
{ \ { \
......
...@@ -98,9 +98,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -98,9 +98,9 @@ Boston, MA 02111-1307, USA. */
pnt1_ = pnt_ - 1; \ pnt1_ = pnt_ - 1; \
while (*++pnt1_) \ while (*++pnt1_) \
if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20; \ if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20; \
pnt1_ = rindex (pnt_, ']'); \ pnt1_ = strrchr (pnt_, ']'); \
pnt1_ = (pnt1_ == 0 ? rindex (pnt_, '>') : pnt1_); \ pnt1_ = (pnt1_ == 0 ? strrchr (pnt_, '>') : pnt1_); \
pnt1_ = (pnt1_ == 0 ? rindex (pnt_, ':') : pnt1_); \ pnt1_ = (pnt1_ == 0 ? strrchr (pnt_, ':') : pnt1_); \
(pnt1_ == 0 ? pnt_ : pnt1_ + 1); \ (pnt1_ == 0 ? pnt_ : pnt1_ + 1); \
}) })
......
...@@ -510,8 +510,8 @@ if test $gcc_cv_enum_bf_unsigned = yes; then ...@@ -510,8 +510,8 @@ if test $gcc_cv_enum_bf_unsigned = yes; then
[Define if enumerated bitfields are treated as unsigned values.]) [Define if enumerated bitfields are treated as unsigned values.])
fi fi
AC_CHECK_FUNCS(strtoul bsearch putenv popen bcopy bzero bcmp \ AC_CHECK_FUNCS(strtoul bsearch putenv popen bcopy \
index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \ strchr strrchr kill getrlimit setrlimit atoll atoq \
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \ sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
fputs_unlocked getrusage valloc iconv nl_langinfo) fputs_unlocked getrusage valloc iconv nl_langinfo)
...@@ -555,8 +555,8 @@ AC_FUNC_MMAP_FILE ...@@ -555,8 +555,8 @@ AC_FUNC_MMAP_FILE
# We will need to find libiberty.h and ansidecl.h # We will need to find libiberty.h and ansidecl.h
saved_CFLAGS="$CFLAGS" saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
gcc_AC_CHECK_DECLS(bcopy bzero bcmp \ gcc_AC_CHECK_DECLS(bcopy \
index rindex getenv atol sbrk abort atof getcwd getwd \ getenv atol sbrk abort atof getcwd getwd \
strsignal putc_unlocked fputs_unlocked strstr environ \ strsignal putc_unlocked fputs_unlocked strstr environ \
malloc realloc calloc free basename getopt, , ,[ malloc realloc calloc free basename getopt, , ,[
#include "gansidecl.h" #include "gansidecl.h"
......
2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
* parse.y (create_new_parser_context): Use memset () instead of
bzero ().
2000-11-08 Tom Tromey <tromey@cygnus.com> 2000-11-08 Tom Tromey <tromey@cygnus.com>
* gjavah.c (process_file): Only include gcj/cni.h when generating * gjavah.c (process_file): Only include gcj/cni.h when generating
......
...@@ -2615,7 +2615,7 @@ create_new_parser_context (copy_from_previous) ...@@ -2615,7 +2615,7 @@ create_new_parser_context (copy_from_previous)
new->saved_data_ctx = 1; new->saved_data_ctx = 1;
} }
else else
bzero ((PTR) new, sizeof (struct parser_ctxt)); memset ((PTR) new, 0, sizeof (struct parser_ctxt));
new->next = ctxp; new->next = ctxp;
ctxp = new; ctxp = new;
......
...@@ -327,7 +327,7 @@ do { \ ...@@ -327,7 +327,7 @@ do { \
-0.0 equals 0.0 but they are not identical, and conversely -0.0 equals 0.0 but they are not identical, and conversely
two NaNs might be identical but they cannot be equal. */ two NaNs might be identical but they cannot be equal. */
#define REAL_VALUES_IDENTICAL(x, y) \ #define REAL_VALUES_IDENTICAL(x, y) \
(!bcmp ((char *) &(x), (char *) &(y), sizeof (REAL_VALUE_TYPE))) (!memcmp ((char *) &(x), (char *) &(y), sizeof (REAL_VALUE_TYPE)))
/* Compare two floating-point values for equality. */ /* Compare two floating-point values for equality. */
#ifndef REAL_VALUES_EQUAL #ifndef REAL_VALUES_EQUAL
......
...@@ -336,46 +336,6 @@ extern void bcopy PARAMS ((const PTR, PTR, size_t)); ...@@ -336,46 +336,6 @@ extern void bcopy PARAMS ((const PTR, PTR, size_t));
# endif # endif
#endif #endif
#ifndef bcmp
# ifdef HAVE_BCMP
# if defined (HAVE_DECL_BCMP) && !HAVE_DECL_BCMP
extern int bcmp PARAMS ((const PTR, const PTR, size_t));
# endif
# else /* ! HAVE_BCMP */
# define bcmp(left,right,len) memcmp ((left),(right),(len))
# endif
#endif
#ifndef bzero
# ifdef HAVE_BZERO
# if defined (HAVE_DECL_BZERO) && !HAVE_DECL_BZERO
extern void bzero PARAMS ((PTR, size_t));
# endif
# else /* ! HAVE_BZERO */
# define bzero(dst,len) memset ((dst),0,(len))
# endif
#endif
#ifndef index
# ifdef HAVE_INDEX
# if defined (HAVE_DECL_INDEX) && !HAVE_DECL_INDEX
extern char *index PARAMS ((const char *, int));
# endif
# else /* ! HAVE_INDEX */
# define index strchr
# endif
#endif
#ifndef rindex
# ifdef HAVE_RINDEX
# if defined (HAVE_DECL_RINDEX) && !HAVE_DECL_RINDEX
extern char *rindex PARAMS ((const char *, int));
# endif
# else /* ! HAVE_RINDEX */
# define rindex strrchr
# endif
#endif
#if defined (HAVE_DECL_ATOF) && !HAVE_DECL_ATOF #if defined (HAVE_DECL_ATOF) && !HAVE_DECL_ATOF
extern double atof PARAMS ((const char *)); extern double atof PARAMS ((const char *));
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment