The IMUL instruction performs signed multiplication. Some forms of the instruction use implicit register operands. The operand combinations for all forms of the instruction are shown in the "Description" column above.
The IMUL instruction clears the OF and CF flags under the following conditions (otherwise the CF and OF flags are set):
┌────────────────┬────────────────────────────────────────┐ │INSTRUCTION FORM│CONDITION FOR CLEARING CR AND OF │ ├────────────────┼────────────────────────────────────────┤ │r/m8 │AL = sign-extend of AL to 16-bits │ ├────────────────┼────────────────────────────────────────┤ │r/m16 │AX = sign-extend of AX to 32-bits │ ├────────────────┼────────────────────────────────────────┤ │r/m32 │EDX:EAX = sign-extend of EAX to 32-bits │ ├────────────────┼────────────────────────────────────────┤ │r16,r/m16 │Result exactly fits within r16 │ ├────────────────┼────────────────────────────────────────┤ │r32,r/m32 │Result exactly fits within r32 │ ├────────────────┼────────────────────────────────────────┤ │r16,r/m16,imm16 │Result exactly fits within r16 │ ├────────────────┼────────────────────────────────────────┤ │r32,r/m32,imm32 │Result exactly fits within r32 │ └────────────────┴────────────────────────────────────────┘