📄 instructions2.doc182.html
字号:
<html><head><title>VM Spec </title></head><body BGCOLOR=#eeeeff text=#000000 LINK=#0000ff VLINK=#000077 ALINK=#ff0000> <a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc181.html">Prev</a> | <a href="Compiling.doc.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><hr><br> <a name="wide"></a><h2>wide</h2><a name="70175"></a>In either case, the <i>wide</i> opcode itself is followed in the compiled code by the opcode of the instruction <i>wide</i> modifies. In either form, two unsigned bytes <i>indexbyte1</i> and <i>indexbyte2</i> follow the modified opcode and are assembled into a 16-bit unsigned index to a local variable in the current frame <a href="Overview.doc.html#17257">(§3.6)</a>, where the value of the index is (<i>indexbyte1</i> << 8) | <i>indexbyte2</i>. The calculated index must be a valid index into the local variables of the current frame. Where the <i>wide</i> instruction modifies an <i>lload</i>, <i>dload</i>, <i>lstore</i>, or <i>dstore</i> instruction, the index following the calculated index (index + 1) must also be a valid index into the local variables. In the second form, two immediate unsigned bytes <i>constbyte1</i> and <i>constbyte2</i> follow <i>indexbyte1</i> and <i>indexbyte2</i> in the code stream. Those bytes are also assembled into a signed 16-bit constant, where the constant is (<i>constbyte1</i> << 8) | <i>constbyte2</i>.<p><a name="70179"></a><a href="Instructions2.doc.html#">The widened bytecode operates as normal, except for the use of the wider index and, in the case of the second form, the larger increment range.</a><p><a name="wide.Notes"></a><b>Notes</b><br><a name="70183"></a>Although we say that <i>wide</i> "modifies the behavior of another instruction," the <i>wide</i> instruction effectively treats the modified instruction as operands to <i>wide</i>, denaturing the embedded instruction in the process. In the case of a modified <i>iinc</i> instruction, one of the logical operands of the <i>iinc</i> is not even at the normal offset from the opcode. The embedded instruction must never be executed directly; its opcode must never be the target of any control transfer instruction.<p><a name="70184"></a><p><a name="66864"></a><p><hr><!-- This inserts footnotes--><p><a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc181.html">Prev</a> | <a href="Compiling.doc.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><p><font size=-1>Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)<br><i><a href="Copyright.doc.html">Copyright © 1996 Sun Microsystems, Inc.</a>All rights reserved</i><br>Please send any comments or corrections to <a href="mailto:doug.kramer@sun.com">doug.kramer@sun.com</a></font></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -