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

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


9.3.6.12 Inlined Mathematical Instructions

Inlining mathematical operations has the obvious advantage of handling fixnums without function calls or allocations. The trick, of course, is knowing when the result of an operation will be a fixnum, and there might be a couple bugs here.

More instructions could be added here over time.

As in the previous section, the definitions below show stack parameters instead of instruction stream parameters.

Instruction: add x y
Instruction: add1 x
Instruction: sub x y
Instruction: sub1 x
Instruction: mul x y
Instruction: div x y
Instruction: quo x y
Instruction: rem x y
Instruction: mod x y
Instruction: ee? x y
Instruction: lt? x y
Instruction: gt? x y
Instruction: le? x y
Instruction: ge? x y
Instruction: ash x n
Instruction: logand x y
Instruction: logior x y
Instruction: logxor x y

Inlined implementations of the corresponding mathematical operations.