From owner-freebsd-hackers Fri Apr 3 07:48:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA19618 for freebsd-hackers-outgoing; Fri, 3 Apr 1998 07:48:15 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns.mt.sri.com (sri-gw.MT.net [206.127.105.141]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA19612 for ; Fri, 3 Apr 1998 07:48:08 -0800 (PST) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.8.8/8.8.8) with SMTP id IAA00855; Fri, 3 Apr 1998 08:47:50 -0700 (MST) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id IAA22090; Fri, 3 Apr 1998 08:47:46 -0700 Date: Fri, 3 Apr 1998 08:47:46 -0700 Message-Id: <199804031547.IAA22090@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Mikael Karpberg Cc: marquard@zilker.net (Dave Marquardt), freebsd-hackers@FreeBSD.ORG Subject: Re: bcopy implementation In-Reply-To: <199804031420.QAA05837@ocean.campus.luth.se> References: <857m57c8tr.fsf@localhost.zilker.net> <199804031420.QAA05837@ocean.campus.luth.se> X-Mailer: VM 6.29 under 19.15 XEmacs Lucid Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [ Pentium optimized bcopy in libc ] > > > of not implementing this method in libc? > > > > Well, you said it yourself. "On the assumption, that the system has > > pentium processor...." Well, we can't assume that, since FreeBSD runs > > on 386s and up. > > Well, if you want everything to go faster, you optimize for the hardware > you're actually gonna run on. People seem to be forgetting that since bcopy isn't a system call, it's possible to royally screw yourself up with it, since it uses the FP registers. So, one program could be in the middle of doing a bcopy, and a second program could interrupt it, and spam the registers of the previous program, so that when the first was resume it's results are totally bogus. (The kernel doesn't save the contents of the FP registers, but since all kernel calls are guaranteed to 'complete' before getting swapped, then this isn't a problem in kernel-land.) Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message