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

📄 instructions2.doc4.html

📁 Jvm 规范说明。The Java Virtual Machine was designed to support the Java programming language. Some concep
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<a name="67580"></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="67581"></a>
The result of a <i>ddiv</i> instruction is governed by the rules of IEEE arithmetic:<p>
<ul><a name="67582"></a>
<li>If either value is NaN, the result is NaN.
<a name="67583"></a>
<li>If neither value is NaN, the sign of the result is positive if both values have the same sign, negative if the values have different signs.
<a name="67584"></a>
<li>Division of an infinity by an infinity results in NaN.
<a name="67585"></a>
<li>Division of an infinity by a finite value results in a signed infinity, with the sign-producing rule just given.
</ul>
<a name="ddiv"></a>
<ul><a name="67586"></a>
<li>Division of a finite value by an infinity results in a signed zero, with the sign-producing rule just given.
<a name="67587"></a>
<li>Division of a zero by a zero results in NaN; division of zero by any other finite value results in a signed zero, with the sign-producing rule just given.
<a name="67588"></a>
<li>Division of a nonzero finite value by a zero results in a signed infinity, with the sign-producing rule just given.
<a name="67589"></a>
<li>In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved, the quotient is computed and rounded to the nearest <code>double</code> using IEEE 754 round-to-nearest mode. If the magnitude is too large to represent as a <code>double</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>double</code>, we say the operation underflows; the result is then a zero of appropriate sign. 
</ul><a name="67590"></a>
The Java Virtual Machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, division by zero, or loss of precision may occur, execution of a <i>ddiv</i> instruction never throws a runtime exception.<p>

<a name="dload"></a>
<hr><h2>dload</h2>
<a name="dload.Operation"></a>
<b>Operation</h3></b>
<a name="67610"></a>
Load <code>double</code> from local variable<p><Table Border="1">
<tr><td><a name="67607"></a>
 <i>dload</i>
<td><a name="87568"></a>
 

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

</Table><br><br><p>
<a name="dload.Forms"></a>
<b>Forms</h3></b>
<a name="67611"></a>
<i>dload</i> = 24 (0x18)<p>
<a name="dload.Stack"></a>
<b>Stack</h3></b>
<a name="67612"></a>
... <img src="chars/arrwdbrt.gif"> ..., <i>value.word1</i>, <i>value.word2</i><p>
<a name="dload.Description"></a>
<b>Description</h3></b>
<a name="67613"></a>
The <i>index</i> is an unsigned byte. Both <i>index</i> and <i>index </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 local variables at <i>index</i> and <i>index </i>+ 1 together must contain a <code>double</code>. The <i>value</i> of the local variables at <i>index</i> and <i>index </i>+ 1 is pushed onto the operand stack.<p>
<a name="dload.Notes"></a>
<b>Notes</h3></b>
<a name="67617"></a>
The <i>dload</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="dload_n"></a>
<hr><h2>dload_&lt;n&gt;</h2>
<a name="dload_n.Operation"></a>
<b>Operation</h3></b>
<a name="67627"></a>
Load <code>double</code> from local variable<p><Table Border="1">
<tr><td><a name="67626"></a>
 <i>dload_&lt;n&gt;</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="dload_n.Forms"></a>
<b>Forms</h3></b>
<a name="67628"></a>
<i>dload_0</i> = 38 (0x26)<i></i><p>
<a name="177931"></a>
<i>dload_1</i> = 39 (0x27)<i></i><p>
<a name="177933"></a>
<i>dload_2</i> = 40 (0x28)<i></i><p>
<a name="177935"></a>
<i>dload_3</i> = 41 (0x29)<p>
<a name="dload_n.Stack"></a>
<b>Stack</h3></b>
<a name="67629"></a>
... <img src="chars/arrwdbrt.gif"> ..., <i>value.word1</i>, <i>value.word2</i><p>
<a name="dload_n.Description"></a>
<b>Description</h3></b>
<a name="67630"></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 local variables at <i>&lt;n&gt;</i> and <i>&lt;n&gt; </i>+ 1 together must contain a <code>double</code>. The <i>value </i>of the local variables at <i>&lt;n&gt;</i> and <i>&lt;n&gt; </i>+ 1 is pushed onto the operand stack. <p>
<a name="dload_n.Notes"></a>
<b>Notes</h3></b>
<a name="67634"></a>
Each of the <i>dload_&lt;n&gt;</i> instructions is the same as <i>dload</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="dmul"></a>
<hr><h2>dmul</h2>
<a name="dmul.Operation"></a>
<b>Operation</h3></b>
<a name="67641"></a>
Multiply <code>double</code><p><Table Border="1">
<tr><td><a name="67640"></a>
 <i>dmul</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="dmul.Forms"></a>
