Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- iAPx86 - <b>packuswb pack words into bytes (unsigned with saturation)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PACKUSWB        Pack Words into Bytes (Unsigned with Saturation)

PACKUSWB destination, source                         CPU: MMX

        Logic
        mm(7..0)   <- SaturateSignedWordToUnsignedByte mm(15..0)
        mm(15..8)  <- SaturateSignedWordToUnsignedByte mm(31..15)
        mm(23..16) <- SaturateSignedWordToUnsignedByte mm(47..32)
        mm(31..24) <- SaturateSignedWordToUnsignedByte mm(63..48)
        mm(39..32) <- SaturateSignedWordToUnsignedByte mm/m64(15..0)
        mm(47..40) <- SaturateSignedWordToUnsignedByte mm/m64(31..16)
        mm(55..48) <- SaturateSignedWordToUnsignedByte mm/m64(47..32)
        mm(63..56) <- SaturateSignedWordToUnsignedByte mm/m64(63..48)

    PACKUSWB packs and saturates four signed words of the source operand
    and four signed words of the destination operand into eight unsigned
    bytes. The result is written to the destination operand.

    If the signed value of a word is larger or smaller than the range of
    an unsigned byte, the value is saturated (in the case of an overflow
    to 0FFh, and in the case of an underflow to 00h).

    The destination operand is an MMX register. The source operand can
    either be an MMX register or a 64-bit memory operand.


    Opcode      Format
    0F 67 /r    PACKUSWB mm, mm/m64

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson