* alpha.c (check_float_value): Use memcpy, not bcopy.
* arm.c (output_move_double): Likewise.
* arm.md: Likewise.
* m88k.c (legitimize_operand): Likewise.
* m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise.
* m88k.md: Likewise.
* mips.c (override_options): Likewise.
* mips.md: Likewise.
* romp.c (output_fpops): Likewise.
* rs6000.c (rs6000_override_options): Likewise.
* sh.md: Likewise.
* vax.c (check_float_value): Likewise.
* emit-rtl.c (copy_rtx_if_shared, init_emit_once): Likewise.
* expmed.c (synth_mult): Likewise.
* final.c (add_bb_string): Likewise.
* genattr.c (main): Likewise.
* genattrtab.c (attr_string, simplify_cond, copy_rtx_unchanging):
Likewise.
* jump.c (thread_jumps): Likewise.
* prefix.c (save_string): Likewise.
* real.h (REAL_VALUE_FROM_CONST_DOUBLE): Likewise.
* regclass.c (init_reg_sets, init_reg_sets_1): Likewise.
* reload1.c (reload, eliminate_regs): Likewise.
cp:
* decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
* lex.c (copy_lang_decl): Likewise.
java:
* decl.c (copy_lang_decl): Use memcpy, not bcopy.
* jcf-parse.c (jcf_figure_file_type): Likewise.
From-SVN: r37367
+2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * alpha.c (check_float_value): Use memcpy, not bcopy.
+ * arm.c (output_move_double): Likewise.
+ * arm.md: Likewise.
+ * m88k.c (legitimize_operand): Likewise.
+ * m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise.
+ * m88k.md: Likewise.
+ * mips.c (override_options): Likewise.
+ * mips.md: Likewise.
+ * romp.c (output_fpops): Likewise.
+ * rs6000.c (rs6000_override_options): Likewise.
+ * sh.md: Likewise.
+ * vax.c (check_float_value): Likewise.
+
+ * emit-rtl.c (copy_rtx_if_shared, init_emit_once): Likewise.
+ * expmed.c (synth_mult): Likewise.
+ * final.c (add_bb_string): Likewise.
+ * genattr.c (main): Likewise.
+ * genattrtab.c (attr_string, simplify_cond, copy_rtx_unchanging):
+ Likewise.
+ * jump.c (thread_jumps): Likewise.
+ * prefix.c (save_string): Likewise.
+ * real.h (REAL_VALUE_FROM_CONST_DOUBLE): Likewise.
+ * regclass.c (init_reg_sets, init_reg_sets_1): Likewise.
+ * reload1.c (reload, eliminate_regs): Likewise.
+
2000-11-10 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc.texi (Service): Update to reflect current practice and
else
fvptr = &float_values[4];
- bcopy ((char *) d, (char *) &r, sizeof (REAL_VALUE_TYPE));
+ memcpy (&r, d, sizeof (REAL_VALUE_TYPE));
if (REAL_VALUES_LESS (fvptr[0], r))
{
bcopy ((char *) &fvptr[0], (char *) d,
long l[2];
union real_extract u;
- bcopy ((char *) &CONST_DOUBLE_LOW (operands[1]), (char *) &u,
- sizeof (u));
+ memcpy (&u, &CONST_DOUBLE_LOW (operands[1]), sizeof (u));
REAL_VALUE_TO_TARGET_DOUBLE (u.d, l);
otherops[1] = GEN_INT (l[1]);
operands[1] = GEN_INT (l[0]);
case MODE_FLOAT:
{
union real_extract u;
- bcopy ((char *) &CONST_DOUBLE_LOW (operands[0]), (char *) &u,
- sizeof u);
+ memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u);
assemble_real (u.d, GET_MODE (operands[0]));
break;
}
case MODE_FLOAT:
{
union real_extract u;
- bcopy ((char *) &CONST_DOUBLE_LOW (operands[0]), (char *) &u,
- sizeof u);
+ memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u);
assemble_real (u.d, GET_MODE (operands[0]));
break;
}
if (GET_CODE (op) == CONST_DOUBLE)
{
- bcopy (&CONST_DOUBLE_LOW (op), &u.r, sizeof u);
+ memcpy (&u.r, &CONST_DOUBLE_LOW (op), sizeof u);
if (u.d.exponent != 0x7ff /* NaN */
&& u.d.mantissa2 == 0 /* Mantissa fits */
&& (u.s.exponent1 == 0x8 || u.s.exponent1 == 0x7) /* Exponent fits */
static int leaf[] = REG_LEAF_ALLOC_ORDER; \
static int nonleaf[] = REG_ALLOC_ORDER; \
\
- bcopy (regs_ever_live[1] ? nonleaf : leaf, reg_alloc_order, \
- FIRST_PSEUDO_REGISTER * sizeof (int)); \
+ memcpy (reg_alloc_order, regs_ever_live[1] ? nonleaf : leaf, \
+ FIRST_PSEUDO_REGISTER * sizeof (int)); \
}
\f
/*** Register Classes ***/
if (real_power_of_2_operand (operands[2], DFmode))
{
union real_extract u;
- bcopy (&CONST_DOUBLE_LOW (operands[2]), &u, sizeof u);
+ memcpy (&u, &CONST_DOUBLE_LOW (operands[2]), sizeof u);
emit_insn (gen_muldf3 (operands[0], operands[1],
CONST_DOUBLE_FROM_REAL_VALUE (1.0/u.d, DFmode)));
DONE;
reg_names points into via the REGISTER_NAMES macro. */
if (TARGET_NAME_REGS)
- bcopy ((char *) mips_sw_reg_names, (char *) mips_reg_names,
- sizeof (mips_reg_names));
+ memcpy (mips_reg_names, mips_sw_reg_names, sizeof (mips_reg_names));
/* When compiling for the mips16, we can not use floating point. We
record the original hard float value in mips16_hard_float. */
if (GET_CODE (operands[0]) != CONST_DOUBLE)
abort ();
- bcopy ((char *) &CONST_DOUBLE_LOW (operands[0]), (char *) &u, sizeof u);
+ memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u);
assemble_real (u.d, SFmode);
return \"\";
}"
if (GET_CODE (operands[0]) != CONST_DOUBLE)
abort ();
- bcopy ((char *) &CONST_DOUBLE_LOW (operands[0]), (char *) &u, sizeof u);
+ memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u);
assemble_real (u.d, DFmode);
return \"\";
}"
{
union real_extract u;
- bcopy ((char *) &CONST_DOUBLE_LOW (immed[i]),
- (char *) &u, sizeof u);
+ memcpy (&u, &CONST_DOUBLE_LOW (immed[i]), sizeof u);
if (GET_MODE (immed[i]) == DFmode)
ASM_OUTPUT_DOUBLE (file, u.d);
else
/* If the user desires alternate register names, copy in the alternate names
now. */
if (TARGET_REGNAMES)
- bcopy ((char *)alt_reg_names, (char *)rs6000_reg_names,
- sizeof (rs6000_reg_names));
+ memcpy (rs6000_reg_names, alt_reg_names, sizeof (rs6000_reg_names));
#endif
#ifdef SUBTARGET_OVERRIDE_OPTIONS
"*
{
union real_extract u;
- bcopy ((char *) &CONST_DOUBLE_LOW (operands[0]), (char *) &u, sizeof u);
+ memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u);
assemble_real (u.d, SFmode);
return \"\";
}"
"*
{
union real_extract u;
- bcopy ((char *) &CONST_DOUBLE_LOW (operands[0]), (char *) &u, sizeof u);
+ memcpy (&u, &CONST_DOUBLE_LOW (operands[0]), sizeof u);
assemble_real (u.d, DFmode);
return \"\";
}"
if ((mode) == SFmode)
{
REAL_VALUE_TYPE r;
- bcopy ((char *) d, (char *) &r, sizeof (REAL_VALUE_TYPE));
+ memcpy (&r, d, sizeof (REAL_VALUE_TYPE));
if (REAL_VALUES_LESS (float_values[0], r))
{
bcopy ((char *) &float_values[0], (char *) d,
+2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
+ * lex.c (copy_lang_decl): Likewise.
+
2000-11-09 Mark Mitchell <mark@codesourcery.com>
* dump.c (cp_dump_tree): Don't dump function bodies here.
}
{
RID_BIT_TYPE tmp_bits;
- bcopy ((void*)&specbits, (void*)&tmp_bits, sizeof (RID_BIT_TYPE));
+ memcpy (&tmp_bits, &specbits, sizeof (RID_BIT_TYPE));
RIDBIT_RESET (RID_INLINE, tmp_bits);
RIDBIT_RESET (RID_STATIC, tmp_bits);
if (RIDBIT_ANY_SET (tmp_bits))
/* Make a copy. */
f = ((struct cp_language_function *)
xmalloc (sizeof (struct cp_language_function)));
- bcopy ((char *) cp_function_chain, (char *) f,
- sizeof (struct cp_language_function));
+ memcpy (f, cp_function_chain, sizeof (struct cp_language_function));
DECL_SAVED_FUNCTION_DATA (decl) = f;
/* Clear out the bits we don't need. */
else
size = sizeof (struct lang_decl);
ld = (struct lang_decl *) ggc_alloc (size);
- bcopy ((char *)DECL_LANG_SPECIFIC (node), (char *)ld, size);
+ memcpy (ld, DECL_LANG_SPECIFIC (node), size);
DECL_LANG_SPECIFIC (node) = ld;
}
register rtx copy;
copy = rtx_alloc (code);
- bcopy ((char *) x, (char *) copy,
+ memcpy (copy, x,
(sizeof (*copy) - sizeof (copy->fld)
+ sizeof (copy->fld[0]) * GET_RTX_LENGTH (code)));
x = copy;
memset ((char *) &u, 0, sizeof u); /* Zero any holes in a structure. */
u.d = i == 0 ? dconst0 : i == 1 ? dconst1 : dconst2;
- bcopy ((char *) &u, (char *) &CONST_DOUBLE_LOW (tem), sizeof u);
+ memcpy (&CONST_DOUBLE_LOW (tem), &u, sizeof u);
CONST_DOUBLE_MEM (tem) = cc0_rtx;
CONST_DOUBLE_CHAIN (tem) = NULL_RTX;
PUT_MODE (tem, mode);
best_alg is normally undefined, and this is a critical function. */
alg_out->ops = best_alg->ops + 1;
alg_out->cost = cost_limit;
- bcopy ((char *) best_alg->op, (char *) alg_out->op,
- alg_out->ops * sizeof *alg_out->op);
- bcopy ((char *) best_alg->log, (char *) alg_out->log,
- alg_out->ops * sizeof *alg_out->log);
+ memcpy (alg_out->op, best_alg->op,
+ alg_out->ops * sizeof *alg_out->op);
+ memcpy (alg_out->log, best_alg->log,
+ alg_out->ops * sizeof *alg_out->log);
}
\f
/* Perform a multiplication and return an rtx for the result.
if (!perm_p)
{
char *p = (char *) permalloc (len);
- bcopy (string, p, len);
+ memcpy (p, string, len);
string = p;
}
else
unit = (struct function_unit *)
alloca (sizeof (struct function_unit));
unit->name = (char *) alloca (len);
- bcopy (name, unit->name, len);
+ memcpy (unit->name, name, len);
unit->multiplicity = multiplicity;
unit->simultaneity = simultaneity;
unit->ready_cost.min = unit->ready_cost.max = ready_cost;
/* Not found; create a permanent copy and add it to the hash table. */
new_str = (char *) obstack_alloc (hash_obstack, len + 1);
- bcopy (str, new_str, len);
+ memcpy (new_str, str, len);
new_str[len] = '\0';
attr_hash_add_string (hashcode, new_str);
/* This lets us free all storage allocated below, if appropriate. */
first_spacer = (char *) obstack_finish (rtl_obstack);
- bcopy ((char *) XVEC (exp, 0)->elem, (char *) tests, len * sizeof (rtx));
+ memcpy (tests, XVEC (exp, 0)->elem, len * sizeof (rtx));
/* See if default value needs simplification. */
if (GET_CODE (defval) == COND)
rtx newexp = rtx_alloc (COND);
XVEC (newexp, 0) = rtvec_alloc (len);
- bcopy ((char *) tests, (char *) XVEC (newexp, 0)->elem,
- len * sizeof (rtx));
+ memcpy (XVEC (newexp, 0)->elem, tests, len * sizeof (rtx));
XEXP (newexp, 1) = new_defval;
return newexp;
}
PUT_MODE (copy, GET_MODE (orig));
RTX_UNCHANGING_P (copy) = 1;
- bcopy ((char *) &XEXP (orig, 0), (char *) &XEXP (copy, 0),
- GET_RTX_LENGTH (GET_CODE (copy)) * sizeof (rtx));
+ memcpy (&XEXP (copy, 0), &XEXP (orig, 0),
+ GET_RTX_LENGTH (GET_CODE (copy)) * sizeof (rtx));
return copy;
#endif
}
+2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * decl.c (copy_lang_decl): Use memcpy, not bcopy.
+ * jcf-parse.c (jcf_figure_file_type): Likewise.
+
2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
* parse.y (create_new_parser_context): Use memset () instead of
= TREE_CODE (node) == VAR_DECL ? sizeof (struct lang_decl_var)
: sizeof (struct lang_decl);
struct lang_decl *x = (struct lang_decl *) ggc_alloc (lang_decl_size);
- bcopy ((PTR) DECL_LANG_SPECIFIC (node), (PTR) x, lang_decl_size);
+ memcpy (x, DECL_LANG_SPECIFIC (node), lang_decl_size);
DECL_LANG_SPECIFIC (node) = x;
}
&& !open_in_zip (jcf, input_filename, NULL, 0))
{
localToFile = ALLOC (sizeof (struct ZipFileCache));
- bcopy ((PTR) SeenZipFiles, (PTR) localToFile,
- sizeof (struct ZipFileCache));
+ memcpy (localToFile, SeenZipFiles, sizeof (struct ZipFileCache));
process_zip_dir (); /* Register all the class defined there */
return JCF_ZIP;
}
memset (modified_regs, 0, max_reg * sizeof (char));
modified_mem = 0;
- bcopy ((char *) all_reset, (char *) same_regs,
- max_reg * sizeof (int));
+ memcpy (same_regs, all_reset, max_reg * sizeof (int));
num_same_regs = 0;
label = JUMP_LABEL (b1);
{
register char *result = xmalloc (len + 1);
- bcopy (s, result, len);
+ memcpy (result, s, len);
result[len] = 0;
return result;
}
#define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \
do { union real_extract u; \
- bcopy ((char *) &CONST_DOUBLE_LOW ((from)), (char *) &u, sizeof u); \
+ memcpy (&u, &CONST_DOUBLE_LOW ((from)), sizeof u); \
to = u.d; } while (0)
/* Return a CONST_DOUBLE with value R and mode M. */
SET_HARD_REG_BIT (reg_class_contents[i], j);
}
- bcopy (initial_fixed_regs, fixed_regs, sizeof fixed_regs);
- bcopy (initial_call_used_regs, call_used_regs, sizeof call_used_regs);
+ memcpy (fixed_regs, initial_fixed_regs, sizeof fixed_regs);
+ memcpy (call_used_regs, initial_call_used_regs, sizeof call_used_regs);
memset (global_regs, 0, sizeof global_regs);
/* Do any additional initialization regsets may need */
CLEAR_HARD_REG_SET (call_used_reg_set);
CLEAR_HARD_REG_SET (call_fixed_reg_set);
- bcopy (fixed_regs, call_fixed_regs, sizeof call_fixed_regs);
+ memcpy (call_fixed_regs, fixed_regs, sizeof call_fixed_regs);
n_non_fixed_regs = 0;
reg_equiv_address = (rtx *) xcalloc (max_regno, sizeof (rtx));
reg_max_ref_width = (unsigned int *) xcalloc (max_regno, sizeof (int));
reg_old_renumber = (short *) xcalloc (max_regno, sizeof (short));
- bcopy ((PTR) reg_renumber, (PTR) reg_old_renumber, max_regno * sizeof (short));
+ memcpy (reg_old_renumber, reg_renumber, max_regno * sizeof (short));
pseudo_forbidden_regs
= (HARD_REG_SET *) xmalloc (max_regno * sizeof (HARD_REG_SET));
pseudo_previous_regs
if (new != XEXP (x, i) && ! copied)
{
rtx new_x = rtx_alloc (code);
- bcopy ((char *) x, (char *) new_x,
- (sizeof (*new_x) - sizeof (new_x->fld)
- + sizeof (new_x->fld[0]) * GET_RTX_LENGTH (code)));
+ memcpy (new_x, x,
+ (sizeof (*new_x) - sizeof (new_x->fld)
+ + sizeof (new_x->fld[0]) * GET_RTX_LENGTH (code)));
x = new_x;
copied = 1;
}
if (! copied)
{
rtx new_x = rtx_alloc (code);
- bcopy ((char *) x, (char *) new_x,
- (sizeof (*new_x) - sizeof (new_x->fld)
- + (sizeof (new_x->fld[0])
- * GET_RTX_LENGTH (code))));
+ memcpy (new_x, x,
+ (sizeof (*new_x) - sizeof (new_x->fld)
+ + (sizeof (new_x->fld[0])
+ * GET_RTX_LENGTH (code))));
x = new_x;
copied = 1;
}