From owner-freebsd-hackers Thu Aug 23 12: 4:37 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from temphost.dragondata.com (temphost.dragondata.com [63.167.131.128]) by hub.freebsd.org (Postfix) with ESMTP id 978D537B408 for ; Thu, 23 Aug 2001 12:04:33 -0700 (PDT) (envelope-from toasty@temphost.dragondata.com) Received: (from toasty@localhost) by temphost.dragondata.com (8.11.3/8.11.3) id f7NJ3i722007; Thu, 23 Aug 2001 14:03:44 -0500 (CDT) (envelope-from toasty) From: Kevin Day Message-Id: <200108231903.f7NJ3i722007@temphost.dragondata.com> Subject: Re: XMM[0-7] preserved across context switch? To: peter@wemm.org (Peter Wemm) Date: Thu, 23 Aug 2001 14:03:44 -0500 (CDT) Cc: dwmalone@maths.tcd.ie (David Malone), hackers@FreeBSD.ORG In-Reply-To: <20010823044124.12EE8380F@overcee.netplex.com.au> from "Peter Wemm" at Aug 22, 2001 09:41:24 PM X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 > Yes, but the question was "how is it preserved"? The SSE stuff works the > same as the FPU stuff in that it is switched lazily. See npxsave() and > where it is called. If a process "attaches" to the fpu, its state is kept > in the fpu the whole time. It is not extracted at context switch time. > So, we can be running a different process while the fpu/xmm stuff is holding > the original process's context. If the new process tries to use the SSE/fpu > stuff, a trap happens, we save the original process's context in the original > pcb and then give ownership to the new process. > > And for SMP, we handle it differently again. :-/ Ok, that's what I expected. Has anyone looked at using MOVDQA/MOVDQU or MOVNTDQ for faster bcopy/bzero routines? Someone at Intel suggested they may be faster than using the FPU regs.... -- Kevin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message