Subject: Re: sc_fpregs: 64-bits for 64-bit mode?
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Castor Fu <castor@geocast.net>
List: port-mips
Date: 02/07/1999 13:31:46
> >I thought it would be better to leave those developing embedded systems
> >with the choice of sizes since they might be more memory constrained.
> 
> That's you, right?  If you do that, fine, but I guess you'd need your
> own emul and ident tag, or something.

Well, no, it's not necessarily me.  I'd like NetBSD to be easy for people
to do whatever they want with it without having to fork off their 
own distribution.    That increases the likelihood of others doing
embedded systems to contribute stuff back to NetBSD.

> >If we did this, would it be unreasonable to swap the positions of
> >sc_fpc_eir and sc_fpregs in the sigcontext struture so alignments
> >are preserved?
> 
> Yes, sounds like a good idea, except that it breaks binary
> compatiblity between kernel/userland `before' the change and `after'
> the change: old-kernel + new-userland or, new-kernel + old-userland
> curdle theFPU state -- even for the 32-bit world. `Yuck'.  (That's
> practical for you, but not really for NetBSD, not without a
> major-version bump).
> 
> Is the fpu CSR 32 or 64 bits wide in 64-bit FPU mode?
> Could we fix alignment by moving the CSR?

It's 32 bits wide in 64-bit mode.   So if the FSR were placed
at the front of fpregs rather than the rear, I suppose that would work,
but doesn't that still break userland compatibility, since these
structures are explicitly referenced by setjmp/longjmp?

	-castor