MULSD
Usage: MULSD src Modifies flags: See below
Multiplies the low double-precision floating-point value in the 'src' by the low double-precision floating-point value in the 'dest' and stores the double-precision floating-point result in the 'dest' operand.
Scalar Single-FP Multiply
MULSD xmm1,xmm2/mem32 ; F2 0F 59 /r [WILLAMETTE,SSE2]
MULSD multiplies the lowest double-precision FP values of both operands, and stores the result in the low quadword of xmm1.
The 'src' operand can be an XMM register or a 64-bit memory location. The 'dest' operand is an XMM register. The high quadword of the 'dest' operand remains unchanged.
EXAMPLE:
mulsd
MULPS
Usage: MULPS src Modifies flags: See below.
Performs an SIMD multiply of the four packed single-precision floating-point values from the 'src' and the 'dest' and stores the packed single-precision floating-point results in the 'dest' operand.
Packed Single-FP Multiply
MULPS xmm1,xmm2/mem128 ; 0F 59 /r [KATMAI,SSE]
MULPS performs a SIMD multiply of the packed single-precision FP values in both operands, and stores the results in the destination register.
The 'src' operand can be an XMM register or a 128-bit memory location. The 'dest' operand is an XMM register.
EXAMPLE:
mulps xmm1 xmm2
MULPD
Usage: MULPD src Modifies flags: See below.
Performs an SIMD multiply of the two packed double-precision floating-point values from the 'src' and the 'dest' and stores the packed double-precision floating-point results in the 'dest' operand.
Packed Single-FP Multiply
MULPD xmm1,xmm2/mem128 ; 66 0F 59 /r [WILLAMETTE,SSE2]
MULPD performs a SIMD multiply of the packed double-precision FP values in both operands, and stores the results in the destination register.
The 'src' operand can be an XMM register or a 128-bit memory location. The 'dest' operand is an XMM register.
EXAMPLE:
mulpd
MUL
Usage: MUL src Modifies flags: CF OF (AF,PF,SF,ZF undefined)
Unsigned multiply of the accumulator by the source.
Unsigned Integer Multiply
MUL r/m8 ; F6 /4 [8086]
MUL r/m16 ; o16 F7 /4 [8086]
MUL r/m32 ; o32 F7 /4 [386]
MUL performs unsigned integer multiplication. The other operand to the multiplication, and the destination operand, are implicit, in the following way:
For MUL r/m8, AL a byte value is multiplied by the given operand; the product is stored in AX.
For MUL r/m16, AX a word value is multiplied by the given operand; the product is stored in DX:AX.
For MUL r/m32, EAX a double word value is multiplied by the given operand; the product is stored in EDX:EAX.
The 386+ uses an early out algorithm which makes multiplying any size value in EAX as fast as in the 8 or16 bit registers.
Signed integer multiplication is performed by the IMUL.
EXAMPLE:
;Create buffer
mov eax d$bmWidthBytes | mul D$bHeight ; eax = biWidthBytes * bHeight
call 'KERNEL32.VirtualAlloc' &NULL eax &MEM_RESERVE+&MEM_COMMIT &PAGE_READWRITE
MOVZX
Usage: MOVZX dest,src Modifies flags: None
Copies the value of the 'src' operand to the 'dest' register with the zeroes extended.
Move Data with Sign or Zero Extend
MOVSX reg16,r/m8 ; o16 0F BE /r [386]
MOVSX reg32,r/m8 ; o32 0F BE /r [386]
MOVSX reg32,r/m16 ; o32 0F BF /r [386]
MOVZX reg16,r/m8 ; o16 0F B6 /r [386]
MOVZX reg32,r/m8 ; o32 0F B6 /r [386]
MOVZX reg32,r/m16 ; o32 0F B7 /r [386]
MOVSX sign-extends its source (second) operand to the length of its destination (first) operand, and copies the result into the destination operand. MOVZX does the same, but zero-extends rather than sign-extending.
EXAMPLE:
movzx eax Label
MOVUPS
Usage: MOVUPS dest,src Modifies flags: None
Moves a double quadword containing four packed single-precision floating-point values from the 'src' to the 'dest'.
Move Unaligned Packed Single-Precision FP Values
MOVUPS xmm1,xmm2/mem128 ; 0F 10 /r [KATMAI,SSE]
MOVUPS xmm1/mem128,xmm2 ; 0F 11 /r [KATMAI,SSE]
MOVUPS moves a double quadword containing 4 packed single-precision FP values from the source operand to the destination. This instruction makes no assumptions about alignment of memory operands.
This instruction can be used to load an XMM register from a 128-bit memory location, store the contents of an XMM register into a 128-bit memory location, or move data between two XMM registers. When the 'src' or 'dest' operand is a memory operand, the operand may be unaligned on a 16-byte boundary without causing a general-protection exception (#GP) to be generated.
To move data in and out of memory locations that are known to be on 16-byte boundaries, use the MOVAPS instruction.
EXAMPLE:
movups xmm1 Label
MOVUPD
Usage: MOVUPD dest,src Modifies flags: None
Moves a double quadword containing two packed double-precision floating-point values from the 'src' to the 'dest'.
Move Unaligned Packed Double-Precision FP Values
MOVUPD xmm1,xmm2/mem128 ; 66 0F 10 /r [WILLAMETTE,SSE2]
MOVUPD xmm1/mem128,xmm2 ; 66 0F 11 /r [WILLAMETTE,SSE2]
MOVUPD moves a double quadword containing 2 packed double-precision FP values from the source operand to the destination. This instruction makes no assumptions about alignment of memory operands.
This instruction can be used to load an XMM register from a 128-bit memory location, store the contents of an XMM register into a 128-bit memory location, or move data between two XMM registers. When the 'src' or 'dest' operand is a memory operand, the operand may be unaligned on a 16-byte boundary without causing a general-protection exception (#GP) to be generated.
To move data in and out of memory locations that are known to be on 16-byte boundaries, use the MOVAPD instruction.
EXAMPLE:
movupd xmm1 Label
MOVSX
Usage: MOVSX dest,src Modifies flags: None
Copies the value of the 'src' operand to the 'dest' register with the sign extended.
Move Data with Sign or Zero Extend
MOVSX reg16,r/m8 ; o16 0F BE /r [386]
MOVSX reg32,r/m8 ; o32 0F BE /r [386]
MOVSX reg32,r/m16 ; o32 0F BF /r [386]
MOVZX reg16,r/m8 ; o16 0F B6 /r [386]
MOVZX reg32,r/m8 ; o32 0F B6 /r [386]
MOVZX reg32,r/m16 ; o32 0F B7 /r [386]
MOVSX sign-extends its source (second) operand to the length of its destination (first) operand, and copies the result into the destination operand. MOVZX does the same, but zero-extends rather than sign-extending.
EXAMPLE:
movsx ebx Label
MOVSW
Usage: MOVSW dest,src Modifies flags: None
Copies word from location addressed by ESI (even if operands are given) to the location EDI 'dest' and updates ESI and EDI based on the size of the operand or instruction used. ESI and EDI are incremented when the Direction Flag is cleared and decremented when the Direction Flag is Set. Use with REP prefixes.
Move String
MOVSB ; A4 [8086]
MOVSW ; o16 A5 [8086]
MOVSD ; o32 A5 [386]
MOVSB copies the byte at ESI to EDI. It then increments or decrements (depending on the direction flag: increments if the flag is clear, decrements if it is set) ESI and EDI.
MOVSW and MOVSD work in the same way, but they copy a word or a doubleword instead of a byte, and increment or decrement the addressing registers by 2 or 4 instead of 1.
The REP prefix may be used to repeat the instruction CX (or ECX - again, the address size chooses which) times.
EXAMPLE:
While B$esi <> 0 | movsw | End_While
MOVSS
Usage: MOVSS dest,src Modifies flags: None
Moves a scalar single-precision floating-point value from the 'src' (second operand) to the 'dest' (first operand).
Move Scalar Single-Precision FP Value
MOVSS xmm1,xmm2/m32 ; F3 0F 10 /r [KATMAI,SSE]
MOVSS xmm1/m32,xmm2 ; F3 0F 11 /r [KATMAI,SSE]
MOVSS moves a single-precision FP value from the source operand to the destination operand. When the source or destination is a register, the low-order FP value is read or written.
The 'src' and 'dest' operands can be XMM registers or 32-bit memory locations. This instruction can be used to move a single-precision floating-point value to and from the low doubleword of an XMM register and a 32-bit memory location, or to move a single-precision floating-point value between the low doublewords of two XMM registers. The instruction cannot be used to transfer data between memory locations.
EXAMPLE:
movss xmm1 Label