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 - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <mmintrin.h>
    __m64 _m_paddusb(__m64 *m1, __m64 *m2);

Description:
    The unsigned 8-bit bytes of m2 are added to the respective unsigned
    8-bit bytes of m1 and the result is stored in memory.  Saturation occurs
    when a result exceeds the range of an unsigned byte.  In the case where
    a result is a byte larger than 0xff (overflow), it is clamped to 0xff.

Returns:
    The result of adding the packed unsigned bytes, with saturation, of two
    64-bit multimedia values is returned.

Example:
    #include <stdio.h>
    #include <mmintrin.h>

    #define AS_BYTES "%2.2x %2.2x %2.2x %2.2x " \
                     "%2.2x %2.2x %2.2x %2.2x"

    __m64   a;
    __m64   b = { 0x8aacceef02244668 };
    __m64   c = { 0x76543211fedcba98 };

    void main()
      {
        a = _m_paddusb( b, c );
        printf( "m1="AS_BYTES"\n"
                "m2="AS_BYTES"\n"
                "mm="AS_BYTES"\n",
            b._8[7], b._8[6], b._8[5], b._8[4],
            b._8[3], b._8[2], b._8[1], b._8[0],
            c._8[7], c._8[6], c._8[5], c._8[4],
            c._8[3], c._8[2], c._8[1], c._8[0],
            a._8[7], a._8[6], a._8[5], a._8[4],
            a._8[3], a._8[2], a._8[1], a._8[0] );
      }

    produces the following:

    m1=8a ac ce ef 02 24 46 68
    m2=76 54 32 11 fe dc ba 98
    mm=ff ff ff ff ff ff ff ff

Classification:
    Intel

Systems:
    MACRO

See Also:
    _m_empty, _m_paddb, _m_paddd, _m_paddsb, _m_paddsw, _m_paddusw, _m_paddw

See Also: _m_empty _m_paddb

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