<b>Forms</h3></b>
<a name="67642"></a>
<i>dmul</i> = 107 (0x6b)<p>
<a name="dmul.Stack"></a>
<b>Stack</h3></b>
<a name="67643"></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="dmul.Description"></a>
<b>Description</h3></b>
<a name="67644"></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="67645"></a>
The result of a <i>dmul</i> instruction is governed by the rules of IEEE arithmetic:<p>
<ul><a name="67646"></a>
<li>If either value is NaN, the result is NaN.
<a name="67647"></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="67648"></a>
<li>Multiplication of an infinity by a zero results in NaN.
<a name="67649"></a>
<li>Multiplication of an infinity by a finite value results in a signed infinity, with the sign-producing rule just given.
<a name="67650"></a>
<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>double</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>double</code>, we say the operation underflows; the result is then a zero of appropriate sign.
</ul>
<a name="dmul"></a>
<a name="67651"></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>dmul</i> instruction never throws a runtime exception.<p>

<a name="dneg"></a>
<hr><h2>dneg</h2>
<a name="dneg.Operation"></a>
<b>Operation</h3></b>
<a name="67661"></a>
Negate <code>double</code><p><Table Border="1">
<tr><td><a name="67660"></a>
 <i>dneg</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="dneg.Forms"></a>
<b>Forms</h3></b>
<a name="67662"></a>
<i>dneg</i> = 119 (0x77)<p>
<a name="dneg.Stack"></a>
<b>Stack</h3></b>
<a name="67663"></a>
..., <i>value.word1</i>, <i>value.word2</i> <img src="chars/arrwdbrt.gif"> ..., <i>result.word1</i>, <i>result.word2</i><p>
<a name="dneg.Description"></a>
<b>Description</h3></b>
<a name="67664"></a>
The <i>value</i> must be of type <code>double</code>. It is popped from the operand stack. The <code>double</code> <i>result</i> is the arithmetic negation of <i>value</i>, namely -<i>value</i>. The <i>result</i> is pushed onto the operand stack.<p>
<a name="67665"></a>
For <code>double</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>double</code>. <p>
<a name="67666"></a>
Special cases of interest:<p>
<ul><a name="67667"></a>
<li>If the operand is NaN, the result is NaN (recall that NaN has no sign).
<a name="67668"></a>
<li>If the operand is an infinity, the result is the infinity of opposite sign.
<a name="67669"></a>
<li>If the operand is a zero, the result is the zero of opposite sign.
</ul>
<a name="drem"></a>
<hr><h2>drem</h2>
<a name="drem.Operation"></a>
<b>Operation</h3></b>
<a name="67676"></a>
Remainder <code>double</code><p><Table Border="1">
<tr><td><a name="67675"></a>
 <i>drem</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="drem.Forms"></a>
