From owner-freebsd-hackers Wed Jan 24 02:36:39 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA17871 for hackers-outgoing; Wed, 24 Jan 1996 02:36:39 -0800 (PST) Received: from relay.hp.com (relay.hp.com [15.255.152.2]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id CAA17862 for ; Wed, 24 Jan 1996 02:36:34 -0800 (PST) Received: from fakir.india.hp.com by relay.hp.com with ESMTP (1.37.109.16/15.5+ECS 3.3) id AA240339651; Wed, 24 Jan 1996 02:34:18 -0800 Received: from localhost by fakir.india.hp.com with SMTP (1.37.109.16/15.5+ECS 3.3) id AA281999468; Wed, 24 Jan 1996 16:01:08 +0530 Message-Id: <199601241031.AA281999468@fakir.india.hp.com> To: asami@cs.berkeley.edu (Satoshi Asami) Cc: hackers@freebsd.org Subject: Re: Pentium bcopy In-Reply-To: Your message of "Wed, 24 Jan 1996 01:19:34 PST." <199601240919.BAA28229@silvia.HIP.Berkeley.EDU> Date: Wed, 24 Jan 1996 16:01:07 +0530 From: A JOSEPH KOSHY Sender: owner-hackers@freebsd.org Precedence: bulk >>> sa == Satoshi Asami said: sa> Does anyone know if there are any `gotchas' concerning the use of fp sa> regs in the kernel? Are the FPU registers saved and restored as part of interrupt handling? I'm not sure where to look but /usr/src/sys/i386/i386 doesn't seem to have code to do this. Am I looking at the wrong place? You would need to ensure this if you are using your FP-enabled bcopy from any interrupt routine. Blindly saving all FP registers when 'bcopy' is invoked has its own cost, so you probably need to use the FP registers method only if the amount of data to be copied is large. You may need to experiment and determine the best size to switch from regular bcopy to the FP version. Also you need to be sure that the FP registers are accessible. A machine with a 486SX or a plain 386 cannot use this technique. Indeed on a 387 the technique could even be slower than a rep movsl. Lots of tradeoffs here :). Koshy