Site Tools


Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcvm:7.5.36_if_acmp_cond_w

7.5.36 if_acmp<cond>_w

Branch if reference comparison succeeds (wide index)

Format

if_acmp_w

branchbyte1

branchbyte2

Forms

if_acmpeq_w = 160 (0xa0) if_acmpne_w = 161 (0xa1)

Stack

…, value1, value2 → …

Description

Both value1 and value2 must be of type reference. They are both popped from the operand stack and compared. The results of the comparisons are as follows:

  • eq succeeds if and only if value1 = value2
  • ne succeeds if and only if value1 value2

If the comparison succeeds, the unsigned bytes branchbyte1 and branchbyte2 are used to construct a signed 16-bit branchoffset, where branchoffset is (branchbyte1 _w instruction. The target address must be that of an opcode of an instruction within the method that contains this if_acmp_w instruction.

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

javacard/jcvm/7.5.36_if_acmp_cond_w.txt · Last modified: 2017/05/13 04:11 (external edit)