Opcode PDISTIB


CPU: Cyrix with Extended MMX Instruction Set
Type of Instruction: User

Instruction: PDISTIB dest, src

Description:
dest[7..0] <-
SaturateToUnsignedByte(dest[7..0] + abs(dest[7..0] - src[7..0]))
dest[15..8] <-
SaturateToUnsignedByte(dest[15..8] + abs(dest[15..8] - src[15..8]))
dest[23..16] <-
SaturateToUnsignedByte(dest[23..16] + abs(dest[23..16] - src[23..16]))
dest[31..24] <-
SaturateToUnsignedByte(dest[31..24] + abs(dest[31..24] - src[31..24]))
dest[39..32] <-
SaturateToUnsignedByte(dest[39..32] + abs(dest[39..32] - src[39..32]))
dest[47..40] <-
SaturateToUnsignedByte(dest[47..40] + abs(dest[47..40] - src[47..40]))
dest[55..48] <-
SaturateToUnsignedByte(dest[55..48] + abs(dest[55..48] - src[55..48]))
dest[63..56] <-
SaturateToUnsignedByte(dest[63..56] + abs(dest[63..56] - src[63..56]))

Notes: The PDISTIB instruction calculates the distance between the
unsigned bytes of two source operands, adds the result to the
unsigned byte in the implied destination operand, and saturates the
result. The result is written to the implied MMX register.
The DEST must be an MMX register. The SRC must be a 64-bit
memory operand. The accumulator and destination is an MMX register
which depends on the DEST.

Flags Affected: None

Exceptions:

RM PM VM SMM Description
#GP(0) If Illegal memory operands EA in CS,DS,ES,FS,GS
#SS(0) If Illegal memory operands EA in SS
#PF(fcode) If page fault
#AC #AC If unaligned memory reference then alignment
check enabled and in ring 3.
#UD #UD #UD #UD If CR0.EM = 1
#NM #NM #NM #NM If CR0.TS = 1
#MF #MF #MF #MF If pending FPU Exception
#13 #13 If any part of the operand lies outside of the
EA space from 0 to FFFFH
++++++++++++++++++++++++++++++++++
COP & Times:

PDISTIB mm,m64 0FH 54H PostByte


Copyright by InternetNightmare 2005-2006