Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Nov 1995 12:35:24 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        phk@critter.tfs.com (Poul-Henning Kamp)
Cc:        hasty@rah.star-gate.com, koshy@blr.novell.com, freebsd-hackers@freebsd.org
Subject:   Re: Load/Store using FPU regs ...
Message-ID:  <199511091135.MAA08283@labinfo.iet.unipi.it>
In-Reply-To: <6539.815911372@critter.tfs.com> from "Poul-Henning Kamp" at Nov 9, 95 11:02:33 am

next in thread | previous in thread | raw e-mail | index | archive | help
> >  > > Not to mention that you might not have a FPU.
> >  > 
> >  > So what ? You still have the FPU emulator :)
> > 
> > Just ignore Pohl's comment we can probably figure out a clever way
> > to find out if we have a FPU . 
> sure, there's a flag in the kernel, and it's a sysctl var too.

I was just kidding, but the discussion has become serious!
One question: what is the behaviour of our FP library if there is not a
coprocessor: do we just trap into the emulator, or the code is
magically replaced (e.g. at the first execution) with a call to the
proper code ?

Anyways using the same technique here seems expensive: the code
should look like

	if (kern.have.fpu) {
		... fragment of code using FP regs
	} else {
		... fragment of code using standard techniques
	}

and I don't believe something like this can be done easily by the
compiler in a machine-independent way.

> The place to use it would be in the Copy-On-Write and Demand-Zero
> parts of the VM system.

If the scope is limited to such cases, then the kernel could include
appropriate code.

	Luigi
====================================================================
Luigi Rizzo                     Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it       Universita' di Pisa
tel: +39-50-568533              via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522              http://www.iet.unipi.it/~luigi/
====================================================================



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