<b>Forms</h3></b>
<a name="67677"></a>
<i>drem</i><em> </em>= 115 (0x73)<p>
<a name="drem.Stack"></a>
<b>Stack</h3></b>
<a name="67678"></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="drem.Description"></a>
<b>Description</h3></b>
<a name="67679"></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 <i>result</i> is calculated and pushed onto the operand stack as a <code>double</code>.<p>
<a name="67680"></a>
The result of a <i>drem</i> instruction is not the same as that of 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>drem</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="67684"></a>
The result of a <i>drem</i> instruction is governed by these rules:<p>
<ul><a name="67685"></a>
<li>If either value is NaN, the result is NaN.
<a name="67686"></a>
<li>If neither value is NaN, the sign of the result equals the sign of the dividend.
<a name="67687"></a>
<li>If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN.
<a name="67688"></a>
<li>If the dividend is finite and the divisor is an infinity, the result equals the dividend.
</ul>
<a name="drem"></a>
<hr><h2>drem</h2>
<ul><a name="67689"></a>
<li>If the dividend is a zero and the divisor is finite, the result equals the dividend.
<a name="67690"></a>
<li>In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved, the floating-point remainder <i>result</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.anc.gif">
<br><br>, where <i>q</i> is an integer that is negative only if <br><br><img src="Instructions2.doc.anc1.gif">
<br><br> is negative and positive only if <br><br><img src="Instructions2.doc.anc2.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="67700"></a>
Despite the fact that division by zero may occur, evaluation of a <i>drem</i> instruction never throws a runtime exception. Overflow, underflow, or loss of precision cannot occur.<p>
<a name="drem.Notes"></a>
<b>Notes</h3></b>
<a name="67701"></a>
The IEEE 754 remainder operation may be computed by the Java library routine <code>Math.IEEEremainder</code>.<p>

<a name="dreturn"></a>
<hr><h2>dreturn</h2>
<a name="dreturn.Operation"></a>
<b>Operation</h3></b>
<a name="67717"></a>
Return <code>double</code> from method<p><Table Border="1">
<tr><td><a name="67716"></a>
 <i>dreturn</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="dreturn.Forms"></a>
<b>Forms</h3></b>
<a name="67718"></a>
<i>dreturn</i> = 175 (0xaf)<p>
<a name="dreturn.Stack"></a>
<b>Stack</h3></b>
<a name="67719"></a>
..., <i>value.word1</i>, <i>value.word2</i> <img src="chars/arrwdbrt.gif"> <p>
<a name="177937"></a>
[empty]<p>
<a name="dreturn.Description"></a>
<b>Description</h3></b>
<a name="67720"></a>
The returning method must have return type <code>double</code>. The <i>value</i> must be of type <code>double</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="67724"></a>
The interpreter then returns control to the invoker of the method, reinstating the frame of the invoker.<p>

<a name="dstore"></a>
<hr><h2>dstore</h2>
<a name="dstore.Operation"></a>
<b>Operation</h3></b>
<a name="67733"></a>
Store <code>double</code> into local variable<p><Table Border="1">
<tr><td><a name="67730"></a>
 <i>dstore</i>
<td><a name="87568"></a>
 

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

</Table><br><br><p>
<a name="dstore.Forms"></a>
<b>Forms</h3></b>
<a name="67734"></a>
<i>dstore</i> = 57 (0x39)<p>
<a name="dstore.Stack"></a>
<b>Stack</h3></b>
<a name="67735"></a>
..., <i>value.word1</i>, <i>value.word2</i> <img src="chars/arrwdbrt.gif"> ...<p>
<a name="dstore.Description"></a>
<b>Description</h3></b>
<a name="67736"></a>
The <i>index</i> is an unsigned byte. Both <i>index</i> and <i>index </i>+ 1 must be valid indices into the 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>index</i> and <i>index </i>+ 1 are set to <i>value</i>. <p>
<a name="dstore.Notes"></a>
<b>Notes</h3></b>
<a name="67740"></a>
The <i>dstore</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="67741"></a>
<p>

<a name="dstore_n"></a>
<hr><h2>dstore_&lt;n&gt;</h2>
<a name="dstore_n.Operation"></a>
<b>Operation</h3></b>
<a name="67751"></a>
<p><Table Border="1">
<tr><td><a name="67750"></a>
 <i>dstore_&lt;n&gt;</i>
<td><a name="87568"></a>
 

</Table><br><br>Store <code>double</code> into local variable<p>
<a name="dstore_n.Forms"></a>
<b>Forms</h3></b>
<a name="67752"></a>
<i>dstore_0</i> = 71 (0x47)<i></i><p>
<a name="177947"></a>
<i>dstore_1</i> = 72 (0x48)<i></i><p>
<a name="177950"></a>
<i>dstore_2</i> = 73 (0x49)<i></i><p>
<a name="177952"></a>
<i>dstore_3</i> = 74 (0x4a)<p>

⌨️ 快捷键说明

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