Cast pointer operands to bzero, bcopy, and bcmp to (char *).
From-SVN: r7472
This commit is contained in:
parent
de953b38a3
commit
4c9a05bc55
@ -361,7 +361,7 @@ bc_seg_write (seg, file)
|
||||
if (i % 8 != 0)
|
||||
putc ('\n', file);
|
||||
|
||||
bcopy (seg->data + i, &offset, sizeof (int));
|
||||
bcopy (seg->data + i, (char *) &offset, sizeof (int));
|
||||
i += sizeof (int) - 1;
|
||||
|
||||
BC_WRITE_RELOC_ENTRY (segreloc, file, offset);
|
||||
@ -603,7 +603,7 @@ bc_end_function ()
|
||||
if (ref->label->defined)
|
||||
{
|
||||
addr = ref->label->offset;
|
||||
bcopy (&addr, bytecode->data + ref->offset, sizeof addr);
|
||||
bcopy ((char *) &addr, bytecode->data + ref->offset, sizeof addr);
|
||||
}
|
||||
|
||||
/* Free the chains of labelrefs and labeldefs. */
|
||||
|
@ -949,7 +949,7 @@ expand_call (exp, target, ignore)
|
||||
|
||||
/* Make a vector to hold all the information about each arg. */
|
||||
args = (struct arg_data *) alloca (num_actuals * sizeof (struct arg_data));
|
||||
bzero (args, num_actuals * sizeof (struct arg_data));
|
||||
bzero ((char *) args, num_actuals * sizeof (struct arg_data));
|
||||
|
||||
args_size.constant = 0;
|
||||
args_size.var = 0;
|
||||
|
88
gcc/cccp.c
88
gcc/cccp.c
@ -1157,11 +1157,11 @@ main (argc, argv)
|
||||
cplusplus = 0;
|
||||
cplusplus_comments = 0;
|
||||
|
||||
bzero (pend_files, argc * sizeof (char *));
|
||||
bzero (pend_defs, argc * sizeof (char *));
|
||||
bzero (pend_undefs, argc * sizeof (char *));
|
||||
bzero (pend_assertions, argc * sizeof (char *));
|
||||
bzero (pend_includes, argc * sizeof (char *));
|
||||
bzero ((char *) pend_files, argc * sizeof (char *));
|
||||
bzero ((char *) pend_defs, argc * sizeof (char *));
|
||||
bzero ((char *) pend_undefs, argc * sizeof (char *));
|
||||
bzero ((char *) pend_assertions, argc * sizeof (char *));
|
||||
bzero ((char *) pend_includes, argc * sizeof (char *));
|
||||
|
||||
/* Process switches and find input file name. */
|
||||
|
||||
@ -1790,7 +1790,8 @@ main (argc, argv)
|
||||
endp++;
|
||||
}
|
||||
/* Put the usual defaults back in at the end. */
|
||||
bcopy (include_defaults_array, &include_defaults[num_dirs],
|
||||
bcopy ((char *) include_defaults_array,
|
||||
(char *) &include_defaults[num_dirs],
|
||||
sizeof (include_defaults_array));
|
||||
}
|
||||
}
|
||||
@ -2229,17 +2230,19 @@ trigraph_pcp (buf)
|
||||
continue;
|
||||
}
|
||||
len = sptr - fptr - 2;
|
||||
|
||||
/* BSD doc says bcopy () works right for overlapping strings. In ANSI
|
||||
C, this will be memmove (). */
|
||||
if (bptr != fptr && len > 0)
|
||||
bcopy (fptr, bptr, len); /* BSD doc says bcopy () works right
|
||||
for overlapping strings. In ANSI
|
||||
C, this will be memmove (). */
|
||||
bcopy ((char *) fptr, (char *) bptr, len);
|
||||
|
||||
bptr += len;
|
||||
*bptr++ = c;
|
||||
fptr = ++sptr;
|
||||
}
|
||||
len = buf->length - (fptr - buf->buf);
|
||||
if (bptr != fptr && len > 0)
|
||||
bcopy (fptr, bptr, len);
|
||||
bcopy ((char *) fptr, (char *) bptr, len);
|
||||
buf->length -= fptr - bptr;
|
||||
buf->buf[buf->length] = '\0';
|
||||
if (warn_trigraphs && fptr != bptr)
|
||||
@ -2538,7 +2541,7 @@ do { ip = &instack[indepth]; \
|
||||
if (*ibp == '(') {
|
||||
ip->bufp = ibp;
|
||||
skip_paren_group (ip);
|
||||
bcopy (ibp, obp, ip->bufp - ibp);
|
||||
bcopy ((char *) ibp, (char *) obp, ip->bufp - ibp);
|
||||
obp += ip->bufp - ibp;
|
||||
ibp = ip->bufp;
|
||||
}
|
||||
@ -2753,7 +2756,7 @@ do { ip = &instack[indepth]; \
|
||||
while (ibp < limit) {
|
||||
if (ibp[-1] != '\\' && *ibp == '\n') {
|
||||
if (put_out_comments) {
|
||||
bcopy (before_bp, obp, ibp - before_bp);
|
||||
bcopy ((char *) before_bp, (char *) obp, ibp - before_bp);
|
||||
obp += ibp - before_bp;
|
||||
}
|
||||
break;
|
||||
@ -2789,14 +2792,14 @@ do { ip = &instack[indepth]; \
|
||||
if (lintcmd != NULL) {
|
||||
/* I believe it is always safe to emit this newline: */
|
||||
obp[-1] = '\n';
|
||||
bcopy ("#pragma lint ", obp, 13);
|
||||
bcopy ("#pragma lint ", (char *) obp, 13);
|
||||
obp += 13;
|
||||
bcopy (lintcmd, obp, cmdlen);
|
||||
bcopy (lintcmd, (char *) obp, cmdlen);
|
||||
obp += cmdlen;
|
||||
|
||||
if (arglen != 0) {
|
||||
*(obp++) = ' ';
|
||||
bcopy (argbp, obp, arglen);
|
||||
bcopy (argbp, (char *) obp, arglen);
|
||||
obp += arglen;
|
||||
}
|
||||
|
||||
@ -2854,7 +2857,7 @@ do { ip = &instack[indepth]; \
|
||||
else {
|
||||
ibp++;
|
||||
if (put_out_comments) {
|
||||
bcopy (before_bp, obp, ibp - before_bp);
|
||||
bcopy ((char *) before_bp, (char *) obp, ibp - before_bp);
|
||||
obp += ibp - before_bp;
|
||||
}
|
||||
}
|
||||
@ -3616,7 +3619,7 @@ handle_directive (ip, op)
|
||||
/* Output arguments. */
|
||||
len = (bp - buf);
|
||||
check_expand (op, len);
|
||||
bcopy (buf, op->bufp, len);
|
||||
bcopy (buf, (char *) op->bufp, len);
|
||||
op->bufp += len;
|
||||
/* Take account of any (escaped) newlines just output. */
|
||||
while (--len >= 0)
|
||||
@ -3735,14 +3738,14 @@ handle_directive (ip, op)
|
||||
/* Output directive name. */
|
||||
check_expand (op, kt->length + 1);
|
||||
*op->bufp++ = '#';
|
||||
bcopy (kt->name, op->bufp, kt->length);
|
||||
bcopy (kt->name, (char *) op->bufp, kt->length);
|
||||
op->bufp += kt->length;
|
||||
|
||||
if (kt->pass_thru || dump_macros == dump_definitions) {
|
||||
/* Output arguments. */
|
||||
len = (cp - buf);
|
||||
check_expand (op, len);
|
||||
bcopy (buf, op->bufp, len);
|
||||
bcopy (buf, (char *) op->bufp, len);
|
||||
op->bufp += len;
|
||||
} else if (kt->type == T_DEFINE && dump_macros == dump_names) {
|
||||
U_CHAR *xp = buf;
|
||||
@ -3957,7 +3960,7 @@ oops:
|
||||
}
|
||||
len = strlen (buf);
|
||||
check_expand (op, len);
|
||||
bcopy (buf, op->bufp, len);
|
||||
bcopy (buf, (char *) op->bufp, len);
|
||||
op->bufp += len;
|
||||
|
||||
return;
|
||||
@ -4131,7 +4134,7 @@ get_filename:
|
||||
} else {
|
||||
trybuf = expand_to_temp_buffer (buf, limit, 0, 0);
|
||||
buf = (U_CHAR *) alloca (trybuf.bufp - trybuf.buf + 1);
|
||||
bcopy (trybuf.buf, buf, trybuf.bufp - trybuf.buf);
|
||||
bcopy ((char *) trybuf.buf, (char *) buf, trybuf.bufp - trybuf.buf);
|
||||
limit = buf + (trybuf.bufp - trybuf.buf);
|
||||
free (trybuf.buf);
|
||||
retried++;
|
||||
@ -4351,7 +4354,8 @@ get_filename:
|
||||
struct stat s;
|
||||
|
||||
fstat (pcf, &s);
|
||||
if (bcmp (&stat_f.st_ino, &s.st_ino, sizeof (s.st_ino))
|
||||
if (bcmp ((char *) &stat_f.st_ino, (char *) &s.st_ino,
|
||||
sizeof (s.st_ino))
|
||||
|| stat_f.st_dev != s.st_dev)
|
||||
{
|
||||
pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit);
|
||||
@ -4672,7 +4676,7 @@ finclude (f, fname, op, system_header_p, dirptr)
|
||||
}
|
||||
|
||||
fp = &instack[indepth + 1];
|
||||
bzero (fp, sizeof (FILE_BUF));
|
||||
bzero ((char *) fp, sizeof (FILE_BUF));
|
||||
fp->nominal_fname = fp->fname = fname;
|
||||
fp->length = 0;
|
||||
fp->lineno = 1;
|
||||
@ -4845,7 +4849,7 @@ lookup_import (filename, searchptr)
|
||||
while (i) {
|
||||
/* Compare the inode and the device.
|
||||
Supposedly on some systems the inode is not a scalar. */
|
||||
if (!bcmp (&i->inode, &sb.st_ino, sizeof (sb.st_ino))
|
||||
if (!bcmp ((char *) &i->inode, (char *) &sb.st_ino, sizeof (sb.st_ino))
|
||||
&& i->dev == sb.st_dev) {
|
||||
close (fd);
|
||||
return -2; /* return found */
|
||||
@ -4872,7 +4876,7 @@ add_import (fd, fname)
|
||||
i = (struct import_file *)xmalloc (sizeof (struct import_file));
|
||||
i->name = (char *)xmalloc (strlen (fname)+1);
|
||||
strcpy (i->name, fname);
|
||||
bcopy (&sb.st_ino, &i->inode, sizeof (sb.st_ino));
|
||||
bcopy ((char *) &sb.st_ino, (char *) &i->inode, sizeof (sb.st_ino));
|
||||
i->dev = sb.st_dev;
|
||||
i->next = import_hash_table[hashval];
|
||||
import_hash_table[hashval] = i;
|
||||
@ -5193,11 +5197,11 @@ pass_thru_directive (buf, limit, op, keyword)
|
||||
|
||||
check_expand (op, 1 + keyword_length + (limit - buf));
|
||||
*op->bufp++ = '#';
|
||||
bcopy (keyword->name, op->bufp, keyword_length);
|
||||
bcopy (keyword->name, (char *) op->bufp, keyword_length);
|
||||
op->bufp += keyword_length;
|
||||
if (limit != buf && buf[0] != ' ')
|
||||
*op->bufp++ = ' ';
|
||||
bcopy (buf, op->bufp, limit - buf);
|
||||
bcopy ((char *) buf, (char *) op->bufp, limit - buf);
|
||||
op->bufp += (limit - buf);
|
||||
#if 0
|
||||
*op->bufp++ = '\n';
|
||||
@ -5425,7 +5429,7 @@ do_define (buf, limit, op, keyword)
|
||||
|
||||
msg = (U_CHAR *) alloca (mdef.symlen + 22);
|
||||
*msg = '`';
|
||||
bcopy (mdef.symnam, msg + 1, mdef.symlen);
|
||||
bcopy ((char *) mdef.symnam, (char *) (msg + 1), mdef.symlen);
|
||||
strcpy ((char *) (msg + mdef.symlen + 1), "' redefined");
|
||||
pedwarn (msg);
|
||||
if (hp->type == T_MACRO)
|
||||
@ -5471,7 +5475,7 @@ check_macro_name (symname, usage)
|
||||
else if (!is_idstart[*symname]) {
|
||||
U_CHAR *msg; /* what pain... */
|
||||
msg = (U_CHAR *) alloca (sym_length + 1);
|
||||
bcopy (symname, msg, sym_length);
|
||||
bcopy ((char *) symname, (char *) msg, sym_length);
|
||||
msg[sym_length] = 0;
|
||||
error ("invalid %s name `%s'", usage, msg);
|
||||
} else {
|
||||
@ -6124,7 +6128,7 @@ read_token_list (bpp, limit, error_flag)
|
||||
|
||||
temp = (struct arglist *) xmalloc (sizeof (struct arglist));
|
||||
temp->name = (U_CHAR *) xmalloc (bp - beg + 1);
|
||||
bcopy (beg, temp->name, bp - beg);
|
||||
bcopy ((char *) beg, (char *) temp->name, bp - beg);
|
||||
temp->name[bp - beg] = 0;
|
||||
temp->next = token_ptrs;
|
||||
token_ptrs = temp;
|
||||
@ -6457,7 +6461,7 @@ do_error (buf, limit, op, keyword)
|
||||
{
|
||||
int length = limit - buf;
|
||||
U_CHAR *copy = (U_CHAR *) xmalloc (length + 1);
|
||||
bcopy (buf, copy, length);
|
||||
bcopy ((char *) buf, (char *) copy, length);
|
||||
copy[length] = 0;
|
||||
SKIP_WHITE_SPACE (copy);
|
||||
error ("#error %s", copy);
|
||||
@ -6478,7 +6482,7 @@ do_warning (buf, limit, op, keyword)
|
||||
{
|
||||
int length = limit - buf;
|
||||
U_CHAR *copy = (U_CHAR *) xmalloc (length + 1);
|
||||
bcopy (buf, copy, length);
|
||||
bcopy ((char *) buf, (char *) copy, length);
|
||||
copy[length] = 0;
|
||||
SKIP_WHITE_SPACE (copy);
|
||||
warning ("#warning %s", copy);
|
||||
@ -6530,19 +6534,19 @@ do_ident (buf, limit)
|
||||
|
||||
trybuf = expand_to_temp_buffer (buf, limit, 0, 0);
|
||||
buf = (U_CHAR *) alloca (trybuf.bufp - trybuf.buf + 1);
|
||||
bcopy (trybuf.buf, buf, trybuf.bufp - trybuf.buf);
|
||||
bcopy ((char *) trybuf.buf, (char *) buf, trybuf.bufp - trybuf.buf);
|
||||
limit = buf + (trybuf.bufp - trybuf.buf);
|
||||
len = (limit - buf);
|
||||
free (trybuf.buf);
|
||||
|
||||
/* Output directive name. */
|
||||
check_expand (op, 8);
|
||||
bcopy ("#ident ", op->bufp, 7);
|
||||
bcopy ("#ident ", (char *) op->bufp, 7);
|
||||
op->bufp += 7;
|
||||
|
||||
/* Output the expanded argument line. */
|
||||
check_expand (op, len);
|
||||
bcopy (buf, op->bufp, len);
|
||||
bcopy ((char *) buf, (char *) op->bufp, len);
|
||||
op->bufp += len;
|
||||
|
||||
return 0;
|
||||
@ -6803,7 +6807,7 @@ do_xifdef (buf, limit, op, keyword)
|
||||
skip = (hp == NULL) ^ (keyword->type == T_IFNDEF);
|
||||
if (start_of_file && !skip) {
|
||||
control_macro = (U_CHAR *) xmalloc (end - buf + 1);
|
||||
bcopy (buf, control_macro, end - buf);
|
||||
bcopy ((char *) buf, (char *) control_macro, end - buf);
|
||||
control_macro[end - buf] = 0;
|
||||
}
|
||||
}
|
||||
@ -7551,7 +7555,7 @@ output_line_command (ip, op, conditional, file_change)
|
||||
check_expand (op, len + 1);
|
||||
if (op->bufp > op->buf && op->bufp[-1] != '\n')
|
||||
*op->bufp++ = '\n';
|
||||
bcopy (line_cmd_buf, op->bufp, len);
|
||||
bcopy ((char *) line_cmd_buf, (char *) op->bufp, len);
|
||||
op->bufp += len;
|
||||
op->lineno = ip->lineno;
|
||||
}
|
||||
@ -7881,7 +7885,7 @@ macroexpand (hp, op)
|
||||
}
|
||||
}
|
||||
|
||||
bcopy (p1, xbuf + totlen, l1 - p1);
|
||||
bcopy ((char *) p1, (char *) (xbuf + totlen), l1 - p1);
|
||||
totlen += l1 - p1;
|
||||
if (!traditional && !ap->raw_after) {
|
||||
/* Ordinary expanded use of the argument.
|
||||
@ -7896,7 +7900,8 @@ macroexpand (hp, op)
|
||||
xbuf[totlen++] = '\n';
|
||||
xbuf[totlen++] = ' ';
|
||||
}
|
||||
bcopy (arg->expanded, xbuf + totlen, arg->expand_length);
|
||||
bcopy ((char *) arg->expanded, (char *) (xbuf + totlen),
|
||||
arg->expand_length);
|
||||
totlen += arg->expand_length;
|
||||
if (!traditional) {
|
||||
xbuf[totlen++] = '\n';
|
||||
@ -8016,7 +8021,7 @@ macarg (argptr, rest_args)
|
||||
U_CHAR *buffer = (U_CHAR *) xmalloc (bufsize + extra + 1);
|
||||
int final_start = 0;
|
||||
|
||||
bcopy (ip->bufp, buffer, bufsize);
|
||||
bcopy ((char *) ip->bufp, (char *) buffer, bufsize);
|
||||
ip->bufp = bp;
|
||||
ip->lineno += newlines;
|
||||
|
||||
@ -8037,7 +8042,8 @@ macarg (argptr, rest_args)
|
||||
bufsize += bp - ip->bufp;
|
||||
extra += newlines;
|
||||
buffer = (U_CHAR *) xrealloc (buffer, bufsize + extra + 1);
|
||||
bcopy (ip->bufp, buffer + bufsize - (bp - ip->bufp), bp - ip->bufp);
|
||||
bcopy ((char *) ip->bufp, (char *) (buffer + bufsize - (bp - ip->bufp)),
|
||||
bp - ip->bufp);
|
||||
ip->bufp = bp;
|
||||
ip->lineno += newlines;
|
||||
}
|
||||
|
@ -552,7 +552,9 @@ putenv (str)
|
||||
/* Add a new environment variable */
|
||||
environ = (char **) xmalloc (sizeof (char *) * (num_envs+2));
|
||||
*environ = str;
|
||||
bcopy (old_environ, environ+1, sizeof (char *) * (num_envs+1));
|
||||
bcopy ((char *) old_environ, (char *) (environ + 1),
|
||||
sizeof (char *) * (num_envs+1));
|
||||
|
||||
return 0;
|
||||
#endif /* VMS */
|
||||
}
|
||||
@ -1828,7 +1830,7 @@ scan_prog_file (prog_name, which_pass)
|
||||
if (rw)
|
||||
{
|
||||
load_union_t *ptr = (load_union_t *) xmalloc (load_hdr->hdr.ldci_cmd_size);
|
||||
bcopy ((generic *)load_hdr, (generic *)ptr, load_hdr->hdr.ldci_cmd_size);
|
||||
bcopy ((char *)load_hdr, (char *)ptr, load_hdr->hdr.ldci_cmd_size);
|
||||
load_hdr = ptr;
|
||||
|
||||
/* null out old command map, because we will rewrite at the end. */
|
||||
@ -2013,7 +2015,7 @@ scan_prog_file (prog_name, which_pass)
|
||||
if (debug)
|
||||
print_load_command (load_hdr, offset, i);
|
||||
|
||||
bcopy ((generic *)load_hdr, (generic *)(obj + offset), size);
|
||||
bcopy ((char *)load_hdr, (char *)(obj + offset), size);
|
||||
offset += size;
|
||||
}
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ combine_instructions (f, nregs)
|
||||
= (unsigned HOST_WIDE_INT *) alloca (nregs * sizeof (HOST_WIDE_INT));
|
||||
reg_sign_bit_copies = (char *) alloca (nregs * sizeof (char));
|
||||
|
||||
bzero (reg_nonzero_bits, nregs * sizeof (HOST_WIDE_INT));
|
||||
bzero ((char *) reg_nonzero_bits, nregs * sizeof (HOST_WIDE_INT));
|
||||
bzero (reg_sign_bit_copies, nregs * sizeof (char));
|
||||
|
||||
reg_last_death = (rtx *) alloca (nregs * sizeof (rtx));
|
||||
@ -658,14 +658,14 @@ init_reg_last_arrays ()
|
||||
{
|
||||
int nregs = combine_max_regno;
|
||||
|
||||
bzero (reg_last_death, nregs * sizeof (rtx));
|
||||
bzero (reg_last_set, nregs * sizeof (rtx));
|
||||
bzero (reg_last_set_value, nregs * sizeof (rtx));
|
||||
bzero (reg_last_set_table_tick, nregs * sizeof (int));
|
||||
bzero (reg_last_set_label, nregs * sizeof (int));
|
||||
bzero ((char *) reg_last_death, nregs * sizeof (rtx));
|
||||
bzero ((char *) reg_last_set, nregs * sizeof (rtx));
|
||||
bzero ((char *) reg_last_set_value, nregs * sizeof (rtx));
|
||||
bzero ((char *) reg_last_set_table_tick, nregs * sizeof (int));
|
||||
bzero ((char *) reg_last_set_label, nregs * sizeof (int));
|
||||
bzero (reg_last_set_invalid, nregs * sizeof (char));
|
||||
bzero (reg_last_set_mode, nregs * sizeof (enum machine_mode));
|
||||
bzero (reg_last_set_nonzero_bits, nregs * sizeof (HOST_WIDE_INT));
|
||||
bzero ((char *) reg_last_set_mode, nregs * sizeof (enum machine_mode));
|
||||
bzero ((char *) reg_last_set_nonzero_bits, nregs * sizeof (HOST_WIDE_INT));
|
||||
bzero (reg_last_set_sign_bit_copies, nregs * sizeof (char));
|
||||
}
|
||||
|
||||
@ -1629,7 +1629,7 @@ try_combine (i3, i2, i1)
|
||||
rtvec old = XVEC (newpat, 0);
|
||||
total_sets = XVECLEN (newpat, 0) + added_sets_1 + added_sets_2;
|
||||
newpat = gen_rtx (PARALLEL, VOIDmode, rtvec_alloc (total_sets));
|
||||
bcopy (&old->elem[0], &XVECEXP (newpat, 0, 0),
|
||||
bcopy ((char *) &old->elem[0], (char *) &XVECEXP (newpat, 0, 0),
|
||||
sizeof (old->elem[0]) * old->num_elem);
|
||||
}
|
||||
else
|
||||
|
17
gcc/cse.c
17
gcc/cse.c
@ -763,10 +763,11 @@ new_basic_block ()
|
||||
|
||||
next_qty = max_reg;
|
||||
|
||||
bzero (reg_tick, max_reg * sizeof (int));
|
||||
bzero ((char *) reg_tick, max_reg * sizeof (int));
|
||||
|
||||
bcopy (all_minus_one, reg_in_table, max_reg * sizeof (int));
|
||||
bcopy (consec_ints, reg_qty, max_reg * sizeof (int));
|
||||
bcopy ((char *) all_minus_one, (char *) reg_in_table,
|
||||
max_reg * sizeof (int));
|
||||
bcopy ((char *) consec_ints, (char *) reg_qty, max_reg * sizeof (int));
|
||||
CLEAR_HARD_REG_SET (hard_regs_in_table);
|
||||
|
||||
/* The per-quantity values used to be initialized here, but it is
|
||||
@ -782,7 +783,7 @@ new_basic_block ()
|
||||
}
|
||||
}
|
||||
|
||||
bzero (table, sizeof table);
|
||||
bzero ((char *) table, sizeof table);
|
||||
|
||||
prev_insn = 0;
|
||||
|
||||
@ -4092,7 +4093,7 @@ simplify_plus_minus (code, mode, op0, op1)
|
||||
int first = 1, negate = 0, changed;
|
||||
int i, j;
|
||||
|
||||
bzero (ops, sizeof ops);
|
||||
bzero ((char *) ops, sizeof ops);
|
||||
|
||||
/* Set up the two operands and then expand them until nothing has been
|
||||
changed. If we run out of room in our array, give up; this should
|
||||
@ -7989,7 +7990,7 @@ cse_main (f, nregs, after_loop, file)
|
||||
|
||||
/* Discard all the free elements of the previous function
|
||||
since they are allocated in the temporarily obstack. */
|
||||
bzero (table, sizeof table);
|
||||
bzero ((char *) table, sizeof table);
|
||||
free_element_chain = 0;
|
||||
n_elements_made = 0;
|
||||
|
||||
@ -7997,7 +7998,7 @@ cse_main (f, nregs, after_loop, file)
|
||||
|
||||
max_uid = get_max_uid ();
|
||||
uid_cuid = (int *) alloca ((max_uid + 1) * sizeof (int));
|
||||
bzero (uid_cuid, (max_uid + 1) * sizeof (int));
|
||||
bzero ((char *) uid_cuid, (max_uid + 1) * sizeof (int));
|
||||
|
||||
/* Compute the mapping from uids to cuids.
|
||||
CUIDs are numbers assigned to insns, like uids,
|
||||
@ -8418,7 +8419,7 @@ delete_dead_from_cse (insns, nreg)
|
||||
int in_libcall = 0;
|
||||
|
||||
/* First count the number of times each register is used. */
|
||||
bzero (counts, sizeof (int) * nreg);
|
||||
bzero ((char *) counts, sizeof (int) * nreg);
|
||||
for (insn = next_real_insn (insns); insn; insn = next_real_insn (insn))
|
||||
count_reg_usage (insn, counts, NULL_RTX, 1);
|
||||
|
||||
|
@ -399,7 +399,7 @@ dbxout_init (asm_file, input_file_name, syms)
|
||||
|
||||
typevec_len = 100;
|
||||
typevec = (enum typestatus *) xmalloc (typevec_len * sizeof typevec[0]);
|
||||
bzero (typevec, typevec_len * sizeof typevec[0]);
|
||||
bzero ((char *) typevec, typevec_len * sizeof typevec[0]);
|
||||
|
||||
/* Convert Ltext into the appropriate format for local labels in case
|
||||
the system doesn't insert underscores in front of user generated
|
||||
@ -940,8 +940,10 @@ dbxout_type (type, full, show_arg_types)
|
||||
|
||||
if (next_type_number == typevec_len)
|
||||
{
|
||||
typevec = (enum typestatus *) xrealloc (typevec, typevec_len * 2 * sizeof typevec[0]);
|
||||
bzero (typevec + typevec_len, typevec_len * sizeof typevec[0]);
|
||||
int len = typevec_len * 2 * sizeof typevec[0];
|
||||
|
||||
typevec = (enum typestatus *) xrealloc (typevec, len);
|
||||
bzero ((char *) (typevec + typevec_len), len);
|
||||
typevec_len *= 2;
|
||||
}
|
||||
}
|
||||
|
@ -501,8 +501,9 @@ gen_reg_rtx (mode)
|
||||
regno_pointer_flag = new;
|
||||
|
||||
new1 = (rtx *) oballoc (regno_pointer_flag_length * 2 * sizeof (rtx));
|
||||
bcopy (regno_reg_rtx, new1, regno_pointer_flag_length * sizeof (rtx));
|
||||
bzero (&new1[regno_pointer_flag_length],
|
||||
bcopy ((char *) regno_reg_rtx, (char *) new1,
|
||||
regno_pointer_flag_length * sizeof (rtx));
|
||||
bzero ((char *) &new1[regno_pointer_flag_length],
|
||||
regno_pointer_flag_length * sizeof (rtx));
|
||||
regno_reg_rtx = new1;
|
||||
|
||||
@ -1523,8 +1524,9 @@ copy_rtx_if_shared (orig)
|
||||
register rtx copy;
|
||||
|
||||
copy = rtx_alloc (code);
|
||||
bcopy (x, copy, (sizeof (*copy) - sizeof (copy->fld)
|
||||
+ sizeof (copy->fld[0]) * GET_RTX_LENGTH (code)));
|
||||
bcopy ((char *) x, (char *) copy,
|
||||
(sizeof (*copy) - sizeof (copy->fld)
|
||||
+ sizeof (copy->fld[0]) * GET_RTX_LENGTH (code)));
|
||||
x = copy;
|
||||
copied = 1;
|
||||
}
|
||||
@ -3087,8 +3089,9 @@ restore_reg_data_1 (orig)
|
||||
bcopy (regno_pointer_flag, new, regno_pointer_flag_length);
|
||||
|
||||
new1 = (rtx *) oballoc (newlen * sizeof (rtx));
|
||||
bzero (new1, newlen * sizeof (rtx));
|
||||
bcopy (regno_reg_rtx, new1, regno_pointer_flag_length * sizeof (rtx));
|
||||
bzero ((char *) new1, newlen * sizeof (rtx));
|
||||
bcopy ((char *) regno_reg_rtx, (char *) new1,
|
||||
regno_pointer_flag_length * sizeof (rtx));
|
||||
|
||||
regno_pointer_flag = new;
|
||||
regno_reg_rtx = new1;
|
||||
@ -3166,7 +3169,7 @@ init_emit ()
|
||||
|
||||
regno_reg_rtx
|
||||
= (rtx *) oballoc (regno_pointer_flag_length * sizeof (rtx));
|
||||
bzero (regno_reg_rtx, regno_pointer_flag_length * sizeof (rtx));
|
||||
bzero ((char *) regno_reg_rtx, regno_pointer_flag_length * sizeof (rtx));
|
||||
|
||||
/* Put copies of all the virtual register rtx into regno_reg_rtx. */
|
||||
regno_reg_rtx[VIRTUAL_INCOMING_ARGS_REGNUM] = virtual_incoming_args_rtx;
|
||||
@ -3257,10 +3260,10 @@ init_emit_once (line_numbers)
|
||||
rtx tem = rtx_alloc (CONST_DOUBLE);
|
||||
union real_extract u;
|
||||
|
||||
bzero (&u, sizeof u); /* Zero any holes in a structure. */
|
||||
bzero ((char *) &u, sizeof u); /* Zero any holes in a structure. */
|
||||
u.d = i == 0 ? dconst0 : i == 1 ? dconst1 : dconst2;
|
||||
|
||||
bcopy (&u, &CONST_DOUBLE_LOW (tem), sizeof u);
|
||||
bcopy ((char *) &u, (char *) &CONST_DOUBLE_LOW (tem), sizeof u);
|
||||
CONST_DOUBLE_MEM (tem) = cc0_rtx;
|
||||
PUT_MODE (tem, mode);
|
||||
|
||||
|
@ -2116,8 +2116,10 @@ synth_mult (alg_out, t, cost_limit)
|
||||
best_alg is normally undefined, and this is a critical function. */
|
||||
alg_out->ops = best_alg->ops + 1;
|
||||
alg_out->cost = cost_limit;
|
||||
bcopy (best_alg->op, alg_out->op, alg_out->ops * sizeof *alg_out->op);
|
||||
bcopy (best_alg->log, alg_out->log, alg_out->ops * sizeof *alg_out->log);
|
||||
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);
|
||||
}
|
||||
|
||||
/* Perform a multiplication and return an rtx for the result.
|
||||
|
57
gcc/flow.c
57
gcc/flow.c
@ -808,29 +808,36 @@ life_analysis (f, nregs)
|
||||
allocate_for_life_analysis ();
|
||||
|
||||
reg_next_use = (rtx *) alloca (nregs * sizeof (rtx));
|
||||
bzero (reg_next_use, nregs * sizeof (rtx));
|
||||
bzero ((char *) reg_next_use, nregs * sizeof (rtx));
|
||||
|
||||
/* Set up several regset-vectors used internally within this function.
|
||||
Their meanings are documented above, with their declarations. */
|
||||
|
||||
basic_block_live_at_end = (regset *) alloca (n_basic_blocks * sizeof (regset));
|
||||
basic_block_live_at_end
|
||||
= (regset *) alloca (n_basic_blocks * sizeof (regset));
|
||||
|
||||
/* Don't use alloca since that leads to a crash rather than an error message
|
||||
if there isn't enough space.
|
||||
Don't use oballoc since we may need to allocate other things during
|
||||
this function on the temporary obstack. */
|
||||
tem = (regset) obstack_alloc (&flow_obstack, n_basic_blocks * regset_bytes);
|
||||
bzero (tem, n_basic_blocks * regset_bytes);
|
||||
init_regset_vector (basic_block_live_at_end, tem, n_basic_blocks, regset_bytes);
|
||||
bzero ((char *) tem, n_basic_blocks * regset_bytes);
|
||||
init_regset_vector (basic_block_live_at_end, tem,
|
||||
n_basic_blocks, regset_bytes);
|
||||
|
||||
basic_block_new_live_at_end = (regset *) alloca (n_basic_blocks * sizeof (regset));
|
||||
basic_block_new_live_at_end
|
||||
= (regset *) alloca (n_basic_blocks * sizeof (regset));
|
||||
tem = (regset) obstack_alloc (&flow_obstack, n_basic_blocks * regset_bytes);
|
||||
bzero (tem, n_basic_blocks * regset_bytes);
|
||||
init_regset_vector (basic_block_new_live_at_end, tem, n_basic_blocks, regset_bytes);
|
||||
bzero ((char *) tem, n_basic_blocks * regset_bytes);
|
||||
init_regset_vector (basic_block_new_live_at_end, tem,
|
||||
n_basic_blocks, regset_bytes);
|
||||
|
||||
basic_block_significant = (regset *) alloca (n_basic_blocks * sizeof (regset));
|
||||
basic_block_significant
|
||||
= (regset *) alloca (n_basic_blocks * sizeof (regset));
|
||||
tem = (regset) obstack_alloc (&flow_obstack, n_basic_blocks * regset_bytes);
|
||||
bzero (tem, n_basic_blocks * regset_bytes);
|
||||
init_regset_vector (basic_block_significant, tem, n_basic_blocks, regset_bytes);
|
||||
bzero ((char *) tem, n_basic_blocks * regset_bytes);
|
||||
init_regset_vector (basic_block_significant, tem,
|
||||
n_basic_blocks, regset_bytes);
|
||||
|
||||
/* Record which insns refer to any volatile memory
|
||||
or for any reason can't be deleted just because they are dead stores.
|
||||
@ -1035,10 +1042,10 @@ life_analysis (f, nregs)
|
||||
{
|
||||
/* Update the basic_block_live_at_start
|
||||
by propagation backwards through the block. */
|
||||
bcopy (basic_block_new_live_at_end[i],
|
||||
basic_block_live_at_end[i], regset_bytes);
|
||||
bcopy (basic_block_live_at_end[i],
|
||||
basic_block_live_at_start[i], regset_bytes);
|
||||
bcopy ((char *) basic_block_new_live_at_end[i],
|
||||
(char *) basic_block_live_at_end[i], regset_bytes);
|
||||
bcopy ((char *) basic_block_live_at_end[i],
|
||||
(char *) basic_block_live_at_start[i], regset_bytes);
|
||||
propagate_block (basic_block_live_at_start[i],
|
||||
basic_block_head[i], basic_block_end[i], 0,
|
||||
first_pass ? basic_block_significant[i]
|
||||
@ -1168,31 +1175,33 @@ allocate_for_life_analysis ()
|
||||
regset_bytes = regset_size * sizeof (*(regset)0);
|
||||
|
||||
reg_n_refs = (int *) oballoc (max_regno * sizeof (int));
|
||||
bzero (reg_n_refs, max_regno * sizeof (int));
|
||||
bzero ((char *) reg_n_refs, max_regno * sizeof (int));
|
||||
|
||||
reg_n_sets = (short *) oballoc (max_regno * sizeof (short));
|
||||
bzero (reg_n_sets, max_regno * sizeof (short));
|
||||
bzero ((char *) reg_n_sets, max_regno * sizeof (short));
|
||||
|
||||
reg_n_deaths = (short *) oballoc (max_regno * sizeof (short));
|
||||
bzero (reg_n_deaths, max_regno * sizeof (short));
|
||||
bzero ((char *) reg_n_deaths, max_regno * sizeof (short));
|
||||
|
||||
reg_live_length = (int *) oballoc (max_regno * sizeof (int));
|
||||
bzero (reg_live_length, max_regno * sizeof (int));
|
||||
bzero ((char *) reg_live_length, max_regno * sizeof (int));
|
||||
|
||||
reg_n_calls_crossed = (int *) oballoc (max_regno * sizeof (int));
|
||||
bzero (reg_n_calls_crossed, max_regno * sizeof (int));
|
||||
bzero ((char *) reg_n_calls_crossed, max_regno * sizeof (int));
|
||||
|
||||
reg_basic_block = (int *) oballoc (max_regno * sizeof (int));
|
||||
for (i = 0; i < max_regno; i++)
|
||||
reg_basic_block[i] = REG_BLOCK_UNKNOWN;
|
||||
|
||||
basic_block_live_at_start = (regset *) oballoc (n_basic_blocks * sizeof (regset));
|
||||
basic_block_live_at_start
|
||||
= (regset *) oballoc (n_basic_blocks * sizeof (regset));
|
||||
tem = (regset) oballoc (n_basic_blocks * regset_bytes);
|
||||
bzero (tem, n_basic_blocks * regset_bytes);
|
||||
init_regset_vector (basic_block_live_at_start, tem, n_basic_blocks, regset_bytes);
|
||||
bzero ((char *) tem, n_basic_blocks * regset_bytes);
|
||||
init_regset_vector (basic_block_live_at_start, tem,
|
||||
n_basic_blocks, regset_bytes);
|
||||
|
||||
regs_live_at_setjmp = (regset) oballoc (regset_bytes);
|
||||
bzero (regs_live_at_setjmp, regset_bytes);
|
||||
bzero ((char *) regs_live_at_setjmp, regset_bytes);
|
||||
}
|
||||
|
||||
/* Make each element of VECTOR point at a regset,
|
||||
@ -1294,7 +1303,7 @@ propagate_block (old, first, last, final, significant, bnum)
|
||||
|
||||
num_scratch = 0;
|
||||
maxlive = (regset) alloca (regset_bytes);
|
||||
bcopy (old, maxlive, regset_bytes);
|
||||
bcopy ((char *) old, (char *) maxlive, regset_bytes);
|
||||
regs_sometimes_live
|
||||
= (struct sometimes *) alloca (max_regno * sizeof (struct sometimes));
|
||||
|
||||
|
@ -339,7 +339,7 @@ mul_double (l1, h1, l2, h2, lv, hv)
|
||||
encode (arg1, l1, h1);
|
||||
encode (arg2, l2, h2);
|
||||
|
||||
bzero (prod, sizeof prod);
|
||||
bzero ((char *) prod, sizeof prod);
|
||||
|
||||
for (i = 0; i < MAX_SHORTS; i++)
|
||||
for (j = 0; j < MAX_SHORTS; j++)
|
||||
@ -595,10 +595,10 @@ div_and_round_double (code, uns,
|
||||
goto finish_up;
|
||||
}
|
||||
|
||||
bzero (quo, sizeof quo);
|
||||
bzero ((char *) quo, sizeof quo);
|
||||
|
||||
bzero (num, sizeof num); /* to zero 9th element */
|
||||
bzero (den, sizeof den);
|
||||
bzero ((char *) num, sizeof num); /* to zero 9th element */
|
||||
bzero ((char *) den, sizeof den);
|
||||
|
||||
encode (num, lnum, hnum);
|
||||
encode (den, lden, hden);
|
||||
@ -1837,7 +1837,8 @@ operand_equal_p (arg0, arg1, only_const)
|
||||
/* Detect when real constants are equal. */
|
||||
if (TREE_CODE (arg0) == TREE_CODE (arg1)
|
||||
&& TREE_CODE (arg0) == REAL_CST)
|
||||
return !bcmp (&TREE_REAL_CST (arg0), &TREE_REAL_CST (arg1),
|
||||
return !bcmp ((char *) &TREE_REAL_CST (arg0),
|
||||
(char *) &TREE_REAL_CST (arg1),
|
||||
sizeof (REAL_VALUE_TYPE));
|
||||
|
||||
if (only_const)
|
||||
|
@ -3085,7 +3085,7 @@ assign_parms (fndecl, second_time)
|
||||
}
|
||||
|
||||
parm_reg_stack_loc = (rtx *) oballoc (nparmregs * sizeof (rtx));
|
||||
bzero (parm_reg_stack_loc, nparmregs * sizeof (rtx));
|
||||
bzero ((char *) parm_reg_stack_loc, nparmregs * sizeof (rtx));
|
||||
|
||||
#ifdef INIT_CUMULATIVE_INCOMING_ARGS
|
||||
INIT_CUMULATIVE_INCOMING_ARGS (args_so_far, fntype, NULL_RTX);
|
||||
@ -3569,8 +3569,9 @@ assign_parms (fndecl, second_time)
|
||||
|
||||
nparmregs = regno + 5;
|
||||
new = (rtx *) oballoc (nparmregs * sizeof (rtx));
|
||||
bcopy (parm_reg_stack_loc, new, old_nparmregs * sizeof (rtx));
|
||||
bzero (new + old_nparmregs,
|
||||
bcopy ((char *) parm_reg_stack_loc, (char *) new,
|
||||
old_nparmregs * sizeof (rtx));
|
||||
bzero ((char *) (new + old_nparmregs),
|
||||
(nparmregs - old_nparmregs) * sizeof (rtx));
|
||||
parm_reg_stack_loc = new;
|
||||
}
|
||||
|
17
gcc/gcc.c
17
gcc/gcc.c
@ -1031,11 +1031,12 @@ read_specs (filename)
|
||||
= ((struct compiler *)
|
||||
xrealloc (compilers, (n_compilers + 2) * sizeof (struct compiler)));
|
||||
compilers[n_compilers].suffix = suffix;
|
||||
bzero (compilers[n_compilers].spec,
|
||||
bzero ((char *) compilers[n_compilers].spec,
|
||||
sizeof compilers[n_compilers].spec);
|
||||
compilers[n_compilers].spec[0] = spec;
|
||||
n_compilers++;
|
||||
bzero (&compilers[n_compilers], sizeof compilers[n_compilers]);
|
||||
bzero ((char *) &compilers[n_compilers],
|
||||
sizeof compilers[n_compilers]);
|
||||
}
|
||||
|
||||
if (*suffix == 0)
|
||||
@ -1526,7 +1527,8 @@ putenv (str)
|
||||
/* Add a new environment variable */
|
||||
environ = (char **) xmalloc (sizeof (char *) * (num_envs+2));
|
||||
*environ = str;
|
||||
bcopy (old_environ, environ+1, sizeof (char *) * (num_envs+1));
|
||||
bcopy ((char *) old_environ, (char *) (environ + 1),
|
||||
sizeof (char *) * (num_envs+1));
|
||||
|
||||
#endif /* VMS */
|
||||
}
|
||||
@ -3951,7 +3953,8 @@ main (argc, argv)
|
||||
This means one element containing 0s, as a terminator. */
|
||||
|
||||
compilers = (struct compiler *) xmalloc (sizeof default_compilers);
|
||||
bcopy (default_compilers, compilers, sizeof default_compilers);
|
||||
bcopy ((char *) default_compilers, (char *) compilers,
|
||||
sizeof default_compilers);
|
||||
n_compilers = n_default_compilers;
|
||||
|
||||
/* Read specs from a file if there is one. */
|
||||
@ -4054,7 +4057,7 @@ main (argc, argv)
|
||||
that correspond to the input files. */
|
||||
|
||||
outfiles = (char **) xmalloc (n_infiles * sizeof (char *));
|
||||
bzero (outfiles, n_infiles * sizeof (char *));
|
||||
bzero ((char *) outfiles, n_infiles * sizeof (char *));
|
||||
|
||||
/* Record which files were specified explicitly as link input. */
|
||||
|
||||
@ -4262,8 +4265,8 @@ lookup_compiler (name, length, language)
|
||||
language = cp->spec[0] + 1;
|
||||
new = (struct compiler *) xmalloc (sizeof (struct compiler));
|
||||
new->suffix = cp->suffix;
|
||||
bcopy (lookup_compiler (NULL_PTR, 0, language)->spec,
|
||||
new->spec, sizeof new->spec);
|
||||
bcopy ((char *) lookup_compiler (NULL_PTR, 0, language)->spec,
|
||||
(char *) new->spec, sizeof new->spec);
|
||||
return new;
|
||||
}
|
||||
/* A non-alias entry: return it. */
|
||||
|
@ -1883,7 +1883,7 @@ expand_units ()
|
||||
* sizeof (struct function_unit_op *));
|
||||
|
||||
for (unit = units, i = 0; unit; i += unit->num_opclasses, unit = unit->next)
|
||||
bcopy (unit_ops[unit->num], &op_array[i],
|
||||
bcopy ((char *) unit_ops[unit->num], (char *) &op_array[i],
|
||||
unit->num_opclasses * sizeof (struct function_unit_op *));
|
||||
|
||||
/* Compute the ready cost function for each unit by computing the
|
||||
@ -2425,7 +2425,7 @@ simplify_cond (exp, insn_code, insn_index)
|
||||
/* This lets us free all storage allocated below, if appropriate. */
|
||||
first_spacer = (char *) obstack_finish (rtl_obstack);
|
||||
|
||||
bcopy (&XVECEXP (exp, 0, 0), tests, len * sizeof (rtx));
|
||||
bcopy ((char *) &XVECEXP (exp, 0, 0), (char *) tests, len * sizeof (rtx));
|
||||
|
||||
/* See if default value needs simplification. */
|
||||
if (GET_CODE (defval) == COND)
|
||||
@ -2517,7 +2517,8 @@ simplify_cond (exp, insn_code, insn_index)
|
||||
rtx newexp = rtx_alloc (COND);
|
||||
|
||||
XVEC (newexp, 0) = rtvec_alloc (len);
|
||||
bcopy (tests, &XVECEXP (newexp, 0, 0), len * sizeof (rtx));
|
||||
bcopy ((char *) tests, (char *) &XVECEXP (newexp, 0, 0),
|
||||
len * sizeof (rtx));
|
||||
XEXP (newexp, 1) = new_defval;
|
||||
return newexp;
|
||||
}
|
||||
@ -3301,8 +3302,9 @@ optimize_attrs ()
|
||||
insn_code_values
|
||||
= (struct attr_value_list **) alloca ((insn_code_number + 2)
|
||||
* sizeof (struct attr_value_list *));
|
||||
bzero (insn_code_values,
|
||||
bzero ((char *) insn_code_values,
|
||||
(insn_code_number + 2) * sizeof (struct attr_value_list *));
|
||||
|
||||
/* Offset the table address so we can index by -2 or -1. */
|
||||
insn_code_values += 2;
|
||||
|
||||
@ -5436,7 +5438,7 @@ copy_rtx_unchanging (orig)
|
||||
PUT_MODE (copy, GET_MODE (orig));
|
||||
RTX_UNCHANGING_P (copy) = 1;
|
||||
|
||||
bcopy (&XEXP (orig, 0), &XEXP (copy, 0),
|
||||
bcopy ((char *) &XEXP (orig, 0), (char *) &XEXP (copy, 0),
|
||||
GET_RTX_LENGTH (GET_CODE (copy)) * sizeof (rtx));
|
||||
return copy;
|
||||
#endif
|
||||
|
32
gcc/global.c
32
gcc/global.c
@ -364,7 +364,7 @@ global_alloc (file)
|
||||
/* Initialize the shared-hard-reg mapping
|
||||
from the list of pairs that may share. */
|
||||
reg_may_share = (int *) alloca (max_regno * sizeof (int));
|
||||
bzero (reg_may_share, max_regno * sizeof (int));
|
||||
bzero ((char *) reg_may_share, max_regno * sizeof (int));
|
||||
for (x = regs_may_share; x; x = XEXP (XEXP (x, 1), 1))
|
||||
{
|
||||
int r1 = REGNO (XEXP (x, 0));
|
||||
@ -400,10 +400,10 @@ global_alloc (file)
|
||||
allocno_calls_crossed = (int *) alloca (max_allocno * sizeof (int));
|
||||
allocno_n_refs = (int *) alloca (max_allocno * sizeof (int));
|
||||
allocno_live_length = (int *) alloca (max_allocno * sizeof (int));
|
||||
bzero (allocno_size, max_allocno * sizeof (int));
|
||||
bzero (allocno_calls_crossed, max_allocno * sizeof (int));
|
||||
bzero (allocno_n_refs, max_allocno * sizeof (int));
|
||||
bzero (allocno_live_length, max_allocno * sizeof (int));
|
||||
bzero ((char *) allocno_size, max_allocno * sizeof (int));
|
||||
bzero ((char *) allocno_calls_crossed, max_allocno * sizeof (int));
|
||||
bzero ((char *) allocno_n_refs, max_allocno * sizeof (int));
|
||||
bzero ((char *) allocno_live_length, max_allocno * sizeof (int));
|
||||
|
||||
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
|
||||
if (reg_allocno[i] >= 0)
|
||||
@ -420,8 +420,8 @@ global_alloc (file)
|
||||
/* Calculate amount of usage of each hard reg by pseudos
|
||||
allocated by local-alloc. This is to see if we want to
|
||||
override it. */
|
||||
bzero (local_reg_live_length, sizeof local_reg_live_length);
|
||||
bzero (local_reg_n_refs, sizeof local_reg_n_refs);
|
||||
bzero ((char *) local_reg_live_length, sizeof local_reg_live_length);
|
||||
bzero ((char *) local_reg_n_refs, sizeof local_reg_n_refs);
|
||||
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
|
||||
if (reg_allocno[i] < 0 && reg_renumber[i] >= 0)
|
||||
{
|
||||
@ -446,30 +446,32 @@ global_alloc (file)
|
||||
|
||||
hard_reg_conflicts
|
||||
= (HARD_REG_SET *) alloca (max_allocno * sizeof (HARD_REG_SET));
|
||||
bzero (hard_reg_conflicts, max_allocno * sizeof (HARD_REG_SET));
|
||||
bzero ((char *) hard_reg_conflicts, max_allocno * sizeof (HARD_REG_SET));
|
||||
|
||||
hard_reg_preferences
|
||||
= (HARD_REG_SET *) alloca (max_allocno * sizeof (HARD_REG_SET));
|
||||
bzero (hard_reg_preferences, max_allocno * sizeof (HARD_REG_SET));
|
||||
bzero ((char *) hard_reg_preferences, max_allocno * sizeof (HARD_REG_SET));
|
||||
|
||||
hard_reg_copy_preferences
|
||||
= (HARD_REG_SET *) alloca (max_allocno * sizeof (HARD_REG_SET));
|
||||
bzero (hard_reg_copy_preferences, max_allocno * sizeof (HARD_REG_SET));
|
||||
bzero ((char *) hard_reg_copy_preferences,
|
||||
max_allocno * sizeof (HARD_REG_SET));
|
||||
|
||||
hard_reg_full_preferences
|
||||
= (HARD_REG_SET *) alloca (max_allocno * sizeof (HARD_REG_SET));
|
||||
bzero (hard_reg_full_preferences, max_allocno * sizeof (HARD_REG_SET));
|
||||
bzero ((char *) hard_reg_full_preferences,
|
||||
max_allocno * sizeof (HARD_REG_SET));
|
||||
|
||||
regs_someone_prefers
|
||||
= (HARD_REG_SET *) alloca (max_allocno * sizeof (HARD_REG_SET));
|
||||
bzero (regs_someone_prefers, max_allocno * sizeof (HARD_REG_SET));
|
||||
bzero ((char *) regs_someone_prefers, max_allocno * sizeof (HARD_REG_SET));
|
||||
|
||||
allocno_row_words = (max_allocno + INT_BITS - 1) / INT_BITS;
|
||||
|
||||
conflicts = (INT_TYPE *) alloca (max_allocno * allocno_row_words
|
||||
* sizeof (INT_TYPE));
|
||||
bzero (conflicts, max_allocno * allocno_row_words
|
||||
* sizeof (INT_TYPE));
|
||||
bzero ((char *) conflicts,
|
||||
max_allocno * allocno_row_words * sizeof (INT_TYPE));
|
||||
|
||||
allocnos_live = (INT_TYPE *) alloca (allocno_row_words * sizeof (INT_TYPE));
|
||||
|
||||
@ -604,7 +606,7 @@ global_conflicts ()
|
||||
|
||||
for (b = 0; b < n_basic_blocks; b++)
|
||||
{
|
||||
bzero (allocnos_live, allocno_row_words * sizeof (INT_TYPE));
|
||||
bzero ((char *) allocnos_live, allocno_row_words * sizeof (INT_TYPE));
|
||||
|
||||
/* Initialize table of registers currently live
|
||||
to the state at the beginning of this basic block.
|
||||
|
@ -242,7 +242,7 @@ initialize_for_inline (fndecl, min_labelno, max_labelno, max_reg, copy)
|
||||
+ current_function_uses_pic_offset_table * FUNCTION_FLAGS_USES_PIC_OFFSET_TABLE);
|
||||
|
||||
/* Clear out PARMDECL_MAP. It was allocated in the caller's frame. */
|
||||
bzero (parmdecl_map, max_parm_reg * sizeof (tree));
|
||||
bzero ((char *) parmdecl_map, max_parm_reg * sizeof (tree));
|
||||
arg_vector = rtvec_alloc (list_length (DECL_ARGUMENTS (fndecl)));
|
||||
|
||||
for (parms = DECL_ARGUMENTS (fndecl), i = 0;
|
||||
@ -465,8 +465,8 @@ save_for_inline_copying (fndecl)
|
||||
reg_map[i] = (rtx)obstack_copy (function_maybepermanent_obstack,
|
||||
regno_reg_rtx[i], len);
|
||||
|
||||
bcopy (reg_map + LAST_VIRTUAL_REGISTER + 1,
|
||||
regno_reg_rtx + LAST_VIRTUAL_REGISTER + 1,
|
||||
bcopy ((char *) (reg_map + LAST_VIRTUAL_REGISTER + 1),
|
||||
(char *) (regno_reg_rtx + LAST_VIRTUAL_REGISTER + 1),
|
||||
(max_reg - (LAST_VIRTUAL_REGISTER + 1)) * sizeof (rtx));
|
||||
|
||||
/* Likewise each label rtx must have a unique rtx as its copy. */
|
||||
@ -480,7 +480,7 @@ save_for_inline_copying (fndecl)
|
||||
/* Record the mapping of old insns to copied insns. */
|
||||
|
||||
insn_map = (rtx *) alloca (max_uid * sizeof (rtx));
|
||||
bzero (insn_map, max_uid * sizeof (rtx));
|
||||
bzero ((char *) insn_map, max_uid * sizeof (rtx));
|
||||
|
||||
/* Get the insn which signals the end of parameter setup code. */
|
||||
first_nonparm_insn = get_first_nonparm_insn ();
|
||||
@ -1060,8 +1060,9 @@ copy_for_inline (orig)
|
||||
/* Replace this rtx with a copy of itself. */
|
||||
|
||||
x = rtx_alloc (code);
|
||||
bcopy (orig, x, (sizeof (*x) - sizeof (x->fld)
|
||||
+ sizeof (x->fld[0]) * GET_RTX_LENGTH (code)));
|
||||
bcopy ((char *) orig, (char *) x,
|
||||
(sizeof (*x) - sizeof (x->fld)
|
||||
+ sizeof (x->fld[0]) * GET_RTX_LENGTH (code)));
|
||||
|
||||
/* Now scan the subexpressions recursively.
|
||||
We can store any replaced subexpressions directly into X
|
||||
@ -1306,13 +1307,13 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
|
||||
map->fndecl = fndecl;
|
||||
|
||||
map->reg_map = (rtx *) alloca (max_regno * sizeof (rtx));
|
||||
bzero (map->reg_map, max_regno * sizeof (rtx));
|
||||
bzero ((char *) map->reg_map, max_regno * sizeof (rtx));
|
||||
|
||||
map->label_map = (rtx *)alloca ((max_labelno - min_labelno) * sizeof (rtx));
|
||||
map->label_map -= min_labelno;
|
||||
|
||||
map->insn_map = (rtx *) alloca (INSN_UID (header) * sizeof (rtx));
|
||||
bzero (map->insn_map, INSN_UID (header) * sizeof (rtx));
|
||||
bzero ((char *) map->insn_map, INSN_UID (header) * sizeof (rtx));
|
||||
map->min_insnno = 0;
|
||||
map->max_insnno = INSN_UID (header);
|
||||
|
||||
@ -1335,11 +1336,13 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
|
||||
|
||||
map->const_equiv_map
|
||||
= (rtx *)alloca (map->const_equiv_map_size * sizeof (rtx));
|
||||
bzero (map->const_equiv_map, map->const_equiv_map_size * sizeof (rtx));
|
||||
bzero ((char *) map->const_equiv_map,
|
||||
map->const_equiv_map_size * sizeof (rtx));
|
||||
|
||||
map->const_age_map
|
||||
= (unsigned *)alloca (map->const_equiv_map_size * sizeof (unsigned));
|
||||
bzero (map->const_age_map, map->const_equiv_map_size * sizeof (unsigned));
|
||||
bzero ((char *) map->const_age_map,
|
||||
map->const_equiv_map_size * sizeof (unsigned));
|
||||
map->const_age = 0;
|
||||
|
||||
/* Record the current insn in case we have to set up pointers to frame
|
||||
|
@ -197,7 +197,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
|
||||
we make. */
|
||||
max_jump_chain = max_uid * 14 / 10;
|
||||
jump_chain = (rtx *) alloca (max_jump_chain * sizeof (rtx));
|
||||
bzero (jump_chain, max_jump_chain * sizeof (rtx));
|
||||
bzero ((char *) jump_chain, max_jump_chain * sizeof (rtx));
|
||||
|
||||
/* Mark the label each jump jumps to.
|
||||
Combine consecutive labels, and count uses of labels.
|
||||
@ -2082,7 +2082,7 @@ duplicate_loop_exit_test (loop_start)
|
||||
if (reg_map == 0)
|
||||
{
|
||||
reg_map = (rtx *) alloca (max_reg * sizeof (rtx));
|
||||
bzero (reg_map, max_reg * sizeof (rtx));
|
||||
bzero ((char *) reg_map, max_reg * sizeof (rtx));
|
||||
}
|
||||
|
||||
REG_LOOP_TEST_P (SET_DEST (set)) = 1;
|
||||
@ -4052,7 +4052,8 @@ thread_jumps (f, max_reg, flag_before_loop)
|
||||
bzero (modified_regs, max_reg * sizeof (char));
|
||||
modified_mem = 0;
|
||||
|
||||
bcopy (all_reset, same_regs, max_reg * sizeof (int));
|
||||
bcopy ((char *) all_reset, (char *) same_regs,
|
||||
max_reg * sizeof (int));
|
||||
num_same_regs = 0;
|
||||
|
||||
label = JUMP_LABEL (b1);
|
||||
|
@ -415,13 +415,14 @@ local_alloc ()
|
||||
|
||||
scratch_list_length = max_qty;
|
||||
scratch_list = (rtx *) xmalloc (scratch_list_length * sizeof (rtx));
|
||||
bzero (scratch_list, scratch_list_length * sizeof (rtx));
|
||||
bzero ((char *) scratch_list, scratch_list_length * sizeof (rtx));
|
||||
scratch_block = (int *) xmalloc (scratch_list_length * sizeof (int));
|
||||
bzero (scratch_block, scratch_list_length * sizeof (int));
|
||||
bzero ((char *) scratch_block, scratch_list_length * sizeof (int));
|
||||
scratch_index = 0;
|
||||
|
||||
qty_phys_reg = (short *) alloca (max_qty * sizeof (short));
|
||||
qty_phys_copy_sugg = (HARD_REG_SET *) alloca (max_qty * sizeof (HARD_REG_SET));
|
||||
qty_phys_copy_sugg
|
||||
= (HARD_REG_SET *) alloca (max_qty * sizeof (HARD_REG_SET));
|
||||
qty_phys_num_copy_sugg = (short *) alloca (max_qty * sizeof (short));
|
||||
qty_phys_sugg = (HARD_REG_SET *) alloca (max_qty * sizeof (HARD_REG_SET));
|
||||
qty_phys_num_sugg = (short *) alloca (max_qty * sizeof (short));
|
||||
@ -430,10 +431,13 @@ local_alloc ()
|
||||
qty_scratch_rtx = (rtx *) alloca (max_qty * sizeof (rtx));
|
||||
qty_first_reg = (int *) alloca (max_qty * sizeof (int));
|
||||
qty_size = (int *) alloca (max_qty * sizeof (int));
|
||||
qty_mode = (enum machine_mode *) alloca (max_qty * sizeof (enum machine_mode));
|
||||
qty_mode
|
||||
= (enum machine_mode *) alloca (max_qty * sizeof (enum machine_mode));
|
||||
qty_n_calls_crossed = (int *) alloca (max_qty * sizeof (int));
|
||||
qty_min_class = (enum reg_class *) alloca (max_qty * sizeof (enum reg_class));
|
||||
qty_alternate_class = (enum reg_class *) alloca (max_qty * sizeof (enum reg_class));
|
||||
qty_min_class
|
||||
= (enum reg_class *) alloca (max_qty * sizeof (enum reg_class));
|
||||
qty_alternate_class
|
||||
= (enum reg_class *) alloca (max_qty * sizeof (enum reg_class));
|
||||
qty_n_refs = (int *) alloca (max_qty * sizeof (int));
|
||||
|
||||
reg_qty = (int *) alloca (max_regno * sizeof (int));
|
||||
@ -492,7 +496,7 @@ local_alloc ()
|
||||
else
|
||||
{
|
||||
#define CLEAR(vector) \
|
||||
bzero ((vector), (sizeof (*(vector))) * next_qty);
|
||||
bzero ((char *) (vector), (sizeof (*(vector))) * next_qty);
|
||||
|
||||
CLEAR (qty_scratch_rtx);
|
||||
CLEAR (qty_phys_copy_sugg);
|
||||
@ -937,8 +941,8 @@ update_equiv_regs ()
|
||||
rtx *reg_equiv_replacement = (rtx *) alloca (max_regno * sizeof (rtx *));
|
||||
rtx insn;
|
||||
|
||||
bzero (reg_equiv_init_insn, max_regno * sizeof (rtx *));
|
||||
bzero (reg_equiv_replacement, max_regno * sizeof (rtx *));
|
||||
bzero ((char *) reg_equiv_init_insn, max_regno * sizeof (rtx *));
|
||||
bzero ((char *) reg_equiv_replacement, max_regno * sizeof (rtx *));
|
||||
|
||||
init_alias_analysis ();
|
||||
|
||||
@ -1139,7 +1143,7 @@ block_alloc (b)
|
||||
the birth of a CLOBBER in the first insn. */
|
||||
regs_live_at = (HARD_REG_SET *) alloca ((2 * insn_count + 2)
|
||||
* sizeof (HARD_REG_SET));
|
||||
bzero (regs_live_at, (2 * insn_count + 2) * sizeof (HARD_REG_SET));
|
||||
bzero ((char *) regs_live_at, (2 * insn_count + 2) * sizeof (HARD_REG_SET));
|
||||
|
||||
/* Initialize table of hardware registers currently live. */
|
||||
|
||||
|
17
gcc/loop.c
17
gcc/loop.c
@ -361,8 +361,8 @@ loop_optimize (f, dumpfile)
|
||||
uid_luid = (int *) alloca (max_uid_for_loop * sizeof (int));
|
||||
uid_loop_num = (int *) alloca (max_uid_for_loop * sizeof (int));
|
||||
|
||||
bzero (uid_luid, max_uid_for_loop * sizeof (int));
|
||||
bzero (uid_loop_num, max_uid_for_loop * sizeof (int));
|
||||
bzero ((char *) uid_luid, max_uid_for_loop * sizeof (int));
|
||||
bzero ((char *) uid_loop_num, max_uid_for_loop * sizeof (int));
|
||||
|
||||
/* Allocate tables for recording each loop. We set each entry, so they need
|
||||
not be zeroed. */
|
||||
@ -573,13 +573,13 @@ scan_loop (loop_start, end, nregs)
|
||||
the setting of register I. If this loop has calls, set
|
||||
reg_single_usage[I]. */
|
||||
|
||||
bzero (n_times_set, nregs * sizeof (short));
|
||||
bzero ((char *) n_times_set, nregs * sizeof (short));
|
||||
bzero (may_not_optimize, nregs);
|
||||
|
||||
if (loop_has_call)
|
||||
{
|
||||
reg_single_usage = (rtx *) alloca (nregs * sizeof (rtx));
|
||||
bzero (reg_single_usage, nregs * sizeof (rtx));
|
||||
bzero ((char *) reg_single_usage, nregs * sizeof (rtx));
|
||||
}
|
||||
|
||||
count_loop_regs_set (loop_top ? loop_top : loop_start, end,
|
||||
@ -587,7 +587,7 @@ scan_loop (loop_start, end, nregs)
|
||||
|
||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||
may_not_optimize[i] = 1, n_times_set[i] = 1;
|
||||
bcopy (n_times_set, n_times_used, nregs * sizeof (short));
|
||||
bcopy ((char *) n_times_set, (char *) n_times_used, nregs * sizeof (short));
|
||||
|
||||
if (loop_dump_stream)
|
||||
{
|
||||
@ -1535,7 +1535,7 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs)
|
||||
char *already_moved = (char *) alloca (nregs);
|
||||
|
||||
bzero (already_moved, nregs);
|
||||
bzero (reg_map, nregs * sizeof (rtx));
|
||||
bzero ((char *) reg_map, nregs * sizeof (rtx));
|
||||
|
||||
num_movables = 0;
|
||||
|
||||
@ -2917,7 +2917,7 @@ count_loop_regs_set (from, to, may_not_move, single_usage, count_ptr, nregs)
|
||||
register int count = 0;
|
||||
register rtx dest;
|
||||
|
||||
bzero (last_set, nregs * sizeof (rtx));
|
||||
bzero ((char *) last_set, nregs * sizeof (rtx));
|
||||
for (insn = from; insn != to; insn = NEXT_INSN (insn))
|
||||
{
|
||||
if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
|
||||
@ -3004,8 +3004,9 @@ count_loop_regs_set (from, to, may_not_move, single_usage, count_ptr, nregs)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (GET_CODE (insn) == CODE_LABEL || GET_CODE (insn) == JUMP_INSN)
|
||||
bzero (last_set, nregs * sizeof (rtx));
|
||||
bzero ((char *) last_set, nregs * sizeof (rtx));
|
||||
}
|
||||
*count_ptr = count;
|
||||
}
|
||||
|
@ -51,8 +51,9 @@ debug_tree (node)
|
||||
tree node;
|
||||
{
|
||||
char *object = (char *) oballoc (0);
|
||||
|
||||
table = (struct bucket **) oballoc (HASH_SIZE * sizeof (struct bucket *));
|
||||
bzero (table, HASH_SIZE * sizeof (struct bucket *));
|
||||
bzero ((char *) table, HASH_SIZE * sizeof (struct bucket *));
|
||||
print_node (stderr, "", node, 0);
|
||||
table = 0;
|
||||
obfree (object);
|
||||
|
@ -417,7 +417,7 @@ REAL_VALUE_TYPE real_value_from_int_cst ();
|
||||
|
||||
#define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \
|
||||
do { union real_extract u; \
|
||||
bcopy (&CONST_DOUBLE_LOW ((from)), &u, sizeof u); \
|
||||
bcopy ((char *) &CONST_DOUBLE_LOW ((from)), (char *) &u, sizeof u); \
|
||||
to = u.d; } while (0)
|
||||
|
||||
/* Return a CONST_DOUBLE with value R and mode M. */
|
||||
|
@ -219,7 +219,7 @@ init_reg_sets ()
|
||||
|
||||
/* Compute number of hard regs in each class. */
|
||||
|
||||
bzero (reg_class_size, sizeof reg_class_size);
|
||||
bzero ((char *) reg_class_size, sizeof reg_class_size);
|
||||
for (i = 0; i < N_REG_CLASSES; i++)
|
||||
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
|
||||
if (TEST_HARD_REG_BIT (reg_class_contents[i], j))
|
||||
@ -702,7 +702,7 @@ regclass (f, nregs)
|
||||
{
|
||||
/* Zero out our accumulation of the cost of each class for each reg. */
|
||||
|
||||
bzero (costs, nregs * sizeof (struct costs));
|
||||
bzero ((char *) costs, nregs * sizeof (struct costs));
|
||||
|
||||
#ifdef FORBIDDEN_INC_DEC_CLASSES
|
||||
bzero (in_inc_dec, nregs);
|
||||
@ -1662,10 +1662,11 @@ reg_scan (f, nregs, repeat)
|
||||
= (short *) oballoc (highest_regno_in_uid_map * sizeof (short));
|
||||
}
|
||||
|
||||
bzero (regno_first_uid, highest_regno_in_uid_map * sizeof (int));
|
||||
bzero (regno_last_uid, highest_regno_in_uid_map * sizeof (int));
|
||||
bzero (regno_last_note_uid, highest_regno_in_uid_map * sizeof (int));
|
||||
bzero (reg_n_sets, highest_regno_in_uid_map * sizeof (short));
|
||||
bzero ((char *) regno_first_uid, highest_regno_in_uid_map * sizeof (int));
|
||||
bzero ((char *) regno_last_uid, highest_regno_in_uid_map * sizeof (int));
|
||||
bzero ((char *) regno_last_note_uid,
|
||||
highest_regno_in_uid_map * sizeof (int));
|
||||
bzero ((char *) reg_n_sets, highest_regno_in_uid_map * sizeof (short));
|
||||
|
||||
max_parallel = 3;
|
||||
|
||||
|
10
gcc/reload.c
10
gcc/reload.c
@ -671,7 +671,7 @@ get_secondary_mem (x, mode, opnum, type)
|
||||
void
|
||||
clear_secondary_mem ()
|
||||
{
|
||||
bzero (secondary_memlocs, sizeof secondary_memlocs);
|
||||
bzero ((char *) secondary_memlocs, sizeof secondary_memlocs);
|
||||
}
|
||||
#endif /* SECONDARY_MEMORY_NEEDED */
|
||||
|
||||
@ -2180,7 +2180,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
|
||||
/* The eliminated forms of any secondary memory locations are per-insn, so
|
||||
clear them out here. */
|
||||
|
||||
bzero (secondary_memlocs_elim, sizeof secondary_memlocs_elim);
|
||||
bzero ((char *) secondary_memlocs_elim, sizeof secondary_memlocs_elim);
|
||||
#endif
|
||||
|
||||
/* Find what kind of insn this is. NOPERANDS gets number of operands.
|
||||
@ -2231,7 +2231,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
|
||||
constraints, operand_mode);
|
||||
if (noperands > 0)
|
||||
{
|
||||
bcopy (constraints, constraints1, noperands * sizeof (char *));
|
||||
bcopy ((char *) constraints, (char *) constraints1,
|
||||
noperands * sizeof (char *));
|
||||
n_alternatives = n_occurrences (',', constraints[0]) + 1;
|
||||
for (i = 1; i < noperands; i++)
|
||||
if (n_alternatives != n_occurrences (',', constraints[i]) + 1)
|
||||
@ -3186,7 +3187,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
|
||||
pref_or_nothing[commutative] = pref_or_nothing[commutative + 1];
|
||||
pref_or_nothing[commutative + 1] = t;
|
||||
|
||||
bcopy (constraints1, constraints, noperands * sizeof (char *));
|
||||
bcopy ((char *) constraints1, (char *) constraints,
|
||||
noperands * sizeof (char *));
|
||||
goto try_swapped;
|
||||
}
|
||||
else
|
||||
|
@ -479,8 +479,8 @@ reload (first, global, dumpfile)
|
||||
bcopy (regs_ever_live, regs_explicitly_used, sizeof regs_ever_live);
|
||||
|
||||
/* We don't have a stack slot for any spill reg yet. */
|
||||
bzero (spill_stack_slot, sizeof spill_stack_slot);
|
||||
bzero (spill_stack_slot_width, sizeof spill_stack_slot_width);
|
||||
bzero ((char *) spill_stack_slot, sizeof spill_stack_slot);
|
||||
bzero ((char *) spill_stack_slot_width, sizeof spill_stack_slot_width);
|
||||
|
||||
/* Initialize the save area information for caller-save, in case some
|
||||
are needed. */
|
||||
@ -513,17 +513,17 @@ reload (first, global, dumpfile)
|
||||
be substituted eventually by altering the REG-rtx's. */
|
||||
|
||||
reg_equiv_constant = (rtx *) alloca (max_regno * sizeof (rtx));
|
||||
bzero (reg_equiv_constant, max_regno * sizeof (rtx));
|
||||
bzero ((char *) reg_equiv_constant, max_regno * sizeof (rtx));
|
||||
reg_equiv_memory_loc = (rtx *) alloca (max_regno * sizeof (rtx));
|
||||
bzero (reg_equiv_memory_loc, max_regno * sizeof (rtx));
|
||||
bzero ((char *) reg_equiv_memory_loc, max_regno * sizeof (rtx));
|
||||
reg_equiv_mem = (rtx *) alloca (max_regno * sizeof (rtx));
|
||||
bzero (reg_equiv_mem, max_regno * sizeof (rtx));
|
||||
bzero ((char *) reg_equiv_mem, max_regno * sizeof (rtx));
|
||||
reg_equiv_init = (rtx *) alloca (max_regno * sizeof (rtx));
|
||||
bzero (reg_equiv_init, max_regno * sizeof (rtx));
|
||||
bzero ((char *) reg_equiv_init, max_regno * sizeof (rtx));
|
||||
reg_equiv_address = (rtx *) alloca (max_regno * sizeof (rtx));
|
||||
bzero (reg_equiv_address, max_regno * sizeof (rtx));
|
||||
bzero ((char *) reg_equiv_address, max_regno * sizeof (rtx));
|
||||
reg_max_ref_width = (int *) alloca (max_regno * sizeof (int));
|
||||
bzero (reg_max_ref_width, max_regno * sizeof (int));
|
||||
bzero ((char *) reg_max_ref_width, max_regno * sizeof (int));
|
||||
cannot_omit_stores = (char *) alloca (max_regno);
|
||||
bzero (cannot_omit_stores, max_regno);
|
||||
|
||||
@ -711,7 +711,7 @@ reload (first, global, dumpfile)
|
||||
if (global)
|
||||
for (i = 0; i < N_REG_CLASSES; i++)
|
||||
{
|
||||
basic_block_needs[i] = (char *)alloca (n_basic_blocks);
|
||||
basic_block_needs[i] = (char *) alloca (n_basic_blocks);
|
||||
bzero (basic_block_needs[i], n_basic_blocks);
|
||||
}
|
||||
|
||||
@ -763,13 +763,13 @@ reload (first, global, dumpfile)
|
||||
static char *reg_class_names[] = REG_CLASS_NAMES;
|
||||
|
||||
something_changed = 0;
|
||||
bzero (max_needs, sizeof max_needs);
|
||||
bzero (max_groups, sizeof max_groups);
|
||||
bzero (max_nongroups, sizeof max_nongroups);
|
||||
bzero (max_needs_insn, sizeof max_needs_insn);
|
||||
bzero (max_groups_insn, sizeof max_groups_insn);
|
||||
bzero (max_nongroups_insn, sizeof max_nongroups_insn);
|
||||
bzero (group_size, sizeof group_size);
|
||||
bzero ((char *) max_needs, sizeof max_needs);
|
||||
bzero ((char *) max_groups, sizeof max_groups);
|
||||
bzero ((char *) max_nongroups, sizeof max_nongroups);
|
||||
bzero ((char *) max_needs_insn, sizeof max_needs_insn);
|
||||
bzero ((char *) max_groups_insn, sizeof max_groups_insn);
|
||||
bzero ((char *) max_nongroups_insn, sizeof max_nongroups_insn);
|
||||
bzero ((char *) group_size, sizeof group_size);
|
||||
for (i = 0; i < N_REG_CLASSES; i++)
|
||||
group_mode[i] = VOIDmode;
|
||||
|
||||
@ -802,7 +802,7 @@ reload (first, global, dumpfile)
|
||||
|
||||
num_not_at_initial_offset = 0;
|
||||
|
||||
bzero (&offsets_known_at[get_first_label_num ()], num_labels);
|
||||
bzero ((char *) &offsets_known_at[get_first_label_num ()], num_labels);
|
||||
|
||||
/* Set a known offset for each forced label to be at the initial offset
|
||||
of each elimination. We do this because we assume that all
|
||||
@ -1020,7 +1020,7 @@ reload (first, global, dumpfile)
|
||||
continue;
|
||||
|
||||
something_needs_reloads = 1;
|
||||
bzero (&insn_needs, sizeof insn_needs);
|
||||
bzero ((char *) &insn_needs, sizeof insn_needs);
|
||||
|
||||
/* Count each reload once in every class
|
||||
containing the reload's own class. */
|
||||
@ -3060,9 +3060,9 @@ eliminate_regs (x, mem_mode, insn)
|
||||
if (new != XEXP (x, i) && ! copied)
|
||||
{
|
||||
rtx new_x = rtx_alloc (code);
|
||||
bcopy (x, new_x, (sizeof (*new_x) - sizeof (new_x->fld)
|
||||
+ (sizeof (new_x->fld[0])
|
||||
* GET_RTX_LENGTH (code))));
|
||||
bcopy ((char *) x, (char *) new_x,
|
||||
(sizeof (*new_x) - sizeof (new_x->fld)
|
||||
+ sizeof (new_x->fld[0]) * GET_RTX_LENGTH (code)));
|
||||
x = new_x;
|
||||
copied = 1;
|
||||
}
|
||||
@ -3081,9 +3081,10 @@ eliminate_regs (x, mem_mode, insn)
|
||||
if (! copied)
|
||||
{
|
||||
rtx new_x = rtx_alloc (code);
|
||||
bcopy (x, new_x, (sizeof (*new_x) - sizeof (new_x->fld)
|
||||
+ (sizeof (new_x->fld[0])
|
||||
* GET_RTX_LENGTH (code))));
|
||||
bcopy ((char *) x, (char *) new_x,
|
||||
(sizeof (*new_x) - sizeof (new_x->fld)
|
||||
+ (sizeof (new_x->fld[0])
|
||||
* GET_RTX_LENGTH (code))));
|
||||
x = new_x;
|
||||
copied = 1;
|
||||
}
|
||||
@ -3640,10 +3641,10 @@ reload_as_needed (first, live_known)
|
||||
rtx x;
|
||||
rtx after_call = 0;
|
||||
|
||||
bzero (spill_reg_rtx, sizeof spill_reg_rtx);
|
||||
bzero (spill_reg_store, sizeof spill_reg_store);
|
||||
bzero ((char *) spill_reg_rtx, sizeof spill_reg_rtx);
|
||||
bzero ((char *) spill_reg_store, sizeof spill_reg_store);
|
||||
reg_last_reload_reg = (rtx *) alloca (max_regno * sizeof (rtx));
|
||||
bzero (reg_last_reload_reg, max_regno * sizeof (rtx));
|
||||
bzero ((char *) reg_last_reload_reg, max_regno * sizeof (rtx));
|
||||
reg_has_output_reload = (char *) alloca (max_regno);
|
||||
for (i = 0; i < n_spills; i++)
|
||||
{
|
||||
@ -4817,8 +4818,8 @@ choose_reload_regs (insn, avoid_return_reg)
|
||||
HARD_REG_SET save_reload_reg_used_at_all;
|
||||
|
||||
bzero (reload_inherited, MAX_RELOADS);
|
||||
bzero (reload_inheritance_insn, MAX_RELOADS * sizeof (rtx));
|
||||
bzero (reload_override_in, MAX_RELOADS * sizeof (rtx));
|
||||
bzero ((char *) reload_inheritance_insn, MAX_RELOADS * sizeof (rtx));
|
||||
bzero ((char *) reload_override_in, MAX_RELOADS * sizeof (rtx));
|
||||
|
||||
CLEAR_HARD_REG_SET (reload_reg_used);
|
||||
CLEAR_HARD_REG_SET (reload_reg_used_at_all);
|
||||
@ -4939,13 +4940,15 @@ choose_reload_regs (insn, avoid_return_reg)
|
||||
if (n_reloads > 1)
|
||||
qsort (reload_order, n_reloads, sizeof (short), reload_reg_class_lower);
|
||||
|
||||
bcopy (reload_reg_rtx, save_reload_reg_rtx, sizeof reload_reg_rtx);
|
||||
bcopy ((char *) reload_reg_rtx, (char *) save_reload_reg_rtx,
|
||||
sizeof reload_reg_rtx);
|
||||
bcopy (reload_inherited, save_reload_inherited, sizeof reload_inherited);
|
||||
bcopy (reload_inheritance_insn, save_reload_inheritance_insn,
|
||||
bcopy ((char *) reload_inheritance_insn,
|
||||
(char *) save_reload_inheritance_insn,
|
||||
sizeof reload_inheritance_insn);
|
||||
bcopy (reload_override_in, save_reload_override_in,
|
||||
bcopy ((char *) reload_override_in, (char *) save_reload_override_in,
|
||||
sizeof reload_override_in);
|
||||
bcopy (reload_spill_index, save_reload_spill_index,
|
||||
bcopy ((char *) reload_spill_index, (char *) save_reload_spill_index,
|
||||
sizeof reload_spill_index);
|
||||
COPY_HARD_REG_SET (save_reload_reg_used, reload_reg_used);
|
||||
COPY_HARD_REG_SET (save_reload_reg_used_at_all, reload_reg_used_at_all);
|
||||
@ -5312,13 +5315,16 @@ choose_reload_regs (insn, avoid_return_reg)
|
||||
/* Loop around and try without any inheritance. */
|
||||
/* First undo everything done by the failed attempt
|
||||
to allocate with inheritance. */
|
||||
bcopy (save_reload_reg_rtx, reload_reg_rtx, sizeof reload_reg_rtx);
|
||||
bcopy (save_reload_inherited, reload_inherited, sizeof reload_inherited);
|
||||
bcopy (save_reload_inheritance_insn, reload_inheritance_insn,
|
||||
bcopy ((char *) save_reload_reg_rtx, (char *) reload_reg_rtx,
|
||||
sizeof reload_reg_rtx);
|
||||
bcopy ((char *) save_reload_inherited, (char *) reload_inherited,
|
||||
sizeof reload_inherited);
|
||||
bcopy ((char *) save_reload_inheritance_insn,
|
||||
(char *) reload_inheritance_insn,
|
||||
sizeof reload_inheritance_insn);
|
||||
bcopy (save_reload_override_in, reload_override_in,
|
||||
bcopy ((char *) save_reload_override_in, (char *) reload_override_in,
|
||||
sizeof reload_override_in);
|
||||
bcopy (save_reload_spill_index, reload_spill_index,
|
||||
bcopy ((char *) save_reload_spill_index, (char *) reload_spill_index,
|
||||
sizeof reload_spill_index);
|
||||
COPY_HARD_REG_SET (reload_reg_used, save_reload_reg_used);
|
||||
COPY_HARD_REG_SET (reload_reg_used_at_all, save_reload_reg_used_at_all);
|
||||
|
52
gcc/sched.c
52
gcc/sched.c
@ -407,14 +407,14 @@ init_alias_analysis ()
|
||||
reg_known_value
|
||||
= (rtx *) oballoc ((maxreg-FIRST_PSEUDO_REGISTER) * sizeof (rtx))
|
||||
- FIRST_PSEUDO_REGISTER;
|
||||
bzero (reg_known_value+FIRST_PSEUDO_REGISTER,
|
||||
bzero ((char *) (reg_known_value + FIRST_PSEUDO_REGISTER),
|
||||
(maxreg-FIRST_PSEUDO_REGISTER) * sizeof (rtx));
|
||||
|
||||
reg_known_equiv_p
|
||||
= (char *) oballoc ((maxreg-FIRST_PSEUDO_REGISTER) * sizeof (char))
|
||||
= (char *) oballoc ((maxreg -FIRST_PSEUDO_REGISTER) * sizeof (char))
|
||||
- FIRST_PSEUDO_REGISTER;
|
||||
bzero (reg_known_equiv_p+FIRST_PSEUDO_REGISTER,
|
||||
(maxreg-FIRST_PSEUDO_REGISTER) * sizeof (char));
|
||||
bzero (reg_known_equiv_p + FIRST_PSEUDO_REGISTER,
|
||||
(maxreg - FIRST_PSEUDO_REGISTER) * sizeof (char));
|
||||
|
||||
/* Fill in the entries with known constant values. */
|
||||
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
|
||||
@ -1170,9 +1170,9 @@ static int unit_n_insns[FUNCTION_UNITS_SIZE];
|
||||
static void
|
||||
clear_units ()
|
||||
{
|
||||
bzero (unit_last_insn, sizeof (unit_last_insn));
|
||||
bzero (unit_tick, sizeof (unit_tick));
|
||||
bzero (unit_n_insns, sizeof (unit_n_insns));
|
||||
bzero ((char *) unit_last_insn, sizeof (unit_last_insn));
|
||||
bzero ((char *) unit_tick, sizeof (unit_tick));
|
||||
bzero ((char *) unit_n_insns, sizeof (unit_n_insns));
|
||||
}
|
||||
|
||||
/* Record an insn as one that will use the units encoded by UNIT. */
|
||||
@ -3088,11 +3088,11 @@ schedule_block (b, file)
|
||||
|
||||
i = max_reg_num ();
|
||||
reg_last_uses = (rtx *) alloca (i * sizeof (rtx));
|
||||
bzero (reg_last_uses, i * sizeof (rtx));
|
||||
bzero ((char *) reg_last_uses, i * sizeof (rtx));
|
||||
reg_last_sets = (rtx *) alloca (i * sizeof (rtx));
|
||||
bzero (reg_last_sets, i * sizeof (rtx));
|
||||
bzero ((char *) reg_last_sets, i * sizeof (rtx));
|
||||
reg_pending_sets = (regset) alloca (regset_bytes);
|
||||
bzero (reg_pending_sets, regset_bytes);
|
||||
bzero ((char *) reg_pending_sets, regset_bytes);
|
||||
reg_pending_sets_all = 0;
|
||||
clear_units ();
|
||||
|
||||
@ -3327,8 +3327,9 @@ schedule_block (b, file)
|
||||
|
||||
if (reload_completed == 0)
|
||||
{
|
||||
bcopy (basic_block_live_at_start[b], bb_live_regs, regset_bytes);
|
||||
bzero (bb_dead_regs, regset_bytes);
|
||||
bcopy ((char *) basic_block_live_at_start[b], (char *) bb_live_regs,
|
||||
regset_bytes);
|
||||
bzero ((char *) bb_dead_regs, regset_bytes);
|
||||
|
||||
if (b == 0)
|
||||
{
|
||||
@ -3568,7 +3569,7 @@ schedule_block (b, file)
|
||||
|
||||
/* Q_SIZE will always be zero here. */
|
||||
q_ptr = 0; clock = 0;
|
||||
bzero (insn_queue, sizeof (insn_queue));
|
||||
bzero ((char *) insn_queue, sizeof (insn_queue));
|
||||
|
||||
/* Now, perform list scheduling. */
|
||||
|
||||
@ -4627,9 +4628,10 @@ schedule_insns (dump_file)
|
||||
sched_reg_live_length = (int *) alloca (max_regno * sizeof (int));
|
||||
bb_dead_regs = (regset) alloca (regset_bytes);
|
||||
bb_live_regs = (regset) alloca (regset_bytes);
|
||||
bzero (sched_reg_n_calls_crossed, max_regno * sizeof (int));
|
||||
bzero (sched_reg_live_length, max_regno * sizeof (int));
|
||||
bcopy (reg_n_deaths, sched_reg_n_deaths, max_regno * sizeof (short));
|
||||
bzero ((char *) sched_reg_n_calls_crossed, max_regno * sizeof (int));
|
||||
bzero ((char *) sched_reg_live_length, max_regno * sizeof (int));
|
||||
bcopy ((char *) reg_n_deaths, (char *) sched_reg_n_deaths,
|
||||
max_regno * sizeof (short));
|
||||
init_alias_analysis ();
|
||||
}
|
||||
else
|
||||
@ -4648,9 +4650,9 @@ schedule_insns (dump_file)
|
||||
rtx line;
|
||||
|
||||
line_note = (rtx *) alloca (max_uid * sizeof (rtx));
|
||||
bzero (line_note, max_uid * sizeof (rtx));
|
||||
bzero ((char *) line_note, max_uid * sizeof (rtx));
|
||||
line_note_head = (rtx *) alloca (n_basic_blocks * sizeof (rtx));
|
||||
bzero (line_note_head, n_basic_blocks * sizeof (rtx));
|
||||
bzero ((char *) line_note_head, n_basic_blocks * sizeof (rtx));
|
||||
|
||||
/* Determine the line-number at the start of each basic block.
|
||||
This must be computed and saved now, because after a basic block's
|
||||
@ -4666,13 +4668,13 @@ schedule_insns (dump_file)
|
||||
}
|
||||
}
|
||||
|
||||
bzero (insn_luid, max_uid * sizeof (int));
|
||||
bzero (insn_priority, max_uid * sizeof (int));
|
||||
bzero (insn_tick, max_uid * sizeof (int));
|
||||
bzero (insn_costs, max_uid * sizeof (short));
|
||||
bzero (insn_units, max_uid * sizeof (short));
|
||||
bzero (insn_blockage, max_uid * sizeof (unsigned int));
|
||||
bzero (insn_ref_count, max_uid * sizeof (int));
|
||||
bzero ((char *) insn_luid, max_uid * sizeof (int));
|
||||
bzero ((char *) insn_priority, max_uid * sizeof (int));
|
||||
bzero ((char *) insn_tick, max_uid * sizeof (int));
|
||||
bzero ((char *) insn_costs, max_uid * sizeof (short));
|
||||
bzero ((char *) insn_units, max_uid * sizeof (short));
|
||||
bzero ((char *) insn_blockage, max_uid * sizeof (unsigned int));
|
||||
bzero ((char *) insn_ref_count, max_uid * sizeof (int));
|
||||
|
||||
/* Schedule each basic block, block by block. */
|
||||
|
||||
|
@ -4527,7 +4527,7 @@ expand_end_case (orig_index)
|
||||
|
||||
ncases = TREE_INT_CST_LOW (range) + 1;
|
||||
labelvec = (rtx *) alloca (ncases * sizeof (rtx));
|
||||
bzero (labelvec, ncases * sizeof (rtx));
|
||||
bzero ((char *) labelvec, ncases * sizeof (rtx));
|
||||
|
||||
for (n = thiscase->data.case_stmt.case_list; n; n = n->right)
|
||||
{
|
||||
@ -4756,7 +4756,7 @@ estimate_case_costs (node)
|
||||
if (cost_table == NULL)
|
||||
{
|
||||
cost_table = ((short *) xmalloc (129 * sizeof (short))) + 1;
|
||||
bzero (cost_table - 1, 129 * sizeof (short));
|
||||
bzero ((char *) (cost_table - 1), 129 * sizeof (short));
|
||||
|
||||
for (i = 0; i < 128; i++)
|
||||
{
|
||||
|
@ -149,13 +149,13 @@ stupid_life_analysis (f, nregs, file)
|
||||
/* Allocate tables to record info about regs. */
|
||||
|
||||
reg_where_dead = (int *) alloca (nregs * sizeof (int));
|
||||
bzero (reg_where_dead, nregs * sizeof (int));
|
||||
bzero ((char *) reg_where_dead, nregs * sizeof (int));
|
||||
|
||||
reg_where_born = (int *) alloca (nregs * sizeof (int));
|
||||
bzero (reg_where_born, nregs * sizeof (int));
|
||||
bzero ((char *) reg_where_born, nregs * sizeof (int));
|
||||
|
||||
reg_order = (int *) alloca (nregs * sizeof (int));
|
||||
bzero (reg_order, nregs * sizeof (int));
|
||||
bzero ((char *) reg_order, nregs * sizeof (int));
|
||||
|
||||
reg_renumber = (short *) oballoc (nregs * sizeof (short));
|
||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||
@ -167,7 +167,7 @@ stupid_life_analysis (f, nregs, file)
|
||||
after_insn_hard_regs
|
||||
= (HARD_REG_SET *) alloca (max_suid * sizeof (HARD_REG_SET));
|
||||
|
||||
bzero (after_insn_hard_regs, max_suid * sizeof (HARD_REG_SET));
|
||||
bzero ((char *) after_insn_hard_regs, max_suid * sizeof (HARD_REG_SET));
|
||||
|
||||
/* Allocate and zero out many data structures
|
||||
that will record the data from lifetime analysis. */
|
||||
|
13
gcc/toplev.c
13
gcc/toplev.c
@ -1798,7 +1798,7 @@ set_float_handler (handler)
|
||||
{
|
||||
float_handled = (handler != 0);
|
||||
if (handler)
|
||||
bcopy (handler, float_handler, sizeof (float_handler));
|
||||
bcopy ((char *) handler, (char *) float_handler, sizeof (float_handler));
|
||||
}
|
||||
|
||||
/* Specify, in HANDLER, where to longjmp to when a floating arithmetic
|
||||
@ -1813,8 +1813,10 @@ push_float_handler (handler, old_handler)
|
||||
|
||||
float_handled = 1;
|
||||
if (was_handled)
|
||||
bcopy (float_handler, old_handler, sizeof (float_handler));
|
||||
bcopy (handler, float_handler, sizeof (float_handler));
|
||||
bcopy ((char *) float_handler, (char *) old_handler,
|
||||
sizeof (float_handler));
|
||||
|
||||
bcopy ((char *) handler, (char *) float_handler, sizeof (float_handler));
|
||||
return was_handled;
|
||||
}
|
||||
|
||||
@ -1828,7 +1830,7 @@ pop_float_handler (handled, handler)
|
||||
{
|
||||
float_handled = handled;
|
||||
if (handled)
|
||||
bcopy (handler, float_handler, sizeof (float_handler));
|
||||
bcopy ((char *) handler, (char *) float_handler, sizeof (float_handler));
|
||||
}
|
||||
|
||||
/* Signals actually come here. */
|
||||
@ -3877,6 +3879,9 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE!
|
||||
#ifndef VMS
|
||||
if (flag_print_mem)
|
||||
{
|
||||
#ifdef __alpha
|
||||
char *sbrk ();
|
||||
#endif
|
||||
char *lim = (char *) sbrk (0);
|
||||
|
||||
fprintf (stderr, "Data size %d.\n",
|
||||
|
@ -292,7 +292,7 @@ init_obstacks ()
|
||||
rtl_obstack = saveable_obstack = &permanent_obstack;
|
||||
|
||||
/* Init the hash table of identifiers. */
|
||||
bzero (hash_table, sizeof hash_table);
|
||||
bzero ((char *) hash_table, sizeof hash_table);
|
||||
}
|
||||
|
||||
void
|
||||
@ -812,11 +812,11 @@ init_tree_codes ()
|
||||
tree_code_type = (char **) xmalloc (sizeof (standard_tree_code_type));
|
||||
tree_code_length = (int *) xmalloc (sizeof (standard_tree_code_length));
|
||||
tree_code_name = (char **) xmalloc (sizeof (standard_tree_code_name));
|
||||
bcopy (standard_tree_code_type, tree_code_type,
|
||||
bcopy ((char *) standard_tree_code_type, (char *) tree_code_type,
|
||||
sizeof (standard_tree_code_type));
|
||||
bcopy (standard_tree_code_length, tree_code_length,
|
||||
bcopy ((char *) standard_tree_code_length, (char *) tree_code_length,
|
||||
sizeof (standard_tree_code_length));
|
||||
bcopy (standard_tree_code_name, tree_code_name,
|
||||
bcopy ((char *) standard_tree_code_name, (char *) tree_code_name,
|
||||
sizeof (standard_tree_code_name));
|
||||
}
|
||||
|
||||
|
19
gcc/unroll.c
19
gcc/unroll.c
@ -705,12 +705,12 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
|
||||
to access the splittable_regs[] and addr_combined_regs[] arrays. */
|
||||
|
||||
splittable_regs = (rtx *) alloca (maxregnum * sizeof (rtx));
|
||||
bzero (splittable_regs, maxregnum * sizeof (rtx));
|
||||
bzero ((char *) splittable_regs, maxregnum * sizeof (rtx));
|
||||
splittable_regs_updates = (int *) alloca (maxregnum * sizeof (int));
|
||||
bzero (splittable_regs_updates, maxregnum * sizeof (int));
|
||||
bzero ((char *) splittable_regs_updates, maxregnum * sizeof (int));
|
||||
addr_combined_regs
|
||||
= (struct induction **) alloca (maxregnum * sizeof (struct induction *));
|
||||
bzero (addr_combined_regs, maxregnum * sizeof (struct induction *));
|
||||
bzero ((char *) addr_combined_regs, maxregnum * sizeof (struct induction *));
|
||||
|
||||
/* If this loop requires exit tests when unrolled, check to see if we
|
||||
can precondition the loop so as to make the exit tests unnecessary.
|
||||
@ -913,9 +913,10 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
|
||||
emit_label_after (labels[unroll_number - i],
|
||||
PREV_INSN (loop_start));
|
||||
|
||||
bzero (map->insn_map, max_insnno * sizeof (rtx));
|
||||
bzero (map->const_equiv_map, maxregnum * sizeof (rtx));
|
||||
bzero (map->const_age_map, maxregnum * sizeof (unsigned));
|
||||
bzero ((char *) map->insn_map, max_insnno * sizeof (rtx));
|
||||
bzero ((char *) map->const_equiv_map, maxregnum * sizeof (rtx));
|
||||
bzero ((char *) map->const_age_map,
|
||||
maxregnum * sizeof (unsigned));
|
||||
map->const_age = 0;
|
||||
|
||||
for (j = 0; j < max_labelno; j++)
|
||||
@ -1050,9 +1051,9 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
|
||||
|
||||
for (i = 0; i < unroll_number; i++)
|
||||
{
|
||||
bzero (map->insn_map, max_insnno * sizeof (rtx));
|
||||
bzero (map->const_equiv_map, new_maxregnum * sizeof (rtx));
|
||||
bzero (map->const_age_map, new_maxregnum * sizeof (unsigned));
|
||||
bzero ((char *) map->insn_map, max_insnno * sizeof (rtx));
|
||||
bzero ((char *) map->const_equiv_map, new_maxregnum * sizeof (rtx));
|
||||
bzero ((char *) map->const_age_map, new_maxregnum * sizeof (unsigned));
|
||||
map->const_age = 0;
|
||||
|
||||
for (j = 0; j < max_labelno; j++)
|
||||
|
27
gcc/varasm.c
27
gcc/varasm.c
@ -1694,7 +1694,7 @@ assemble_real (d, mode)
|
||||
{
|
||||
error ("floating point trap outputting a constant");
|
||||
#ifdef REAL_IS_NOT_DOUBLE
|
||||
bzero (&d, sizeof d);
|
||||
bzero ((char *) &d, sizeof d);
|
||||
d = dconst0;
|
||||
#else
|
||||
d = 0;
|
||||
@ -1885,7 +1885,7 @@ immed_real_const_1 (d, mode)
|
||||
/* Detect special cases. */
|
||||
|
||||
/* Avoid REAL_VALUES_EQUAL here in order to distinguish minus zero. */
|
||||
if (!bcmp (&dconst0, &d, sizeof d))
|
||||
if (!bcmp ((char *) &dconst0, (char *) &d, sizeof d))
|
||||
return CONST0_RTX (mode);
|
||||
/* Check for NaN first, because some ports (specifically the i386) do not
|
||||
emit correct ieee-fp code by default, and thus will generate a core
|
||||
@ -1905,7 +1905,7 @@ immed_real_const_1 (d, mode)
|
||||
If one is found, return it. */
|
||||
|
||||
for (r = const_double_chain; r; r = CONST_DOUBLE_CHAIN (r))
|
||||
if (! bcmp (&CONST_DOUBLE_LOW (r), &u, sizeof u)
|
||||
if (! bcmp ((char *) &CONST_DOUBLE_LOW (r), (char *) &u, sizeof u)
|
||||
&& GET_MODE (r) == mode)
|
||||
return r;
|
||||
|
||||
@ -1921,7 +1921,7 @@ immed_real_const_1 (d, mode)
|
||||
rtl_in_saveable_obstack ();
|
||||
r = rtx_alloc (CONST_DOUBLE);
|
||||
PUT_MODE (r, mode);
|
||||
bcopy (&u, &CONST_DOUBLE_LOW (r), sizeof u);
|
||||
bcopy ((char *) &u, (char *) &CONST_DOUBLE_LOW (r), sizeof u);
|
||||
pop_obstacks ();
|
||||
|
||||
/* Don't touch const_double_chain in nested function; see force_const_mem.
|
||||
@ -2214,7 +2214,7 @@ compare_constant_1 (exp, p)
|
||||
return 0;
|
||||
strp = TREE_STRING_POINTER (exp);
|
||||
len = TREE_STRING_LENGTH (exp);
|
||||
if (bcmp (&TREE_STRING_LENGTH (exp), p,
|
||||
if (bcmp ((char *) &TREE_STRING_LENGTH (exp), p,
|
||||
sizeof TREE_STRING_LENGTH (exp)))
|
||||
return 0;
|
||||
p += sizeof TREE_STRING_LENGTH (exp);
|
||||
@ -2232,7 +2232,7 @@ compare_constant_1 (exp, p)
|
||||
int length = list_length (CONSTRUCTOR_ELTS (exp));
|
||||
tree type;
|
||||
|
||||
if (bcmp (&length, p, sizeof length))
|
||||
if (bcmp ((char *) &length, p, sizeof length))
|
||||
return 0;
|
||||
p += sizeof length;
|
||||
|
||||
@ -2242,7 +2242,7 @@ compare_constant_1 (exp, p)
|
||||
type = TREE_TYPE (exp);
|
||||
else
|
||||
type = 0;
|
||||
if (bcmp (&type, p, sizeof type))
|
||||
if (bcmp ((char *) &type, p, sizeof type))
|
||||
return 0;
|
||||
p += sizeof type;
|
||||
|
||||
@ -2250,7 +2250,7 @@ compare_constant_1 (exp, p)
|
||||
if (TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE)
|
||||
{
|
||||
int size = int_size_in_bytes (TREE_TYPE (exp));
|
||||
if (bcmp (&size, p, sizeof size))
|
||||
if (bcmp ((char *) &size, p, sizeof size))
|
||||
return 0;
|
||||
p += sizeof size;
|
||||
}
|
||||
@ -2266,7 +2266,7 @@ compare_constant_1 (exp, p)
|
||||
{
|
||||
tree zero = 0;
|
||||
|
||||
if (bcmp (&zero, p, sizeof zero))
|
||||
if (bcmp ((char *) &zero, p, sizeof zero))
|
||||
return 0;
|
||||
p += sizeof zero;
|
||||
}
|
||||
@ -2774,9 +2774,9 @@ init_const_rtx_hash_table ()
|
||||
const_rtx_sym_hash_table
|
||||
= ((struct pool_sym **)
|
||||
oballoc (MAX_RTX_HASH_TABLE * sizeof (struct pool_sym *)));
|
||||
bzero (const_rtx_hash_table,
|
||||
bzero ((char *) const_rtx_hash_table,
|
||||
MAX_RTX_HASH_TABLE * sizeof (struct constant_descriptor *));
|
||||
bzero (const_rtx_sym_hash_table,
|
||||
bzero ((char *) const_rtx_sym_hash_table,
|
||||
MAX_RTX_HASH_TABLE * sizeof (struct pool_sym *));
|
||||
|
||||
first_pool = last_pool = 0;
|
||||
@ -2852,7 +2852,8 @@ decode_rtx_const (mode, x, value)
|
||||
value->kind = RTX_DOUBLE;
|
||||
if (GET_MODE (x) != VOIDmode)
|
||||
value->mode = GET_MODE (x);
|
||||
bcopy (&CONST_DOUBLE_LOW (x), &value->un.du, sizeof value->un.du);
|
||||
bcopy ((char *) &CONST_DOUBLE_LOW (x),
|
||||
(char *) &value->un.du, sizeof value->un.du);
|
||||
break;
|
||||
|
||||
case CONST_INT:
|
||||
@ -3226,7 +3227,7 @@ output_constant_pool (fnname, fndecl)
|
||||
if (GET_CODE (x) != CONST_DOUBLE)
|
||||
abort ();
|
||||
|
||||
bcopy (&CONST_DOUBLE_LOW (x), &u, sizeof u);
|
||||
bcopy ((char *) &CONST_DOUBLE_LOW (x), (char *) &u, sizeof u);
|
||||
assemble_real (u.d, pool->mode);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user