Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Dec 1998 13:37:05 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
Cc:        alpha@FreeBSD.ORG
Subject:   Re: fpsetmask
Message-ID:  <Pine.BSF.4.01.9812201330570.392-100000@herring.nlsystems.com>
In-Reply-To: <19981219093339Q.simokawa@sat.t.u-tokyo.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 19 Dec 1998, Hidetoshi Shimokawa wrote:

> 
>    Some ports (eg. tcl*) require fpsetmask for build. But it has not
> been implemented yet on alpha. First, I thought the exception mask can
> be specified by FP_CR register, but none of currently avaiable CPUs don't 
> seem to support the feature. Then I found the software completion is
> done in /sys/alpha/alpha/fp_emulate.c and we can specify the exception
> handing by setting proc->u_pcb.pcb_fp_control. My question is
> how I can set the variable, do we need a new system call for it?

I think we need to add access to fp_control to sysarch().  I thought about
this a lot when I was writing the software completion code.  On
Net/OpenBSD, programs using fpsetmask() use the include file <ieeefp.h>
which declares them.  FreeBSD/i386 uses <machine/floatingpoint.h> to
define some hairy asm macros to do the job.

I would like to add <ieeefp.h> which would declare fpXXX() and probably
implement the fpXXX() calls as functions in libc for i386.  There is some
code in libc/alpha (from NetBSD) which will implement most of the required
functions.  The ones that require software completion are currently
stubbed and should use sysarch() to manipulate the software control word.

We should then deprecate <machine/floatingpoint.h> and encourage programs
to use <ieeefp.h> to manipulate floating point state.  Some manpages would
be a good idea.

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 442 9037



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9812201330570.392-100000>