xref: /openbsd-src/lib/libarch/mips64/get_fpc_csr.3 (revision 4c1e55dc91edd6e69ccc60ce855900fbc12cf34f)
1.\"	$OpenBSD: get_fpc_csr.3,v 1.4 2010/09/26 15:12:03 jmc Exp $
2.\"
3.\" Copyright (c) 2010 Miodrag Vallat.
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: September 26 2010 $
18.Dt GET_FPC_CSR 3 mips64
19.Os
20.Sh NAME
21.Nm get_fpc_csr ,
22.Nm set_fpc_csr
23.Nd floating-point control register access
24.Sh SYNOPSIS
25.In machine/fpu.h
26.Ft int
27.Fn get_fpc_csr
28.Ft int
29.Fn set_fpc_csr "int csr"
30.Sh DESCRIPTION
31The
32.Fn get_fpc_csr
33function returns the curent value of the floating-point control register.
34The
35.Fn set_fpc_csr
36function replaces the value of the floating-point control register with
37.Fa csr
38and returns the previous value.
39.Pp
40These functions are provided for
41.Tn IRIX
42compatibility, and should only be used to control the value of the
43.Li FPCSR_FS
44bit in the floating-point control register.
45Portable code should use the
46.Xr fpgetmask 3 ,
47.Xr fpgetround 3 ,
48.Xr fpgetsticky 3 ,
49.Xr fpsetmask 3 ,
50.Xr fpsetround 3 ,
51and
52.Xr fpsetsticky 3
53functions to inquire or alter the floating-point control register.
54.Sh RETURN VALUES
55The
56.Fn get_fpc_csr
57and
58.Fn set_fpc_csr
59functions return the
60.Pq previous
61value of the floating-point control register.
62.Sh SEE ALSO
63.Xr fpgetmask 3
64