Subject: Re: bcopy
To: Trevor Blackwell <tlb@eecs.HARVARD.EDU>
From: Chris G Demetriou <Chris_G_Demetriou@BALVENIE.PDL.CS.CMU.EDU>
List: port-alpha
Date: 08/12/1995 16:00:05
> Here's a good bcopy. I looked at the GNU bcopy, but it turned out not
> be as efficient as I was hoping. Even with gcc-2.7.0, it made a lot of
> references to the stack. This one performs within 5 percent of the
> OSF1 libc bcopy. I tested it very thoroughly for correctness.

cool.

> The old one was actually incorrect, as overlapping source &
> destination regions were not copied correctly (you have to work
> backwards.)

actually, no, it was just fine, because kernel bcopy() isn't
guaranteed to do the "overlapping" case -- the kernel function
ovbopy() is supposed to be used for that one.

However, i'm willing to punt, and say that bcopy() should do the
overlapping case, too.  certainly, as time goes on, it's not unlikely
that more and more people think that kernel bcopy() should do
overlaps, and if it costs little or nothing...

thanks much; that was a few pages of assembly that i _didn't_ want to
write.  8-)



chris