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>
    void  _m_empty(void);

Description:
    The _m_empty function empties the multimedia state.  The values in the
    Multimedia Tag Word (TW) are set to empty (i.e., all ones).  This will
    indicate that no Multimedia registers are in use.

    This function is useful for applications that mix floating-point (FP)
    instructions with multimedia instructions.  Intel maps the multimedia
    registers onto the floating-point registers.  For this reason, you are
    discouraged from intermixing MM code and FP code.  The recommended way
    to write an application with FP instructions and MM instructions is:

     .  Split the FP code and MM code into two separate instruction streams
        such that each stream contains only instructions of one type.
     .  Do not rely on the contents of FP/MM registers across transitions
        from one stream to the other.
     .  Leave the MM state empty at the end of an MM stream using the
        _m_empty function.
     .  Similarly, leave the FP stack empty at the end of an FP stream.


Returns:
    The _m_empty function does not return a value.



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

    long featureflags(void);

    #pragma aux featureflags = \
        ".586"          \
        "mov eax,1"     \
        "CPUID"         \
        "mov eax,edx"   \
        modify [eax ebx ecx edx]

    #define MM_EXTENSION 0x00800000

    main()
      {
        if( featureflags() & MM_EXTENSION ) {
        /*
            sequence of code that uses Multimedia functions
            .
            .
            .
        */

            _m_empty();
        }

        /*
            sequence of code that uses floating-point
            .
            .
            .
        */
      }

Classification:
    Intel

Systems:
    MACRO

See Also:
    _m_from_int, _m_to_int, _m_packsswb, _m_paddb, _m_pand, _m_pcmpeqb,
    _m_pmaddwd, _m_psllw, _m_psraw, _m_psrlw, _m_psubb, _m_punpckhbw

See Also: _m_from_int _m_to_int

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