User-space context switch and floating-point

Peter Grehan grehan at freebsd.org
Wed Mar 3 15:26:38 PST 2004


>>  Any opinions ? I noticed the alpha/sparc64 routines don't save FP.
> 
> You don't need to save floating point registers when saving the
> context from userland.

  But why is that any different from having to save non-volatile
integer registers ? For instance, on PPC, gp regs 14-31, and also
fp regs 14-31, need to be saved by the callee if used since they're
non-volatile across function calls.

> Look at the i386 thr_getcontext(); it only needs to save the FP
> control word.

  Yes, but I thought the i386 FP calling convention was that all
FP registers were volatile across calls, so all were preserved
by the callee.

later,

Peter.




More information about the freebsd-threads mailing list