From owner-freebsd-hackers Thu Apr 11 6:51:34 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from nelly.internal.irrelevant.org (irrelevant.demon.co.uk [158.152.220.121]) by hub.freebsd.org (Postfix) with ESMTP id 132F037B416 for ; Thu, 11 Apr 2002 06:51:31 -0700 (PDT) Received: from simond by nelly.internal.irrelevant.org with local (Exim 3.35 #1) id 16veyn-0001hh-00; Thu, 11 Apr 2002 14:51:13 +0100 Date: Thu, 11 Apr 2002 14:51:13 +0100 From: Simon Dick To: Andrew Gallatin Cc: Denis Serenyi , freebsd-hackers@freebsd.org Subject: Re: SSE bcopy Message-ID: <20020411135113.GG2916@irrelevant.org> References: <15541.37586.404951.505010@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15541.37586.404951.505010@grasshopper.cs.duke.edu> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Apr 11, 2002 at 09:42:42AM -0400, Andrew Gallatin wrote: > > Denis Serenyi writes: > > I've been looking at adding an SSE bcopy that runs at user-level to a > > program that I'm working on. I'm using FreeBSD 4.3 currently. > > > > I wrote the routine, and when I execute it, I get an illegal instruction > > exception when I try to execute the first SSE instruction (movups). > > > > After searching the hackers archives, I'm guessing that this is because > > FreeBSD 4.3 does not execute the instructions at boot time to enable SSE > > instructions to be executed, and also because FreeBSD 4.3 does not save > > the 128-bit SIMD registers on context switches. > > > > Am I correct in this assessment? > > > > It also seems like this support has been added to FreeBSD 4.5. Is this > > correct? > > > > Assuming yes, in what release was SSE support added to FreeBSD? Has > > anyone done a patch that can be applied to FreeBSD 4.3, or are the > > changes non-trivial? > > > > As David says, have a look at > http://kobe1995.net/~kaz/FreeBSD/SSE.en.html There is a patch there > for 4.3. > > What are the performance implications to an SSE bcopy? How much > faster is it than a normal bcopy? > > Would you consider releasing your code under a BSD license so that > others could play with it, and possibly integrate it (or something > based on it) into FreeBSD? Also if he wants to check if OS SSE support is enabled, he can check if the hw.instruction_sse sysctl is set to 1, then he'll know if it's safe to use :) -- Simon Dick simond@irrelevant.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message