Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Oct 2003 16:45:49 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Daniel Eischen <eischen@vigrid.com>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libpthread/arch/amd64/amd64 context.S 
Message-ID:  <20031017234549.1568A2A7EA@canning.wemm.org>
In-Reply-To: <Pine.GSO.4.10.10310171558150.233-100000@pcnet5.pcnet.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031017234549.1568A2A7EA>