SSE2 test xmm bitmask directly without using 'pmovmskb'
问题 consider we have this: .... pxor xmm1, xmm1 movdqu xmm0, [reax] pcmpeqb xmm0, xmm1 pmovmskb eax, xmm0 test ax , ax jz .zero ... is there any way to not use 'pmovmskb' and test the bitmask directly from xmm0 (to check if it's zero) ? is there any SSE instruction for this action ? in fact, im searching for something like 'ptest xmm0, xmm0' action but in SSE2 ... not SSE4 回答1: It's generally not worth using SSE4.1 ptest xmm0,xmm0 on a pcmpeqb result, especially not if you're branching. pmovmskb