Skip to content

Multiplication

The following opcodes are used for multiplicaction:

  • MULI — Multiply Signed Integer
  • MULU — Multiply Unsigned Integer
  • MULF — Multiply Floating Point

MULI — Multiply Signed Integer

Algorithm
    L2 = L2 * <signed_imm>
    L2 = L2 * <reg_val>
    L2 = L2 * <const>
1
2
3
4
5
6
7
8
    ; imm +ve
        MULI    1
    ; imm -ve
        MULI    -123
    ; reg val
        MULI    val(QT)
    ; const
        MULI    SOME_CONST_VAL
Opcode Operand Type Destination
15 Signed 64-bit integer L2 (implicit)

Identified as memonic #MULI, MULI is used to multiply the L2 register with a 64-bit integer.

MULU — Multiply Unsigned Integer

Algorithm
    L3 = L3 * <unsigned_imm>
    L3 = L3 * <reg_val>
    L3 = L3 * <const>
1
2
3
4
5
6
    ; imm +ve
        MULU    1
    ; reg val
        MULU    val(QT)
    ; const
        MULU    SOME_CONST_VAL
Opcode Operand Type Destination
20 Unsigned 64-bit value L3 (implicit)

Identified as memonic #MULU, MULU is used to multiply the L3 register with a 64-bit unsigned value

MULF — Multiply Float value

Algorithm
    L1 = L1 * <float>
    L1 = L1 * <reg_val>
    L1 = L1 * <const>
1
2
3
4
5
6
    ; imm float
        MULF    3.14
    ; reg val
        MULF    val(QT)
    ; const
        MULF    SOME_CONST_VAL
Opcode Operand Type Destination
25 64-bit Float Value L1 (implicit)

Identified as memonic #MULF, MULF is used to multiply the L1 register with a 64-bit float value