bit/cond_jumps.fj

———- Conditional Jumps

View source on GitHub

Macros

bit

  • bit.if/3 — if x == 0 jump to l0, else jump to l1

  • bit.if/4 — if x[:n] == 0 jump to l0, else jump to l1

  • bit.if1/2if x == 1 jump to l1

  • bit.if1/3if the x[:n] != 0 jump to l1

  • bit.if0/2if x == 0 jump to l0

  • bit.if0/3if x[:n] == 0 jump to l0

  • bit.cmp/5 — Three-way compare on bits: jumps to lt if a<b, eq if a==b, gt if a>b. a, b are bits; lt, eq, gt are addresses.

  • bit.cmp/6 — Three-way compare on n-bit vectors: jumps to lt if a[:n]<b[:n], eq if equal, gt if a[:n]>b[:n].

bit._