The upper byte should always be the same (FF,? or FFFFFFFF,? if greater)
Yes and not. It depends if the byte or dword tested is greater, not the whole xmm register.
But if upper byte or word or dword is FF, you know the entire xmm register is greater, otherwise
you have to check other things.
pcmpgtd xmm2,xmm3; same values in reverse order
pmovmskb ebx,xmm2
.if bit bx, 15
jmp IsGreater; The second original value tested
.endif
.if ax == bx
jmp AreEqual
.else
jmp IsLessThan; The second original value tested
.endif
Not already tested, but this is the idea.
assuming ax is zero, I think that is correct
[/quote]
I modified the code, there was a logical error, have a look.
It should work with whatever value ax and bx assume.
same as: test ah,80h
jnz is_great
test ax,ax
jz is_equal
jmp is_less
I think you have to use 2 registers not only ax. According to my understanding
you cannot check if greater, equal or less than with a single passage. Only
if you are lucky you can find the answer in the first check, if the upper byte is FF
you can say xmm0 is greater than xmm1.