if-<test>z

Purpose

Branch to the given destination if the given register's value compares with 0 as specified.

Note: The branch offset may not be 0. (A spin loop may be legally constructed either by branching around a backward goto or by including a nop as a target before the branch.)

Details

Op & Format Mnemonic / Syntax Arguments
38..3d 21t if-testz vAA, +BBBB
38: if-eqz
39: if-nez
3a: if-ltz
3b: if-gez
3c: if-gtz
3d: if-lez
A: register to test (8 bits)
B: signed branch offset (16 bits)

Constraints

Behavior

Exceptions

None.