📄 instructions2.doc89.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.doc88.html">Prev</a> | <a href="Instructions2.doc90.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><hr><br> <a name="if_acmpcond"></a><h2>if_acmp<cond></h2><a name="if_acmpcond.Operation"></a><b>Operation</b><br><a name="68524"></a>Branch if <code>reference</code> comparison succeeds<p><Table Border="3"><tr><td><a name="68519"></a> <i>if_acmp<cond></i><td><a name="87568"></a> <tr><td><a name="68521"></a> <i>branchbyte1</i><td><a name="87568"></a> <tr><td><a name="68523"></a> <i>branchbyte2</i><td><a name="87568"></a> </Table><Table><tr><td></Table><p><a name="if_acmpcond.Forms"></a><b>Forms</b><br><a name="68525"></a><i>if_acmpeq</i> = 165 (0xa5) <i>if_acmpne</i> = 166 (0xa6)<p><a name="if_acmpcond.Stack"></a><b>Stack</b><br><a name="68526"></a>..., <i>value1</i>, <i>value2</i> <img src="chars/arrwdbrt.gif"> ...<p><a name="if_acmpcond.Description"></a><b>Description</b><br><a name="68527"></a>Both <i>value1</i> and <i>value2</i> must be of type <code>reference</code>. They are both popped from the operand stack and compared. The results of the comparison are as follows:<p><ul><a name="68528"></a><li><i>eq</i> succeeds if and only if <i>value1</i> = <i>value2</i><a name="68529"></a><li><i>ne</i> succeeds if and only if <i>value1</i> <img src="chars/notequal.gif"> <i>value2</i></ul><a name="68530"></a>If <em>the comparison succeeds, the unsigned </em><i>branchbyte1</i> and <i>branchbyte2</i> are used to construct a signed 16-bit offset, where the offset is calculated to be (<i>branchbyte1</i> << 8) | <i>branchbyte2</i>. Execution then proceeds at that offset from the address of the opcode of this <i>if_acmp<cond></i> instruction. The target address must be that of an opcode of an instruction within the method that contains this <i>if_acmp<cond></i> instruction.<p><a name="68531"></a>Otherwise, if the comparison fails, execution proceeds at the address of the instruction following this <i>if_acmp<cond></i> instruction.<p><hr><!-- This inserts footnotes--><p><a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc88.html">Prev</a> | <a href="Instructions2.doc90.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 + -