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


9.3.7.11 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.

All of these operations place their result in their first operand, dst.

Instruction: add s8:dst s8:a s8:b

Add a to b.

Instruction: add/immediate s8:dst s8:src c8:imm

Add the unsigned integer imm to the value in src.

Instruction: sub s8:dst s8:a s8:b

Subtract b from a.

Instruction: sub/immediate s8:dst s8:src s8:imm

Subtract the unsigned integer imm from the value in src.

Instruction: mul s8:dst s8:a s8:b

Multiply a and b.

Instruction: div s8:dst s8:a s8:b

Divide a by b.

Instruction: quo s8:dst s8:a s8:b

Divide a by b.

Instruction: rem s8:dst s8:a s8:b

Divide a by b.

Instruction: mod s8:dst s8:a s8:b

Compute the modulo of a by b.

Instruction: ash s8:dst s8:a s8:b

Shift a arithmetically by b bits.

Instruction: logand s8:dst s8:a s8:b

Compute the bitwise and of a and b.

Instruction: logior s8:dst s8:a s8:b

Compute the bitwise inclusive or of a with b.

Instruction: logxor s8:dst s8:a s8:b

Compute the bitwise exclusive or of a with b.

Instruction: logsub s8:dst s8:a s8:b

Place the bitwise and of a and the bitwise not of b into dst.


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