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

📄 instructions2.doc4.html

📁 Jvm 规范说明。The Java Virtual Machine was designed to support the Java programming language. Some concep
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<a name="dstore_n.Stack"></a>
<b>Stack</h3></b>
<a name="67753"></a>
..., <i>value.word1</i>, <i>value.word2</i> <img src="chars/arrwdbrt.gif"> ...<p>
<a name="dstore_n.Description"></a>
<b>Description</h3></b>
<a name="67754"></a>
Both <i>&lt;n&gt;</i> and <i>&lt;n&gt; + </i>1 must be valid indices 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>double</code>. It is popped from the operand stack, and the local variables at <i>&lt;n&gt;</i> and <i>&lt;n&gt; </i>+ 1 are set to <i>value</i>.<p>
<a name="dstore_n.Notes"></a>
<b>Notes</h3></b>
<a name="67758"></a>
Each of the <i>dstore_&lt;n&gt;</i> instructions is the same as <i>dstore</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="dsub"></a>
<hr><h2>dsub</h2>
<a name="dsub.Operation"></a>
<b>Operation</h3></b>
<a name="67771"></a>
Subtract <code>double</code><p><Table Border="1">
<tr><td><a name="67770"></a>
 <i>dsub</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="dsub.Forms"></a>
<b>Forms</h3></b>
<a name="67772"></a>
<i>dsub</i> = 103 (0x67)<p>
<a name="dsub.Stack"></a>
<b>Stack</h3></b>
<a name="67773"></a>
..., <i>value1.word1</i>, <i>value1.word2</i>, <i>value2.word1</i>, <i>value2.word2</i> <img src="chars/arrwdbrt.gif"> ..., <i>result.word1</i>, <i>result.word2</i><p>
<a name="dsub.Description"></a>
<b>Description</h3></b>
<a name="67774"></a>
Both <i>value1</i> and <i>value2</i> must be of type <code>double</code>. The values are popped from the operand stack. The <code>double</code> <i>result</i> is <i>value1</i> - <i>value2</i>. The <i>result</i> is pushed onto the operand stack.<p>
<a name="67775"></a>
For <code>double</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>dsub</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="67776"></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 a <i>dsub</i> instruction never throws a runtime exception.<p>

<a name="dup"></a>
<hr><h2>dup</h2>
<a name="dup.Operation"></a>
<b>Operation</h3></b>
<a name="67789"></a>
Duplicate top operand stack word<p><Table Border="1">
<tr><td><a name="67788"></a>
 <i>dup</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="dup.Forms"></a>
<b>Forms</h3></b>
<a name="67790"></a>
<i>dup</i> = 89 (0x59)<p>
<a name="dup.Stack"></a>
<b>Stack</h3></b>
<a name="67791"></a>
..., <i>word</i> <img src="chars/arrwdbrt.gif"> ..., <i>word</i>, <i>word</i><p>
<a name="dup.Description"></a>
<b>Description</h3></b>
<a name="67792"></a>
The top word on the operand stack is duplicated and pushed onto the operand stack. <p>
<a name="67793"></a>
The <i>dup</i> instruction must not be used unless <i>word</i> contains a 32-bit data type.<p>
<a name="dup.Notes"></a>
<b>Notes</h3></b>
<a name="67794"></a>
Except for restrictions preserving the integrity of 64-bit data types, the <i>dup</i> instruction operates on an untyped word, ignoring the type of the datum it contains.<p>

<a name="dup_x1"></a>
<hr><h2>dup_x1</h2>
<a name="dup_x1.Operation"></a>
<b>Operation</h3></b>
<a name="67804"></a>
Duplicate top operand stack word and put two down<p><Table Border="1">
<tr><td><a name="67803"></a>
 <i>dup_x1</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="dup_x1.Forms"></a>
<b>Forms</h3></b>
<a name="67805"></a>
<i>dup_x1</i> = 90 (0x5a)<p>
<a name="dup_x1.Stack"></a>
<b>Stack</h3></b>
<a name="87856"></a>
..., <i>word2</i>, <i>word1</i> <img src="chars/arrwdbrt.gif"> ...<em>, </em><i>word1</i>, <i>word2</i>, <i>word1</i><p>
<a name="dup_x1.Description"></a>
<b>Description</h3></b>
<a name="67807"></a>
The top word on the operand stack is duplicated and the copy inserted two words down in the operand stack. <p>
<a name="67808"></a>
The <i>dup_x1</i> instruction must not be used unless each of <i>word1</i> and <i>word2</i> is a word that contains a 32-bit data type.<p>
<a name="dup_x1.Notes"></a>
<b>Notes</h3></b>
<a name="67809"></a>
Except for restrictions preserving the integrity of 64-bit data types, the <i>dup_x1</i> instruction operates on untyped words, ignoring the types of the data they contain.<p>

