Next: Inlined Bytevector Instructions, Previous: Inlined Scheme Instructions, Up: Instruction Set [Contents][Index]

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:
**add1***s12:*`dst`s12:`src` Add 1 to the value in

`src`.

- Instruction:
**sub***s8:*`dst`s8:`a`s8:`b` Subtract

`b`from`a`.

- Instruction:
**sub1***s12:*`dst`s12:`src` Subtract 1 from

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