📄 instructions2.doc138.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.doc137.html">Prev</a> | <a href="Instructions2.doc139.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><hr><br> <a name="ldc2_w"></a><h2>ldc2_w</h2><a name="ldc2_w.Operation"></a><b>Operation</b><br><a name="69403"></a>Push <code>long</code> or <code>double</code> from constant pool<p><Table Border="3"><tr><td><a name="69398"></a> <i>ldc2_w</i><td><a name="87568"></a> <tr><td><a name="69400"></a> <i>indexbyte1</i><td><a name="87568"></a> <tr><td><a name="69402"></a> <i>indexbyte2</i><td><a name="87568"></a> </Table><Table><tr><td></Table> (wide index)<p><a name="ldc2_w.Forms"></a><b>Forms</b><br><a name="69404"></a><i>ldc2_w</i> = 20 (0x14)<p><a name="ldc2_w.Stack"></a><b>Stack</b><br><a name="69405"></a>... <img src="chars/arrwdbrt.gif"> ...,<em> </em><i>item.word1</i>, <i>item.word2</i><p><a name="ldc2_w.Description"></a><b>Description</b><br><a name="69406"></a>The unsigned <i>indexbyte1</i> and <i>indexbyte2</i> are assembled into an unsigned 16-bit index into the constant pool of the current class <a href="Overview.doc.html#17257">(§3.6)</a>, where the value of the index is calculated as (<i>indexbyte1</i> << 8) | <i>indexbyte2</i>. The index must be a valid index into the constant pool of the current class. The constant pool entry at the index must be a <code>CONSTANT_Long</code> <a href="ClassFile.doc.html#1348">(§4.4.5)</a> or <code>CONSTANT_Double</code> <a href="ClassFile.doc.html#1348">(§4.4.5)</a>. The constant pool entry is resolved <a href="ConstantPool.doc.html#49466">(§5.5)</a>. The entry must contain a numeric <i>item</i> which is pushed onto the operand stack as a <code>long</code> or <code>double</code>, respectively.<p><a name="ldc2_w.Notes"></a><b>Notes</b><br><a name="69419"></a>Only a wide-index version of the <i>ldc2_w</i> instruction exists; there is no <i>ldc2</i> instruction that pushes a <code>long</code> or <code>double</code> with a single-byte index.<p><hr><!-- This inserts footnotes--><p><a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc137.html">Prev</a> | <a href="Instructions2.doc139.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 + -