<a name="dup_x2"></a>
<hr><h2>dup_x2</h2>
<a name="dup_x2.Operation"></a>
<b>Operation</h3></b>
<a name="67819"></a>
Duplicate top operand stack word and put three down<p><Table Border="1">
<tr><td><a name="67818"></a>
 <i>dup_x2</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="dup_x2.Forms"></a>
<b>Forms</h3></b>
<a name="67820"></a>
<i>dup_x2</i><em> </em>= 91 (0x5b)<p>
<a name="dup_x2.Stack"></a>
<b>Stack</h3></b>
<a name="67821"></a>
..., <i>word3</i>, <i>word2</i>, <i>word1</i> <img src="chars/arrwdbrt.gif"> ...<em>, </em><i>word1</i>, <i>word3</i>, <i>word2</i>, <i>word1</i><p>
<a name="dup_x2.Description"></a>
<b>Description</h3></b>
<a name="67822"></a>
The top word on the operand stack is duplicated and the copy inserted three words down in the operand stack. <p>
<a name="67823"></a>
The <i>dup_x2</i> instruction must not be used unless each of <i>word2</i> and <i>word3</i> is a word that contains a 32-bit data type or together are the two words of a single 64-bit datum, and unless <i>word1</i> contains a 32-bit data type.<p>
<a name="dup_x2.Notes"></a>
<b>Notes</h3></b>
<a name="67824"></a>
Except for restrictions preserving the integrity of 64-bit data types, the <i>dup_x2</i> instruction operates on untyped words, ignoring the types of the data they contain.<p>

<a name="dup2"></a>
<hr><h2>dup2</h2>
<a name="dup2.Operation"></a>
<b>Operation</h3></b>
<a name="67834"></a>
Duplicate top two operand stack word<p><Table Border="1">
<tr><td><a name="67833"></a>
 <i>dup2</i>
<td><a name="87568"></a>
 

</Table><br><br>s<p>
<a name="dup2.Forms"></a>
<b>Forms</h3></b>
<a name="67835"></a>
<i>dup2</i> = 92 (0x5c)<p>
<a name="dup2.Stack"></a>
<b>Stack</h3></b>
<a name="67836"></a>
..., <i>word2</i>, <i>word1</i> <img src="chars/arrwdbrt.gif"> ..., <i>word2</i>, <i>word1</i><em>, </em><i>word2</i>, <i>word1</i><p>
<a name="dup2.Description"></a>
<b>Description</h3></b>
<a name="67837"></a>
The top two words on the operand stack are duplicated and pushed onto the operand stack, in the original order. <p>
<a name="67838"></a>
The <i>dup2</i> instruction must not be used unless each of <i>word1</i> and <i>word2</i> is a word that contains a 32-bit data type or both together are the two words of a single 64-bit datum.<p>
<a name="dup2.Notes"></a>
<b>Notes</h3></b>
<a name="67839"></a>
Except for restrictions preserving the integrity of 64-bit data types, the <i>dup2</i> instruction operates on untyped words, ignoring the types of the data they contain.<p>

<a name="dup2_x1"></a>
<hr><h2>dup2_x1</h2>
<a name="dup2_x1.Operation"></a>
<b>Operation</h3></b>
<a name="67852"></a>
Duplicate top two operand stack words and put three down<p><Table Border="1">
<tr><td><a name="67851"></a>
 <i>dup2_x1</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="dup2_x1.Forms"></a>
<b>Forms</h3></b>
<a name="67853"></a>
<i>dup2_x1</i> = 93 (0x5d)<p>
<a name="dup2_x1.Stack"></a>
<b>Stack</h3></b>
<a name="67854"></a>
..., <i>word3</i>, <i>word2</i>, <i>word1</i> <img src="chars/arrwdbrt.gif"> ..., <i>word2</i><em>, </em><i>word1</i>, <i>word3</i>, <i>word2</i>, <i>word1</i><p>
<a name="dup2_x1.Description"></a>
<b>Description</h3></b>
<a name="67855"></a>
The top two words on the operand stack are duplicated and the copies inserted, in the original order, three words down in the operand stack. <p>
<a name="67856"></a>
The <i>dup2_x1</i> instruction must not be used unless each of <i>word1</i> and <i>word2</i> is a word that contains a 32-bit data type or both together are the two words that contain a single 64-bit datum, and unless <i>word3</i> is a word that contains a 32-bit data type.<p>
<a name="dup2_x1.Notes"></a>
<b>Notes</h3></b>
<a name="67857"></a>
Except for restrictions preserving the integrity of 64-bit data types, the <i>dup2_x1</i> instruction operates on untyped words, ignoring the types of the data they contain.<p>

<a name="dup2_x2"></a>
<hr><h2>dup2_x2</h2>
<a name="dup2_x2.Operation"></a>
<b>Operation</h3></b>
<a name="67864"></a>
Duplicate top two operand stack words and put four down<p><Table Border="1">
<tr><td><a name="67863"></a>
 <i>dup2_x2</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="dup2_x2.Forms"></a>
<b>Forms</h3></b>
<a name="67865"></a>
<i>dup2_x2</i> = 94 (0x5e)<p>
<a name="dup2_x2.Stack"></a>
<b>Stack</h3></b>
<a name="67866"></a>
...,<em> </em><i>word4</i>, <i>word3</i>, <i>word2</i>, <i>word1</i> <img src="chars/arrwdbrt.gif"> ...<em>, </em><i>word2</i>, <i>word1</i>, <i>word4</i>, <i>word3</i>, <i>word2</i>, <i>word1</i><p>
<a name="dup2_x2.Description"></a>
<b>Description</h3></b>
<a name="67867"></a>
The top two words on the operand stack are duplicated and the copies inserted, in the original order, four words down in the operand stack.<p>
<a name="67868"></a>
The <i>dup2_x2</i> instruction must not be used unless each of <i>word1</i> and <i>word2</i> is a 32-bit data type or both together are the two words of a single 64-bit datum, and unless <i>word3</i> and <i>word4</i> are each a word that contains a 32-bit data type or both together are the two words of a single 64-bit datum.<p>
<a name="dup2_x2.Notes"></a>
<b>Notes</h3></b>
<a name="67869"></a>
Except for restrictions preserving the integrity of 64-bit data types, the <i>dup2_x2</i> instruction operates on untyped words, ignoring the types of the data they contain.<p>

<a name="f2d"></a>
<hr><h2>f2d</h2>
<a name="f2d.Operation"></a>
<b>Operation</h3></b>
<a name="67882"></a>
Convert <code>float</code> to <code>double</code><p><Table Border="1">
<tr><td><a name="67881"></a>
 <i>f2d</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="f2d.Forms"></a>
<b>Forms</h3></b>
<a name="67883"></a>
<i>f2d</i> = 141 (0x8d)<p>
<a name="f2d.Stack"></a>
<b>Stack</h3></b>
<a name="67884"></a>
..., <i>value</i> <img src="chars/arrwdbrt.gif"> ..., <i>result.word1</i>, <i>result.word2</i><p>
<a name="f2d.Description"></a>
<b>Description</h3></b>
<a name="67885"></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 converted to a <code>double</code>. The <i>result</i> is pushed onto the operand stack.<p>
<a name="f2d.Notes"></a>
<b>Notes</h3></b>
<a name="67886"></a>
The <i>f2d</i> instruction performs a widening primitive conversion <a href="Concepts.doc.html#23435">(&#167;2.6.2)</a>. Because all values of type <code>float</code> are exactly representable by type <code>double</code>, the conversion is exact.<p>

<a name="f2i"></a>
<hr><h2>f2i</h2>
<a name="f2i.Operation"></a>
<b>Operation</h3></b>
<a name="67896"></a>
Convert <code>float</code> to <code>int</code><p><Table Border="1">
<tr><td><a name="67895"></a>
 <i>f2i</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="f2i.Forms"></a>
<b>Forms</h3></b>
<a name="67897"></a>
<i>f2i</i> = 139 (0x8b)<p>
<a name="f2i.Stack"></a>
<b>Stack</h3></b>
<a name="67898"></a>
..., <i>value</i> <img src="chars/arrwdbrt.gif"> ..., <i>result</i><p>
<a name="f2i.Description"></a>
<b>Description</h3></b>
<a name="67899"></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 converted to an <code>int</code>. The <i>result</i> is pushed onto the operand stack: <p>
<ul><a name="67900"></a>
<li>If the <i>value</i> is NaN, the <i>result</i> of the conversion is an <code>int</code> 0. 
<a name="67901"></a>
<li>Otherwise, if the <i>value</i> is not an infinity, it is rounded to an integer value <i>V</i>, rounding towards zero using IEEE 754 round-towards-zero mode. If this integer value <i>V</i> can be represented as an <code>int</code>, then the <i>result</i> is the <code>int</code> value <em>V</em>.
<a name="67902"></a>
<li>Otherwise, either the <i>value</i> must be too small (a negative value of large magnitude or negative infinity), and the <i>result</i> is the smallest representable value of type <code>int</code>, or the <i>value</i> must be too large (a positive value of large magnitude or positive infinity), and the <i>result</i> is the largest representable value of type <code>int</code>.
<a name="f2i.Notes"></a>
<b>Notes</h3></b>
</ul><a name="67903"></a>
The <i>f2i</i> instruction performs a narrowing primitive conversion <a href="Concepts.doc.html#26142">(&#167;2.6.3)</a>. It may lose information about the overall magnitude of <i>value</i>, and may also lose precision.<p>


<hr>
<!-- This inserts footnotes--><p>
<a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc3.html">Prev</a> | <a href="Instructions2.doc5.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 + -