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

📄 instructions2.doc8.html

📁 Java编程规范
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<blockquote><a name="69471"></a>Load <code>long</code> from local variable<p><Table Border="1"></blockquote><p><b>Format</b><br><blockquote><tr><td><a name="69470"></a> <i>lload_&lt;n&gt;</i><td><a name="87568"></a> </Table><br></blockquote><p><a name="lload_n.Forms"></a><p><b>Forms</b><br><blockquote><a name="69472"></a><i>lload_0</i> = 30 (0x1e) <i>lload_1</i> = 31 (0x1f) <i>lload_2</i> = 32 (0x20) <i>lload_3</i> = 33 (0x21)</blockquote><p><a name="lload_n.Operand"></a><p><b>Operand Stack</b><br><blockquote><a name="69473"></a>... <img src="chars/arrwdbrt.gif"> ..., <i>value</i></blockquote><p><a name="lload_n.Description"></a><p><b>Description</b><br><blockquote><a name="69474"></a>Both <i>&lt;n&gt;</i> and <i>&lt;n&gt; </i>+ <i>1</i> must be indices into the local variable array 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>long</code>. The <i>value</i> of the local variable at <i>&lt;n&gt;</i> is pushed onto the operand stack. </blockquote><p><a name="lload_n.Notes"></a><p><b>Notes</b><br><blockquote><a name="69478"></a>Each of the <i>lload_&lt;n&gt;</i> instructions is the same as <i>lload</i> with an <i>index</i> of <i>&lt;n&gt;</i>, except that the operand <i>&lt;n&gt;</i> is implicit.</blockquote><p><a name="lmul"></a><hr><h2>lmul</h2><a name="lmul.Operation"></a><p><b>Operation</b><br><blockquote><a name="69488"></a>Multiply <code>long</code><p><Table Border="1"></blockquote><p><b>Format</b><br><blockquote><tr><td><a name="69487"></a> <i>lmul</i><td><a name="87568"></a> </Table><br></blockquote><p><a name="lmul.Forms"></a><p><b>Forms</b><br><blockquote><a name="69489"></a><i>lmul</i> = 105 (0x69)</blockquote><p><a name="lmul.Operand"></a><p><b>Operand Stack</b><br><blockquote><a name="69490"></a>..., <i>value1</i>, <i>value2</i> <img src="chars/arrwdbrt.gif"> ..., <i>result</i></blockquote><p><a name="lmul.Description"></a><p><b>Description</b><br><blockquote><a name="69491"></a>Both <i>value1</i> and <i>value2</i> must be of type <code>long</code>. The values are popped from the operand stack. The <code>long</code> <i>result</i> is <i>value1</i> * <i>value2</i>. The <i>result</i> is pushed onto the operand stack.</blockquote><p><blockquote><a name="448607"></a>The result is the 64 low-order bits of the true mathematical result in a sufficiently wide two's-complement format, represented as a value of type <code>long</code>. If overflow occurs, the sign of the result may not be the same as the sign of the mathematical sum of the two values.</blockquote><p><blockquote><a name="448616"></a>Despite the fact that overflow may occur, execution of an <i>lmul</i> instruction never throws a runtime exception.</blockquote><p><a name="lneg"></a><hr><h2>lneg</h2><a name="lneg.Operation"></a><p><b>Operation</b><br><blockquote><a name="69508"></a>Negate <code>long</code><p><Table Border="1"></blockquote><p><b>Format</b><br><blockquote><tr><td><a name="69507"></a> <i>lneg</i><td><a name="87568"></a> </Table><br></blockquote><p><a name="lneg.Forms"></a><p><b>Forms</b><br><blockquote><a name="69509"></a><i>lneg</i><em> </em>= 117 (0x75)</blockquote><p><a name="lneg.Operand"></a><p><b>Operand Stack</b><br><blockquote><a name="69510"></a>..., <i>value</i><em> </em><img src="chars/arrwdbrt.gif"> ..., <i>result</i></blockquote><p><a name="lneg.Description"></a><p><b>Description</b><br><blockquote><a name="69511"></a>The <i>value</i> must be of type <code>long</code>. It is popped from the operand stack. The <code>long</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.</blockquote><p><blockquote><a name="69512"></a>For <code>long</code> values, negation is the same as subtraction from zero. Because the Java virtual machine uses two's-complement representation for integers and the range of two's-complement values is not symmetric, the negation of the maximum negative <code>long</code> results in that same maximum negative number. Despite the fact that overflow has occurred, no exception is thrown. </blockquote><p><blockquote><a name="69513"></a>For all <code>long</code> values <code>x</code>, -<code>x</code> equals (~<code>x</code>) + <code>1</code>.</blockquote><p><a name="lookupswitch"></a><hr><h2>lookupswitch</h2><a name="lookupswitch.Operation"></a><p><b>Operation</b><br><blockquote><a name="69543"></a>Access jump table by key match and jump<p><Table Border="1"></blockquote><p><b>Format</b><br><blockquote><tr><td><a name="69522"></a> <i>lookupswitch</i><td><a name="87568"></a> <tr><td><a name="69524"></a> <<i>0-3 byte pad</i>\><td><a name="87568"></a> <tr><td><a name="69526"></a> <i>defaultbyte1</i><td><a name="87568"></a> <tr><td><a name="69528"></a> <i>defaultbyte2</i><td><a name="87568"></a> <tr><td><a name="69530"></a> <i>defaultbyte3</i><td><a name="87568"></a> <tr><td><a name="69532"></a> <i>defaultbyte4</i><td><a name="87568"></a> <tr><td><a name="69534"></a> <i>npairs1</i><td><a name="87568"></a> <tr><td><a name="69536"></a> <i>npairs2</i><td><a name="87568"></a> <tr><td><a name="69538"></a> <i>npairs3</i><td><a name="87568"></a> <tr><td><a name="69540"></a> <i>npairs4</i><td><a name="87568"></a> <tr><td><a name="69542"></a> <i>match-offset pairs</i>...<td><a name="87568"></a> </Table><br></blockquote><p><a name="lookupswitch.Forms"></a><p><b>Forms</b><br><blockquote><a name="69544"></a><i>lookupswitch</i> = 171 (0xab)</blockquote><p><a name="lookupswitch.Operand"></a><p><b>Operand Stack</b><br><blockquote><a name="69545"></a>..., <i>key</i> <img src="chars/arrwdbrt.gif"> ...</blockquote><p><a name="lookupswitch.Description"></a><p><b>Description</b><br><blockquote><a name="334376"></a>A <i>lookupswitch</i> is a variable-length instruction. Immediately after the <i>lookupswitch</i> opcode, between zero and three null bytes (zeroed bytes, not the null object) are inserted as padding. The number of null bytes is chosen so that the <i>defaultbyte1</i> begins at an address that is a multiple of four bytes from the start of the current method (the opcode of its first instruction). Immediately after the padding follow a series of signed 32-bit values: <i>default</i>, <i>npairs</i>, and then <i>npairs</i> pairs of signed 32-bit values. The <i>npairs</i> must be greater than or equal to 0. Each of the <i>npairs</i> pairs consists of an <code>int</code> <i>match</i> and a signed 32-bit <i>offset</i>. Each of these signed 32-bit values is constructed from four unsigned bytes as (<i>byte1</i> << 24) | (<i>byte2</i> << 16) | (<i>byte3</i> << 8) | <i>byte4</i>.</blockquote><p><blockquote><a name="334378"></a>The table <i>match</i>-<i>offset</i> pairs of the <i>lookupswitch</i> instruction must be sorted in increasing numerical order by <i>match</i>.</blockquote><p><blockquote><a name="69548"></a>The <i>key</i> must be of type <code>int</code> and is popped from the operand stack. The <i>key</i> is compared against the <i>match</i> values. If it is equal to one of them, then a target address is calculated by adding the corresponding <i>offset</i> to the address of the opcode of this <i>lookupswitch</i> instruction. If the <i>key</i> does not match any of the <i>match</i> values, the target address is calculated by adding <i>default</i> to the address of the opcode of this <i>lookupswitch</i> instruction. Execution then continues at the target address.</blockquote><p><blockquote><a name="69549"></a>The target address that can be calculated from the offset of each <i>match-offset</i> pair, as well as the one calculated from <i>default</i>, must be the address of an opcode of an instruction within the method that contains this <i>lookupswitch</i> instruction.</blockquote><p><a name="lookupswitch.Notes"></a><p><b>Notes</b><br><blockquote><a name="69550"></a>The alignment required of the 4-byte operands of the <i>lookupswitch</i> instruction guarantees 4-byte alignment of those operands if and only if the method that contains the <i>lookupswitch</i> is positioned on a 4-byte boundary.</blockquote><p><blockquote><a name="69551"></a>The <i>match-offset</i> pairs are sorted to support lookup routines that are quicker than linear search.</blockquote><p><a name="lor"></a><hr><h2>lor</h2><a name="lor.Operation"></a><p><b>Operation</b><br><blockquote><a name="69558"></a>Boolean OR <code>long</code><p><Table Border="1"></blockquote><p><b>Format</b><br><blockquote><tr><td><a name="69557"></a> <i>lor</i><td><a name="87568"></a> </Table><br></blockquote><p><a name="lor.Forms"></a><p><b>Forms</b><br><blockquote><a name="69559"></a><i>lor</i> = 129 (0x81)</blockquote><p><a name="lor.Operand"></a><p><b>Operand Stack</b><br><blockquote><a name="69560"></a>..., <i>value1</i>, <i>value2</i> <img src="chars/arrwdbrt.gif"> ..., <i>result</i></blockquote><p><a name="lor.Description"></a><p><b>Description</b><br><blockquote><a name="69561"></a>Both <i>value1</i> and <i>value2</i> must be of type <code>long</code>. They are popped from the operand stack. A <code>long</code> <i>result</i> is calculated by taking the bitwise inclusive OR of <i>value1</i> and <i>value2</i>. The <i>result</i> is pushed onto the operand stack.</blockquote><p><a name="lrem"></a><hr><h2>lrem</h2><a name="lrem.Operation"></a><p><b>Operation</b><br><blockquote><a name="69568"></a>Remainder <code>long</code><p><Table Border="1"></blockquote><p><b>Format</b><br><blockquote><tr><td><a name="69567"></a> <i>lrem</i><td><a name="87568"></a> </Table><br></blockquote><p><a name="lrem.Forms"></a><p><b>Forms</b><br><blockquote><a name="69569"></a><i>lrem</i> = 113 (0x71)</blockquote><p><a name="lrem.Operand"></a><p><b>Operand Stack</b><br><blockquote><a name="69570"></a>..., <i>value1</i>, <i>value2</i> <img src="chars/arrwdbrt.gif"> ..., <i>result</i></blockquote><p><a name="lrem.Description"></a><p><b>Description</b><br><blockquote><a name="69571"></a>Both <i>value1</i> and <i>value2</i> must be of type <code>long</code>. The values are popped from the operand stack. The <code>long</code> <i>result</i> is <i>value1</i> - (<i>value1</i> / <i>value2</i>) * <i>value2</i>. The <i>result</i> is pushed onto the operand stack.</blockquote><p><blockquote><a name="69572"></a>The result of the <i>lrem</i> instruction is such that (<code>a</code>/<code>b</code>)*<code>b</code> + (<code>a%b</code>) is equal to <code>a</code>. This identity holds even in the special case in which the dividend is the negative <code>long</code> of largest possible magnitude for its type and the divisor is -<code>1</code> (the remainder is <code>0</code>). It follows from this rule that the result of the remainder operation can be negative only if the dividend is negative and can be positive only if the dividend is positive; moreover, the magnitude of the result is always less than the magnitude of the divisor. </blockquote><p><a name="lrem.Runtime"></a><p><b>Runtime Exception</b><br><blockquote><a name="69574"></a>If the value of the divisor for a <code>long</code> remainder operator is <code>0</code>, <i>lrem</i> throws an <code>ArithmeticException</code>.</blockquote><p><a name="lreturn"></a><hr><h2>lreturn</h2><a name="lreturn.Operation"></a><p><b>Operation</b><br><blockquote><a name="69581"></a>Return <code>long</code> from method<p><Table Border="1"></blockquote><p><b>Format</b><br><blockquote><tr><td><a name="69580"></a> <i>lreturn</i><td><a name="87568"></a> </Table><br></blockquote><p><a name="lreturn.Forms"></a><p><b>Forms</b><br><blockquote><a name="69582"></a><i>lreturn</i> = 173 (0xad)</blockquote><p>

⌨️ 快捷键说明

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