MMX指令集在C++中的使用
2010-01-23 20:32:30 来源:WEB开发网[ 比较指令]
PCMPEQB Compare packed bytes for equal.
PCMPEQW Compare packed words for equal.
PCMPEQD Compare packed doublewords for equal.
PCMPGTB Compare packed signed byte integers for greater than.
PCMPGTW Compare packed signed word integers for greater than.
PCMPGTD Compare packed signed doubleword integers for greater than.
这组指令用于成组比较数据
[ 位逻辑指令]
PAND Bitwise logical AND.
PANDN Bitwise logical AND NOT.
POR Bitwise logical OR.
PXOR Bitwise logical exclusive OR.
这组指令与AND,XOR基本相同,都是按位进行逻辑运算。
[ 移位和循环移位指令]
PSLLW //Shift packed words left logical.
PSLLD //Shift packed doublewords left logical.
PSLLQ //Shift packed quadword left logical.
PSRLW //Shift packed words right logical.
PSRLD //Shift packed doublewords right logical.
PSRLQ //Shift packed quadword right logical.
PSRAW //Shift packed words right arithmetic.
PSRAD //Shift packed doublewords right arithmetic.
[ 状态管理指令]
EMMS //Empty MMX state.
在VC中要求所有的MMX指令调用完毕后都要调用这个指令清空
例如:__asm{
以上是所有的MMX指令,你可以测试使用其中的指令,他的工作原理就是单指令,多数据
…..MMX 语句
EMMS //清空状态
}
更多精彩
赞助商链接