Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - this set of functions allows access to intel architecture multimedia http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
This set of functions allows access to Intel Architecture Multimedia
Extensions (MMX).  These functions are implemented as in-line intrinsic
functions.  The general format for most functions is:


     mm_result = mm_function( mm_operand1, mm_operand2 );

These functions provide a simple model for use of Intel Multimedia Extension
(MMX).  More advanced use of MMX can be implemented in much the same way
that these functions are implemented.  See the <mmintrin.h> header file for
examples.  The following functions are defined:

_m_empty
    empty multimedia state

_m_from_int
    form 64-bit MM value from unsigned 32-bit integer value

_m_packssdw
    pack and saturate 32-bit double-words from two MM elements into signed
    16-bit words

_m_packsswb
    pack and saturate 16-bit words from two MM elements into signed bytes

_m_packuswb
    pack and saturate signed 16-bit words from two MM elements into unsigned
    bytes

_m_paddb
    add packed bytes

_m_paddd
    add packed 32-bit double-words

_m_paddsb
    add packed signed bytes with saturation

_m_paddsw
    add packed signed 16-bit words with saturation

_m_paddusb
    add packed unsigned bytes with saturation

_m_paddusw
    add packed unsigned 16-bit words with saturation

_m_paddw
    add packed 16-bit words

_m_pand
    AND 64 bits of two MM elements

_m_pandn
    invert the 64 bits in MM element, then AND 64 bits from second MM
    element

_m_pcmpeqb
    compare packed bytes for equality

_m_pcmpeqd
    compare packed 32-bit double-words for equality

_m_pcmpeqw
    compare packed 16-bit words for equality

_m_pcmpgtb
    compare packed bytes for greater than relationship

_m_pcmpgtd
    compare packed 32-bit double-words for greater than relationship

_m_pcmpgtw
    compare packed 16-bit words for greater than relationship

_m_pmaddwd
    multiply packed 16-bit words, then add 32-bit results pair-wise

_m_pmulhw
    multiply the packed 16-bit words of two MM elements, then store
    high-order 16 bits of results

_m_pmullw
    multiply the packed 16-bit words of two MM elements, then store
    low-order 16 bits of results

_m_por
    OR 64 bits of two MM elements

_m_pslld
    shift left each 32-bit double-word by amount specified in second MM
    element

_m_pslldi
    shift left each 32-bit double-word by amount specified in constant value

_m_psllq
    shift left each 64-bit quad-word by amount specified in second MM
    element

_m_psllqi
    shift left each 64-bit quad-word by amount specified in constant value

_m_psllw
    shift left each 16-bit word by amount specified in second MM element

_m_psllwi
    shift left each 16-bit word by amount specified in constant value

_m_psrad
    shift right (with sign propagation) each 32-bit double-word by amount
    specified in second MM element

_m_psradi
    shift right (with sign propagation) each 32-bit double-word by amount
    specified in constant value

_m_psraw
    shift right (with sign propagation) each 16-bit word by amount specified
    in second MM element

_m_psrawi
    shift right (with sign propagation) each 16-bit word by amount specified
    in constant value

_m_psrld
    shift right (with zero fill) each 32-bit double-word by an amount
    specified in second MM element

_m_psrldi
    shift right (with zero fill) each 32-bit double-word by an amount
    specified in constant value

_m_psrlq
    shift right (with zero fill) each 64-bit quad-word by an amount
    specified in second MM element

_m_psrlqi
    shift right (with zero fill) each 64-bit quad-word by an amount
    specified in constant value

_m_psrlw
    shift right (with zero fill) each 16-bit word by an amount specified in
    second MM element

_m_psrlwi
    shift right (with zero fill) each 16-bit word by an amount specified in
    constant value

_m_psubb
    subtract packed bytes in MM element from second MM element

_m_psubd
    subtract packed 32-bit dwords in MM element from second MM element

_m_psubsb
    subtract packed signed bytes in MM element from second MM element with
    saturation

_m_psubsw
    subtract packed signed 16-bit words in MM element from second MM element
    with saturation

_m_psubusb
    subtract packed unsigned bytes in MM element from second MM element with
    saturation

_m_psubusw
    subtract packed unsigned 16-bit words in MM element from second MM
    element with saturation

_m_psubw
    subtract packed 16-bit words in MM element from second MM element

_m_punpckhbw
    interleave bytes from the high halves of two MM elements

_m_punpckhdq
    interleave 32-bit double-words from the high halves of two MM elements

_m_punpckhwd
    interleave 16-bit words from the high halves of two MM elements

_m_punpcklbw
    interleave bytes from the low halves of two MM elements

_m_punpckldq
    interleave 32-bit double-words from the low halves of two MM elements

_m_punpcklwd
    interleave 16-bit words from the low halves of two MM elements

_m_pxor
    XOR 64 bits from two MM elements

_m_to_int
    retrieve low-order 32 bits from MM value

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