10.4 Pentium III instructions
-------------------------------
Support for 19 new MMX expanded instructions has been added to C--.
MASKMOVQ mmx,mmx
MOVNTQ m64,mmx
PAVGB mmx,mmx/m64
PAVGW mmx,mmx/m64
PEXTRW r32,mmx,i8
PINSRW mmx,r32/m16,i8
PMAXUB mmx,mmx/m64
PMAXSW mmx,mmx/m64
PMINUB mmx,mmx/m64
PMINSW mmx,mmx/m64
PMOVMSKB r32,mmx
PMULHUW mmx,mmx/m64
PREFETCHT0 mem
PREFETCHT1 mem
PREFETCHT2 mem
PREFETCHNTA mem
SFENCE
PSADBW mmx,mmx/m64
PSHUFW mmx,mmx/m64,i8
There is now also support for 46 instructions involving SSE extensions.
ADDPS xmm,m128/xmm
ADDSS xmm,xmm/m32
ANDNPS xmm,xmm/m128
ANDPS xmm,xmm/m128
ANDPS xmm,xmm/m128
DIVPS xmm,m128/xmm
DIVSS xmm,xmm/m32
MAXPS xmm,m128/xmm
MAXSS xmm,xmm/m32
MINPS xmm,m128/xmm
MINSS xmm,xmm/m32
MULPS xmm,m128/xmm
MULSS xmm,xmm/m32
ORPS xmm,xmm/m128
RCPPS xmm,xmm/m128
RCPSS xmm,xmm/m32
RSQRTPS xmm,xmm/m128
RSQRTSS xmm,xmm/m32
SQRTPS xmm,m128/xmm
SQRTSS xmm,xmm/m32
SUBPS xmm,m128/xmm
SUBSS xmm,xmm/m32
UCOMISS xmm,xmm/m32
UNPCKHPS xmm,xmm/m128
UNPCKLPS xmm,xmm/m128
XORPS xmm,xmm/m128
CMPPS xmm,xmm/m128,i8
CMPSS xmm,xmm/m32,i8
SHUFPS xmm,xmm/m128,i8
CVTPI2PS xmm,m64/mmx
CVTSI2SS xmm,m32/r32
CVTPS2PI mmx,m128/xmm
CVTTPS2PI mmx,xmm/m128
CVTSS2SI r32,xmm/m128
CVTTSS2SI r32,xmm/m128
LDMXCSR m32
STMXCSR m32
MOVHLPS xmm,xmm
MOVLHPS xmm,xmm
MOVMSKPS r32,xmm
MOVNTPS m128,xmm
MOVAPS m128/xmm,xmm/m128
MOVSS xmm/m32,xmm/m32
MOVUPS xmm/m128,m128/xmm
MOVHPS xmm/m64,m64/xmm
MOVLPS xmm/m64,m64/xmm
Many of these instructions can use 64-bit and 128-bit operands. But C--
can work only with 32-bit variables. Therefore any types of variables can
be used for instructions which have more than 32-bit operands. The compiler
will not generate an error message, but it will use the address of this
variable, and the instruction itself will use the correct number of memory
bits, starting from the address of the variable. For example:
For the instruction 'movaps' one of the operands can be 128-bit. Use
the following syntax:
byte var8_128[16];
word var16_128[8];
word var16_128[8];
void proc()
{
asm{
movaps var8_128,xmm0 // The contents of XMM0 will be recorded into a 16-byte array
movaps xmm1,var16_128 // The contents of 8 words will be recorded into XMM1
movaps var32_128,xmm1 // XMM1 will be recorded into an array of 4 double words
}
}