Next: , Previous: , Up: Instruction Set   [Contents][Index]


9.3.7.6 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: br l24:offset

Add offset to the current instruction pointer.

All the conditional branch instructions described below have an invert parameter, which if true reverses the test: br-if-true becomes br-if-false, and so on.

Instruction: br-if-true u24:test b1:invert x7:_ l24:offset

If the value in test is true for the purposes of Scheme, add offset to the current instruction pointer.

Instruction: br-if-null u24:test b1:invert x7:_ l24:offset

If the value in test is the end-of-list or Lisp nil, add offset to the current instruction pointer.

Instruction: br-if-nil u24:test b1:invert x7:_ l24:offset

If the value in test is false to Lisp, add offset to the current instruction pointer.

Instruction: br-if-pair u24:test b1:invert x7:_ l24:offset

If the value in test is a pair, add offset to the current instruction pointer.

Instruction: br-if-struct u24:test b1:invert x7:_ l24:offset

If the value in test is a struct, add offset number to the current instruction pointer.

Instruction: br-if-char u24:test b1:invert x7:_ l24:offset

If the value in test is a char, add offset to the current instruction pointer.

Instruction: br-if-tc7 u24:test b1:invert u7:tc7 l24:offset

If the value in test has the TC7 given in the second word, add offset to the current instruction pointer. TC7 codes are part of the way Guile represents non-immediate objects, and are deep wizardry. See libguile/tags.h for all the details.

Instruction: br-if-eq u12:a u12:b b1:invert x7:_ l24:offset
Instruction: br-if-eqv u12:a u12:b b1:invert x7:_ l24:offset
Instruction: br-if-equal u12:a u12:b b1:invert x7:_ l24:offset

If the value in a is eq?, eqv?, or equal? to the value in b, respectively, add offset to the current instruction pointer.

Instruction: br-if-= u12:a u12:b b1:invert x7:_ l24:offset
Instruction: br-if-< u12:a u12:b b1:invert x7:_ l24:offset
Instruction: br-if-<= u12:a u12:b b1:invert x7:_ l24:offset

If the value in a is =, <, or <= to the value in b, respectively, add offset to the current instruction pointer.


Next: , Previous: , Up: Instruction Set   [Contents][Index]