2.9BSD/usr/man/man2/fperr.2

Compare this file to the similar file:
Show the results in this format:

.TH FPERR 2
.UC
.SH NAME
fperr \- get floating-point error registers
.SH SYNOPSIS
.B #include <sys/fperr.h>
.sp
.B fperr(fpe)
.br
.B struct fperr *fpe;
.SH DESCRIPTION
.I Fperr
returns the contents of the
floating-point processor's
error registers as they were
following the last floating exception
generated by the calling process.
The registers are stored in the
structure pointed to by
.IR fpe .
The structure defined in <sys/fperr.h>
is as follows:
.nf

.ta 8n +8n +8n +8n +8n +8n +8n +8n +8n +8n +8n
/*
 * Structure of the floating point error register save/return
 */

struct fperr
{
	short	f_fec;
	caddr_t	f_fea;
};
.DT
.fi
.PP
This call is required because the
error registers in the floating-point processor
are read-only.
Thus, they may be changed by some other
process between the time that
the current process generates an exception and the
time that it reads the registers.
Therefore, the system saves their state
at the time of an exception.
.PP
The values returned are
valid only after a floating-point
exception.
.SH SEE ALSO
Ed Gould, Jim Reeds, Vance Vaughan,
.I UNIX Problems with Floating Point Processors
.SH ASSEMBLER
.nf
(local = 58., fperr = 15.)
.B sys local; 9f
(fec in r0)
(fea in r1)
\&. . .
.B \&.data
.B 9: sys fperr
.fi