141 lines
3.8 KiB
HTML
141 lines
3.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of __SETFPUCW</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>__SETFPUCW</H1>
|
|
Section: Linux Programmer's Manual (3)<BR>Updated: 2017-09-15<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
__setfpucw - set FPU control word on i386 architecture (obsolete)
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>#include <<A HREF="file:///usr/include/i386/fpu_control.h">i386/fpu_control.h</A>></B>
|
|
|
|
<P>
|
|
|
|
<B>void __setfpucw(unsigned short </B><I>control_word</I><B>);</B>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>__setfpucw</B>()
|
|
|
|
transfers
|
|
<I>control_word</I>
|
|
|
|
to the registers of the FPU (floating-point unit) on the i386 architecture.
|
|
This was used to control floating-point precision,
|
|
rounding and floating-point exceptions.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>CONFORMING TO</H2>
|
|
|
|
This function was a nonstandard GNU extension.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
As of glibc 2.1 this function does not exist anymore.
|
|
There are new functions from C99, with prototypes in
|
|
<I><<A HREF="file:///usr/include/fenv.h">fenv.h</A>></I>,
|
|
|
|
to control FPU rounding modes, like
|
|
<B><A HREF="/cgi-bin/man/man2html?3+fegetround">fegetround</A></B>(3),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+fesetround">fesetround</A></B>(3),
|
|
|
|
and the floating-point environment, like
|
|
<B><A HREF="/cgi-bin/man/man2html?3+fegetenv">fegetenv</A></B>(3),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+feholdexcept">feholdexcept</A></B>(3),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+fesetenv">fesetenv</A></B>(3),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+feupdateenv">feupdateenv</A></B>(3),
|
|
|
|
and FPU exception handling, like
|
|
<B><A HREF="/cgi-bin/man/man2html?3+feclearexcept">feclearexcept</A></B>(3),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+fegetexceptflag">fegetexceptflag</A></B>(3),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+feraiseexcept">feraiseexcept</A></B>(3),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+fesetexceptflag">fesetexceptflag</A></B>(3),
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?3+fetestexcept">fetestexcept</A></B>(3).
|
|
|
|
<P>
|
|
|
|
If direct access to the FPU control word is still needed, the
|
|
<B>_FPU_GETCW</B>
|
|
|
|
and
|
|
<B>_FPU_SETCW</B>
|
|
|
|
macros from
|
|
<I><<A HREF="file:///usr/include/fpu_control.h">fpu_control.h</A>></I>
|
|
|
|
can be used.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>EXAMPLE</H2>
|
|
|
|
<B>__setfpucw(0x1372)</B>
|
|
|
|
<P>
|
|
|
|
Set FPU control word on the i386 architecture to
|
|
<BR>
|
|
|
|
<BR> - extended precision
|
|
<BR>
|
|
|
|
<BR> - rounding to nearest
|
|
<BR>
|
|
|
|
<BR> - exceptions on overflow, zero divide and NaN
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+feclearexcept">feclearexcept</A></B>(3)
|
|
|
|
<P>
|
|
|
|
<I><<A HREF="file:///usr/include/fpu_control.h">fpu_control.h</A>></I>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="4"><A HREF="#lbAE">CONFORMING TO</A><DD>
|
|
<DT id="5"><A HREF="#lbAF">NOTES</A><DD>
|
|
<DT id="6"><A HREF="#lbAG">EXAMPLE</A><DD>
|
|
<DT id="7"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="8"><A HREF="#lbAI">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:56 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|