⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instructions2.doc5.html

📁 Jvm 规范说明。The Java Virtual Machine was designed to support the Java programming language. Some concep
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<hr><h2>fload_&lt;n&gt;</h2>
<a name="fload_n.Operation"></a>
<b>Operation</h3></b>
<a name="68071"></a>
Load <code>float</code> from local variable<p><Table Border="1">
<tr><td><a name="68070"></a>
 <i>fload_&lt;n&gt;</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="fload_n.Forms"></a>
<b>Forms</h3></b>
<a name="68072"></a>
<i>fload_0</i> = 34 (0x22)<i></i><p>
<a name="177962"></a>
<i>fload_1</i> = 35 (0x23)<i></i><p>
<a name="177964"></a>
<i>fload_2</i> = 36 (0x24)<i></i><p>
<a name="177966"></a>
<i>fload_3</i> = 37 (0x25)<p>
<a name="fload_n.Stack"></a>
<b>Stack</h3></b>
<a name="68073"></a>
... <img src="chars/arrwdbrt.gif"> ..., <i>value</i><p>
<a name="fload_n.Description"></a>
<b>Description</h3></b>
<a name="68074"></a>
The <i>&lt;n&gt;</i> must be a valid index into the local variables of the current frame <a href="Overview.doc.html#17257">(&#167;3.6)</a>. The local variable at <i>&lt;n&gt;</i> must contain a <code>float</code>. The <i>value</i> of the local variable at <i>&lt;n&gt;</i> is pushed onto the operand stack.<p>
<a name="fload_n.Notes"></a>
<b>Notes</h3></b>
<a name="68078"></a>
Each of the <i>fload_&lt;n&gt;</i> instructions is the same as <i>fload</i> with an <i>index</i> of <i>&lt;n&gt;</i>, except that the operand <i>&lt;n&gt;</i> is implicit.<p>

<a name="fmul"></a>
<hr><h2>fmul</h2>
<a name="fmul.Operation"></a>
<b>Operation</h3></b>
<a name="68085"></a>
Multiply <code>float</code><p><Table Border="1">
<tr><td><a name="68084"></a>
 <i>fmul</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="fmul.Forms"></a>
<b>Forms</h3></b>
<a name="68086"></a>
<i>fmul</i> = 106 (0x6a)<p>
<a name="fmul.Stack"></a>
<b>Stack</h3></b>
<a name="68087"></a>
..., <i>value1</i><em>, </em><i>value2</i> <img src="chars/arrwdbrt.gif"> ..., <i>result</i><p>
<a name="fmul.Description"></a>
<b>Description</h3></b>
<a name="68088"></a>
Both <i>value1</i> and <i>value2</i> must be of type <code>float</code>. The values are popped from the operand stack. The <code>float</code> <i>result</i> is <i>value1</i> * <i>value2</i>. The <i>result</i> is pushed onto the operand stack.<p>
<a name="68089"></a>
The result of an <i>fmul</i> instruction is governed by the rules of IEEE arithmetic:<p>
<ul><a name="68090"></a>
<li>If either value is NaN, the result is NaN.
<a name="68091"></a>
<li>If neither value is NaN, the sign of the result is positive if both values have the same sign, and negative if the values have different signs.
<a name="68092"></a>
<li>Multiplication of an infinity by a zero results in NaN.
<a name="68093"></a>
<li>Multiplication of an infinity by a finite value results in a signed infinity, with the sign-producing rule just given.
<li>In the remaining cases, where neither an infinity nor NaN is involved, the product is computed and rounded to the nearest representable value using IEEE 754 round-to-nearest mode. If the magnitude is too large to represent as a <code>float</code>, we say the operation overflows; the result is then an infinity of appropriate sign. If the magnitude is too small to represent as a <code>float</code>, we say the operation underflows; the result is then a zero of appropriate sign. 
</ul><a name="68095"></a>
The Java Virtual Machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, or loss of precision may occur, execution of an <i>fmul</i> instruction never throws a runtime exception.<p>

<a name="fneg"></a>
<hr><h2>fneg</h2>
<a name="fneg.Operation"></a>
<b>Operation</h3></b>
<a name="68108"></a>
Negate <code>float</code><p><Table Border="1">
<tr><td><a name="68107"></a>
 <i>fneg</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="fneg.Forms"></a>
<b>Forms</h3></b>
<a name="68109"></a>
<i>fneg</i> = 118 (0x76)<p>
<a name="fneg.Stack"></a>
<b>Stack</h3></b>
<a name="68110"></a>
..., <i>value</i><em> </em><img src="chars/arrwdbrt.gif"> ..., <i>result</i><p>
<a name="fneg.Description"></a>
<b>Description</h3></b>
<a name="68111"></a>
The <i>value</i> must be of type <code>float</code>. It is popped from the operand stack. The <code>float</code> <i>result</i> is the arithmetic negation of <i>value</i>, -<i>value</i>. The <i>result</i> is pushed onto the operand stack.<p>
<a name="68112"></a>
For <code>float</code> values, negation is not the same as subtraction from zero. If <code>x</code> is <code>+0.0</code>, then <code>0.0-x</code> equals <code>+0.0</code>, but <code>-x</code> equals <code>-0.0</code>. Unary minus merely inverts the sign of a <code>float</code>. <p>
<a name="68113"></a>
Special cases of interest:<p>
<ul><a name="68114"></a>
<li>If the operand is NaN, the result is NaN (recall that NaN has no sign).
<a name="68115"></a>
<li>If the operand is an infinity, the result is the infinity of opposite sign.
<a name="68116"></a>
<li>If the operand is a zero, the result is the zero of opposite sign.
</ul>
<a name="frem"></a>
<hr><h2>frem</h2>
<a name="frem.Operation"></a>
<b>Operation</h3></b>
<a name="68126"></a>
Remainder <code>float</code><p><Table Border="1">
<tr><td><a name="68125"></a>
 <i>frem</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="frem.Forms"></a>
<b>Forms</h3></b>
<a name="68127"></a>
<i>frem</i> = 114 (0x72)<p>
<a name="frem.Stack"></a>
<b>Stack</h3></b>
<a name="68128"></a>
..., <i>value1</i><em>, </em><i>value2</i> <img src="chars/arrwdbrt.gif"> ..., <i>result</i><p>
<a name="frem.Description"></a>
<b>Description</h3></b>
<a name="68129"></a>
Both <i>value1</i> and <i>value2</i> must be of type <code>float</code>. The values are popped from the operand stack. The <i>result</i> is calculated and pushed onto the operand stack as a <code>float</code>.<p>
<a name="68130"></a>
The <i>result</i> of an <i>frem</i> instruction is not the same that of the as the so-called remainder operation defined by IEEE 754. The IEEE 754 "remainder" operation computes the remainder from a rounding division, not a truncating division, and so its behavior is <i>not</i> analogous to that of the usual integer remainder operator. Instead, the Java Virtual Machine defines <i>frem</i> to behave in a manner analogous to that of the Java Virtual Machine integer remainder instructions (<i>irem</i> and <i>lrem</i>); this may be compared with the C library function <code>fmod</code>.<p>
<a name="68134"></a>
The result of an <i>frem</i> instruction is governed by these rules:<p>
<ul><a name="68135"></a>
<li>If either value is NaN, the result is NaN.
<a name="68136"></a>
<li>If neither value is NaN, the sign of the result equals the sign of the dividend.
<a name="68137"></a>
<li>If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN.
<li>If the dividend is finite and the divisor is an infinity, the result equals the dividend.
<a name="68139"></a>
<li>If the dividend is a zero and the divisor is finite, the result equals the dividend.
<a name="68140"></a>
<li>In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved, the floating-point remainder <i>result</i><i> </i>from a dividend <i>value1</i> and a divisor <i>value2</i> is defined by the mathematical relation <br><br><img src="Instructions2.doc.anc3.gif">
<br><br>, where <i>q</i> is an integer that is negative only if <br><br><img src="Instructions2.doc.anc4.gif">
<br><br> is negative and positive only if <br><br><img src="Instructions2.doc.anc5.gif">
<br><br> is positive, and whose magnitude is as large as possible without exceeding the magnitude of the true mathematical quotient of <i>value1</i> and <i>value2</i>.
</ul><a name="68150"></a>
Despite the fact that division by zero may occur, evaluation of an <i>frem</i> instruction never throws a runtime exception. Overflow, underflow, or loss of precision cannot occur.<p>
<a name="frem.Notes"></a>
<b>Notes</h3></b>
<a name="68151"></a>
The IEEE 754 remainder operation may be computed by the Java library routine <code>Math.IEEEremainder</code>.<p>

<a name="freturn"></a>
<hr><h2>freturn</h2>
<a name="freturn.Operation"></a>
<b>Operation</h3></b>
<a name="68158"></a>
Return <code>float</code> from method<p><Table Border="1">
<tr><td><a name="68157"></a>
 <i>freturn</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="freturn.Forms"></a>
<b>Forms</h3></b>
<a name="68159"></a>
<i>freturn</i> = 174 (0xae)<p>
<a name="freturn.Stack"></a>
<b>Stack</h3></b>
<a name="87907"></a>
..., <i>value</i><em> </em><img src="chars/arrwdbrt.gif"> <p>
<a name="177968"></a>
[empty]<p>
<a name="freturn.Description"></a>
<b>Description</h3></b>
<a name="68161"></a>
The returning method must have return type <code>float</code>. The <i>value</i> must be of type <code>float</code>. The <i>value</i> is popped from the operand stack of the current frame <a href="Overview.doc.html#17257">(&#167;3.6)</a> and pushed onto the operand stack of the frame of the invoker. Any other values on the operand stack of the current method are discarded. If the returning method is a <code>synchronized</code> method, the monitor acquired or reentered on invocation of the method is released or exited (respectively) as if by execution of a <i>monitorexit</i> instruction. <p>
<a name="68165"></a>
The interpreter then returns control to the invoker of the method, reinstating the frame of the invoker.<p>

<a name="fstore"></a>
<hr><h2>fstore</h2>
<a name="fstore.Operation"></a>
<b>Operation</h3></b>
<a name="68177"></a>
Store <code>float</code> into local variable<p><Table Border="1">
<tr><td><a name="68174"></a>
 <i>fstore</i>
<td><a name="87568"></a>
 

<tr><td><a name="68176"></a>
 <i>index</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="fstore.Forms"></a>
<b>Forms</h3></b>
<a name="68178"></a>
<i>fstore</i> = 56 (0x38)<p>
<a name="fstore.Stack"></a>
<b>Stack</h3></b>
<a name="68179"></a>
..., <i>value</i> <img src="chars/arrwdbrt.gif"> ...<p>
<a name="fstore.Description"></a>
<b>Description</h3></b>
<a name="68180"></a>
The <i>index</i> is an unsigned byte that must be a valid index into the local variables of the current frame <a href="Overview.doc.html#17257">(&#167;3.6)</a>. The <i>value</i> on the top of the operand stack must be of type <code>float</code>. It is popped from the operand stack, and the value of the local variable at <i>index</i> is set to <i>value</i>.<p>
<a name="fstore.Notes"></a>
<b>Notes</h3></b>
<a name="68184"></a>
The <i>fstore</i> opcode can be used in conjunction with the <i>wide</i> instruction to access a local variable using a two-byte unsigned index.<p>

<a name="fstore_n"></a>
<hr><h2>fstore_&lt;n&gt;</h2>
<a name="fstore_n.Operation"></a>
<b>Operation</h3></b>
<a name="68194"></a>
<p><Table Border="1">
<tr><td><a name="68193"></a>
 <i>fstore_&lt;n&gt;</i>
<td><a name="87568"></a>
 

</Table><br><br>Store <code>float</code> into local variable<p>
<a name="fstore_n.Forms"></a>
<b>Forms</h3></b>
<a name="68195"></a>
<i>fstore_0</i> = 67 (0x43)<i></i><p>
<a name="177970"></a>
<i>fstore_1</i> = 68 (0x44)<i></i><p>
<a name="177972"></a>
<i>fstore_2</i> = 69 (0x45)<i></i><p>
<a name="177974"></a>
<i>fstore_3</i> = 70 (0x46)<p>
<a name="fstore_n.Stack"></a>
<b>Stack</h3></b>
<a name="68196"></a>
..., <i>value</i><em> </em><img src="chars/arrwdbrt.gif"> ...<p>
<a name="fstore_n.Description"></a>
<b>Description</h3></b>
<a name="68197"></a>
The <i>&lt;n&gt;</i> must be a valid index into the local variables of the current frame <a href="Overview.doc.html#17257">(&#167;3.6)</a>. The <i>value</i> on the top of the operand stack must be of type <code>float</code>. It is popped from the operand stack, and the value of the local variable at <i>&lt;n&gt;</i> is set to <i>value</i>.<p>
<a name="fstore_n.Notes"></a>
<b>Notes</h3></b>
<a name="68201"></a>
Each of the <i>fstore_&lt;n&gt;</i> is the same as <i>fstore</i> with an <i>index</i> of <i>&lt;n&gt;</i>, except that the operand <i>&lt;n&gt;</i> is implicit.<p>

<a name="fsub"></a>
<hr><h2>fsub</h2>
<a name="fsub.Operation"></a>
<b>Operation</h3></b>
<a name="68208"></a>
Subtract <code>float</code><p><Table Border="1">
<tr><td><a name="68207"></a>
 <i>fsub</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="fsub.Forms"></a>
<b>Forms</h3></b>
<a name="68209"></a>
<i>fsub</i> = 102 (0x66)<p>
<a name="fsub.Stack"></a>
<b>Stack</h3></b>
<a name="68210"></a>
..., <i>value1</i><em>, </em><i>value2</i> <img src="chars/arrwdbrt.gif"> ..., <i>result</i><p>
<a name="fsub.Description"></a>
<b>Description</h3></b>
<a name="68211"></a>
Both <i>value1</i> and <i>value2</i> must be of type <code>float</code>. The values are popped from the operand stack. The <code>float</code> <i>result</i> is <i>value1</i> - <i>value2</i>. The <i>result</i> is pushed onto the operand stack.<p>
<a name="68212"></a>
For <code>float</code> subtraction, it is always the case that <code>a-b</code> produces the same result as <code>a+(-b)</code>. However, for the <i>fsub</i> instruction, subtraction from zero is not the same as negation, because if <code>x</code> is <code>+0.0</code>, then <code>0.0-x</code> equals <code>+0.0</code>, but <code>-x</code> equals <code>-0.0</code>. <p>
<a name="68213"></a>
The Java Virtual Machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, or loss of precision may occur, execution of an <i>fsub</i> instruction never throws a runtime exception.<p>


<hr>
<!-- This inserts footnotes--><p>
<a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc4.html">Prev</a> | <a href="Instructions2.doc6.html">Next</a> | <a href="Lindholm.INDEX.html">Index</a>
<p>
<font size = -1>Java Virtual Machine Specification <br>
<!--(HTML generated by dkramer on March 31, 1997)-->
<!--
(HTML generated by dkramer on March 25, 1997)-->
<br>
<i><a href="Copyright.doc.html">Copyright &#169 1996, 1997 Sun Microsystems, Inc.</a>
All rights reserved</i>
<br>
Please send any comments or corrections to <a href="mailto:jvm@java.sun.com">jvm@java.sun.com</a>
</font>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -