From owner-cvs-src@FreeBSD.ORG Fri Oct 17 16:45:50 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 86B8116A4B3; Fri, 17 Oct 2003 16:45:50 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3230743FCB; Fri, 17 Oct 2003 16:45:49 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 1568A2A7EA; Fri, 17 Oct 2003 16:45:49 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Daniel Eischen In-Reply-To: Date: Fri, 17 Oct 2003 16:45:49 -0700 From: Peter Wemm Message-Id: <20031017234549.1568A2A7EA@canning.wemm.org> 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 23:45:50 -0000 Daniel Eischen wrote: > 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). Aha! That would explain a few things. Thanks. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5