From owner-cvs-src@FreeBSD.ORG Fri Oct 17 13:08:40 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4715016A4B3; Fri, 17 Oct 2003 13:08:40 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B5FD43FA3; Fri, 17 Oct 2003 13:08:39 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id h9HK8crq002337; Fri, 17 Oct 2003 16:08:38 -0400 (EDT) Date: Fri, 17 Oct 2003 16:08:38 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Peter Wemm In-Reply-To: <200310171630.h9HGU9i1017210@repoman.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libpthread/arch/amd64/amd64 context.S X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2003 20:08:40 -0000 On Fri, 17 Oct 2003, Peter Wemm wrote: > peter 2003/10/17 09:30:09 PDT > > FreeBSD src repository > > Modified files: > lib/libpthread/arch/amd64/amd64 context.S > Log: > Update context code for my last ABI breakage of mcontext. I'm worried > about the fpu code here. It should be using fxsave/fxrstor instead of > saving/restoring the control word. The SSE registers are used a lot in > gcc generated code on amd64. I'm not sure how this all fits together > though. FYI, the arch-dependent save context is called as a result of an explicit (e.g., pthread_yield) or implicit (e.g., blocking on a userland lock) context switch. You only need to save as many registers as you would for a _setjmp() as long as you mark the context appropriately (mc_flags, mc_fpformat, etc) and respect these in the restore context function. The MD restore context needs to be able to handle both contexts passed out from the kernel (needing full restores) and those generated from the save context function (perhaps allowing a more minimal restore). -- Dan Eischen