Imported Upstream version 1.63.0
[platform/upstream/boost.git] / libs / context / doc / html / context / econtext / rationale / x86_and_floating_point_env.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>x86 and floating-point env</title>
5 <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Context">
8 <link rel="up" href="../rationale.html" title="Rationale">
9 <link rel="prev" href="other_apis_.html" title="Other APIs">
10 <link rel="next" href="../reference.html" title="Reference">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="other_apis_.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../rationale.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="context.econtext.rationale.x86_and_floating_point_env"></a><a class="link" href="x86_and_floating_point_env.html" title="x86 and floating-point env">x86
28         and floating-point env</a>
29 </h4></div></div></div>
30 <h6>
31 <a name="context.econtext.rationale.x86_and_floating_point_env.h0"></a>
32           <span><a name="context.econtext.rationale.x86_and_floating_point_env.i386"></a></span><a class="link" href="x86_and_floating_point_env.html#context.econtext.rationale.x86_and_floating_point_env.i386">i386</a>
33         </h6>
34 <p>
35           "The FpCsr and the MxCsr register must be saved and restored before
36           any call or return by any procedure that needs to modify them ..."
37           <sup>[<a name="context.econtext.rationale.x86_and_floating_point_env.f0" href="#ftn.context.econtext.rationale.x86_and_floating_point_env.f0" class="footnote">4</a>]</sup>.
38         </p>
39 <h6>
40 <a name="context.econtext.rationale.x86_and_floating_point_env.h1"></a>
41           <span><a name="context.econtext.rationale.x86_and_floating_point_env.x86_64"></a></span><a class="link" href="x86_and_floating_point_env.html#context.econtext.rationale.x86_and_floating_point_env.x86_64">x86_64</a>
42         </h6>
43 <h6>
44 <a name="context.econtext.rationale.x86_and_floating_point_env.h2"></a>
45           <span><a name="context.econtext.rationale.x86_and_floating_point_env.windows"></a></span><a class="link" href="x86_and_floating_point_env.html#context.econtext.rationale.x86_and_floating_point_env.windows">Windows</a>
46         </h6>
47 <p>
48           MxCsr - "A callee that modifies any of the non-volatile fields within
49           MxCsr must restore them before returning to its caller. Furthermore, a
50           caller that has modified any of these fields must restore them to their
51           standard values before invoking a callee ..." <sup>[<a name="context.econtext.rationale.x86_and_floating_point_env.f1" href="#ftn.context.econtext.rationale.x86_and_floating_point_env.f1" class="footnote">5</a>]</sup>.
52         </p>
53 <p>
54           FpCsr - "A callee that modifies any of the fields within FpCsr must
55           restore them before returning to its caller. Furthermore, a caller that
56           has modified any of these fields must restore them to their standard values
57           before invoking a callee ..." <sup>[<a name="context.econtext.rationale.x86_and_floating_point_env.f2" href="#ftn.context.econtext.rationale.x86_and_floating_point_env.f2" class="footnote">6</a>]</sup>.
58         </p>
59 <p>
60           "The MMX and floating-point stack registers (MM0-MM7/ST0-ST7) are
61           preserved across context switches. There is no explicit calling convention
62           for these registers." <sup>[<a name="context.econtext.rationale.x86_and_floating_point_env.f3" href="#ftn.context.econtext.rationale.x86_and_floating_point_env.f3" class="footnote">7</a>]</sup>.
63         </p>
64 <p>
65           "The 64-bit Microsoft compiler does not use ST(0)-ST(7)/MM0-MM7".
66           <sup>[<a name="context.econtext.rationale.x86_and_floating_point_env.f4" href="#ftn.context.econtext.rationale.x86_and_floating_point_env.f4" class="footnote">8</a>]</sup>.
67         </p>
68 <p>
69           "XMM6-XMM15 must be preserved" <sup>[<a name="context.econtext.rationale.x86_and_floating_point_env.f5" href="#ftn.context.econtext.rationale.x86_and_floating_point_env.f5" class="footnote">9</a>]</sup>
70         </p>
71 <h6>
72 <a name="context.econtext.rationale.x86_and_floating_point_env.h3"></a>
73           <span><a name="context.econtext.rationale.x86_and_floating_point_env.sysv"></a></span><a class="link" href="x86_and_floating_point_env.html#context.econtext.rationale.x86_and_floating_point_env.sysv">SysV</a>
74         </h6>
75 <p>
76           "The control bits of the MxCsr register are callee-saved (preserved
77           across calls), while the status bits are caller-saved (not preserved).
78           The x87 status word register is caller-saved, whereas the x87 control word
79           (FpCsr) is callee-saved." <sup>[<a name="context.econtext.rationale.x86_and_floating_point_env.f6" href="#ftn.context.econtext.rationale.x86_and_floating_point_env.f6" class="footnote">10</a>]</sup>.
80         </p>
81 <div class="footnotes">
82 <br><hr width="100" align="left">
83 <div class="footnote"><p><sup>[<a name="ftn.context.econtext.rationale.x86_and_floating_point_env.f0" href="#context.econtext.rationale.x86_and_floating_point_env.f0" class="para">4</a>] </sup>
84             'Calling Conventions', Agner Fog
85           </p></div>
86 <div class="footnote"><p><sup>[<a name="ftn.context.econtext.rationale.x86_and_floating_point_env.f1" href="#context.econtext.rationale.x86_and_floating_point_env.f1" class="para">5</a>] </sup>
87             <a href="http://http://msdn.microsoft.com/en-us/library/yxty7t75.aspx" target="_top">MSDN
88             article 'MxCsr'</a>
89           </p></div>
90 <div class="footnote"><p><sup>[<a name="ftn.context.econtext.rationale.x86_and_floating_point_env.f2" href="#context.econtext.rationale.x86_and_floating_point_env.f2" class="para">6</a>] </sup>
91             <a href="http://http://msdn.microsoft.com/en-us/library/ms235300.aspx" target="_top">MSDN
92             article 'FpCsr'</a>
93           </p></div>
94 <div class="footnote"><p><sup>[<a name="ftn.context.econtext.rationale.x86_and_floating_point_env.f3" href="#context.econtext.rationale.x86_and_floating_point_env.f3" class="para">7</a>] </sup>
95             <a href="http://msdn.microsoft.com/en-us/library/a32tsf7t%28VS.80%29.aspx" target="_top">MSDN
96             article 'Legacy Floating-Point Support'</a>
97           </p></div>
98 <div class="footnote"><p><sup>[<a name="ftn.context.econtext.rationale.x86_and_floating_point_env.f4" href="#context.econtext.rationale.x86_and_floating_point_env.f4" class="para">8</a>] </sup>
99             'Calling Conventions', Agner Fog
100           </p></div>
101 <div class="footnote"><p><sup>[<a name="ftn.context.econtext.rationale.x86_and_floating_point_env.f5" href="#context.econtext.rationale.x86_and_floating_point_env.f5" class="para">9</a>] </sup>
102             <a href="http://msdn.microsoft.com/en-us/library/9z1stfyw%28v=vs.100%29.aspx" target="_top">MSDN
103             article 'Register Usage'</a>
104           </p></div>
105 <div class="footnote"><p><sup>[<a name="ftn.context.econtext.rationale.x86_and_floating_point_env.f6" href="#context.econtext.rationale.x86_and_floating_point_env.f6" class="para">10</a>] </sup>
106             SysV ABI AMD64 Architecture Processor Supplement Draft Version 0.99.4,
107             3.2.1
108           </p></div>
109 </div>
110 </div>
111 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
112 <td align="left"></td>
113 <td align="right"><div class="copyright-footer">Copyright &#169; 2014 Oliver Kowalke<p>
114         Distributed under the Boost Software License, Version 1.0. (See accompanying
115         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
116       </p>
117 </div></td>
118 </tr></table>
119 <hr>
120 <div class="spirit-nav">
121 <a accesskey="p" href="other_apis_.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../rationale.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
122 </div>
123 </body>
124 </html>