Warning: This is the manual of the legacy Guile 2.2 series. You may want to read the manual of the current stable series instead.

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 s24: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 s24: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 s24: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 s24: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 s24: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 s24: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 s24: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 s24:a x8:_ s24:b b1:invert x7:_ l24:offset
Instruction: br-if-eqv s24:a x8:_ s24:b b1:invert x7:_ l24:offset

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

Instruction: br-if-= s24:a x8:_ s24:b b1:invert x7:_ l24:offset
Instruction: br-if-< s24:a x8:_ s24:b b1:invert x7:_ l24:offset
Instruction: br-if-<= s24:a x8:_ s24: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.

Instruction: br-if-logtest s24:a x8:_ s24:b b1:invert x7:_ l24:offset

If the bitwise intersection of the integers in a and b is nonzero, add offset to the current instruction pointer.


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