This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 9 bcopys (5 top dir, 4 cp dir), please help identify memmoves


 > From: Andreas Schwab <schwab@suse.de>
 > 
 > "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
 > 
 > |> cp/class.c:1220:	  bcopy ((PTR) &TREE_VEC_ELT (method_vec, 0),
 > 
 > This is clearly a memcpy.
 > 
 > |> cp/class.c:1259:	      bcopy ((PTR) &TREE_VEC_ELT (method_vec, slot),
 > 
 > And this one's a memmove.
 > 
 > |> cp/decl.c:3694:      bcopy ((char *) newdecl + sizeof (struct tree_common),
 > |> cp/decl.c:3732:      bcopy ((char *) newdecl + sizeof (struct tree_common),
 > 
 > Both are memcpy's.

Thanks, I submitted a patch for these.

Any thoughts on the top level directory calls?

I think that the combine.c, sbitmap.c and toplev.c are memcpy.  (In
fact, the entire function using bcopy in sbitmap.c (sbitmap_copy)
should probably be a macro defined simply as a call to memcpy.)

I'm not sure about the collect2.c or the genattrtab.c calls.

		--Kaveh

./collect2.c:3279:        bcopy ((char *) load_hdr, (char *) (obj + offset), size);
./combine.c:2031:         bcopy ((char *) &old->elem[0], (char *) XVEC (newpat, 0)->elem,
./genattrtab.c:2013:    bcopy ((char *) unit_ops[unit->num], (char *) &op_array[i],
./sbitmap.c:99:  bcopy ((PTR) src->elms, (PTR) dst->elms,
./toplev.c:1668:    bcopy ((char *) handler, (char *) float_handler, sizeof (float_handler));
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]