Intel and compatable CPU's Programming Information |
|||
Intel SSE MMX2 KNI documentation AMD 64 Bit & Opteron resource on this site Intel Itanium 64 Bit processor Intel 80386 Reference Programmer's Manual Our Partners: |
prev: MOVZX Move with Zero-Extend next: NEG Two's Complement Negation
MUL -- Unsigned Multiplication of AL or AXOpcode Instruction Clocks Description F6 /4 MUL AL,r/m8 9-14/12-17 Unsigned multiply (AX := AL * r/m byte) F7 /4 MUL AX,r/m16 9-22/12-25 Unsigned multiply (DX:AX := AX * r/m word) F7 /4 MUL EAX,r/m32 9-38/12-41 Unsigned multiply (EDX:EAX := EAX * r/m dword) NotesThe 80386 uses an early-out multiply algorithm. The actual number of clocks depends on the position of the most significant bit in the optimizing multiplier, shown underlined above. The optimization occurs for positive and negative multiplier values. Because of the early-out algorithm, clock counts given are minimum to maximum. To calculate the actual clocks, use the following formula:Actual clock = if <> 0 then max(ceiling(log{2}(m)), 3) + 6 clocks; Actual clock = if = 0 then 9 clockswhere m is the multiplier. OperationIF byte-size operation THEN AX := AL * r/m8 ELSE (* word or doubleword operation *) IF OperandSize = 16 THEN DX:AX := AX * r/m16 ELSE (* OperandSize = 32 *) EDX:EAX := EAX * r/m32 FI; FI; DescriptionMUL performs unsigned multiplication. Its actions depend on the size of its operand, as follows:
Flags AffectedOF and CF as described above; SF, ZF, AF, PF, and CF are undefinedProtected Mode Exceptions#GP(0) for an illegal memory operand effective address in the CS, DS, ES, FS, or GS segments; #SS(0) for an illegal address in the SS segment; #PF(fault-code) for a page faultReal Address Mode ExceptionsInterrupt 13 if any part of the operand would lie outside of the effective address space from 0 to 0FFFFHVirtual 8086 Mode ExceptionsSame exceptions as in Real Address Mode; #PF(fault-code) for a page fault
up:
Chapter 17 -- 80386 Instruction Set |