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