26.14 TEST instruction (PPlain and PMMX)


日期: 2000-04-02 15:00 | 联系我
关注我: Telegram, Twitter

26.14 TEST instruction (PPlain and PMMX)

The TEST instruction with an immediate operand is only pairable if the destination is AL, AX, or EAX.

TEST register,register and TEST register,memory is always pairable.

Examples:

TEST ECX,ECX ; pairable TEST [mem],EBX ; pairable TEST EDX,256 ; not pairable TEST DWORD PTR [EBX],8000H ; not pairable

To make it pairable, use any of the following methods:

MOV EAX,[EBX] / TEST EAX,8000H MOV EDX,[EBX] / AND EDX,8000H MOV AL,[EBX+1] / TEST AL,80H MOV AL,[EBX+1] / TEST AL,AL ; (result in sign flag)(The reason for this non-pairability is probably that the first byte of the 2-byte instruction is the same as for some other non-pairable instructions, and the processor cannot afford to check the second byte too when determining pairability.)

标签: MMX 优化 | TEST

 文章评论
目前没有任何评论.

↓ 快抢占第1楼,发表你的评论和意见 ↓

当前页面是本站的 百度 MIP 版本。
欲查看完整版本和发表评论请点击:完整版 »

 

程序员小辉 建站于 1997
Copyright © XiaoHui.com; 保留所有权利。