7.5.39 if<cond>

Branch if short comparison with zero succeeds

Format

if

branch

Forms

ifeq = 96 (0x60) ifne = 97 (0x61) iflt = 98 (0x62) ifge = 99 (0x63) ifgt = 100 (0x64) ifle = 101 (0x65)

Stack

…, value → …

Description

The value must be of type short. It is popped from the operand stack and compared against zero. All comparisons are signed. The results of the comparisons are as follows:

If the comparison succeeds, branch is used as signed 8-bit offset, and execution proceeds at that offset from the address of the opcode of this if instruction. The target address must be that of an opcode of an instruction within the method that contains this if instruction.

Otherwise, execution proceeds at the address of the instruction following this if instruction.