9.3.7.15 Branch Instructions

All offsets to branch instructions are 24-bit signed numbers, which count 32-bit units. This gives Guile effectively a 26-bit address range for relative jumps.

Instruction: j l24:offset

Add offset to the current instruction pointer.

Instruction: jl l24:offset

If the last comparison result is LESS_THAN, add offset, a signed 24-bit number, to the current instruction pointer.

Instruction: je l24:offset

If the last comparison result is EQUAL, add offset, a signed 24-bit number, to the current instruction pointer.

Instruction: jnl l24:offset

If the last comparison result is not LESS_THAN, add offset, a signed 24-bit number, to the current instruction pointer.

Instruction: jne l24:offset

If the last comparison result is not EQUAL, add offset, a signed 24-bit number, to the current instruction pointer.

Instruction: jge l24:offset

If the last comparison result is NONE, add offset, a signed 24-bit number, to the current instruction pointer.

This is intended for use after a <? comparison, and is different from jnl in the way it handles not-a-number (NaN) values: <? sets INVALID instead of NONE if either value is a NaN. For exact numbers, jge is the same as jnl.

Instruction: jnge l24:offset

If the last comparison result is not NONE, add offset, a signed 24-bit number, to the current instruction pointer.

This is intended for use after a <? comparison, and is different from jl in the way it handles not-a-number (NaN) values: <? sets INVALID instead of NONE if either value is a NaN. For exact numbers, jnge is the same as jl.

Instruction: jtable s24:idx v32:length [x8:_ l24:offset]...

Branch to an entry in a table, as in C’s switch statement. idx is a u64 local indicating which entry to branch to. The immediate len indicates the number of entries in the table, and should be greater than or equal to 1. The last entry in the table is the "catch-all" entry. The offset... values are signed 24-bit immediates (l24 encoding), indicating a memory address as a number of 32-bit words away from the current instruction pointer.