1.\" $OpenBSD: get_fpc_csr.3,v 1.7 2017/10/08 15:11:09 visa 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: October 8 2017 $ 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 void 28.Ft int 29.Fn set_fpc_csr "int csr" 30.Sh DESCRIPTION 31The 32.Fn get_fpc_csr 33function returns the current 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 IRIX compatibility, 41and should only be used to control the value of the 42.Li FPCSR_FS 43bit in the floating-point control register. 44Portable code should use the 45.Xr fpgetmask 3 , 46.Xr fpgetround 3 , 47.Xr fpgetsticky 3 , 48.Xr fpsetmask 3 , 49.Xr fpsetround 3 , 50and 51.Xr fpsetsticky 3 52functions to inquire or alter the floating-point control register. 53.Sh RETURN VALUES 54The 55.Fn get_fpc_csr 56and 57.Fn set_fpc_csr 58functions return the 59.Pq previous 60value of the floating-point control register. 61.Sh SEE ALSO 62.Xr fpgetmask 3 63