NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: Kryptos on April 19, 2012, 01:30:04 AM
-
I am looking for a method to compare the contents of YMM/XMM registers to each other. Anyone have any ideas? I am looking for something quick and easy if it exists. I was poking around with PCMPEQB to set all the bits to 0/1 (creating a 127 bit mask), then using a PMOVMSKB instruction. I can't seem to make this work, so any suggestions?
-
Well, I figured it out...
pcmpeqb xmm0, xmm1
pmovmskb r15, xmm0
cmp r15, 0xffff
jne failed
this also seems to work for just [bits 63..0]
vcomisd xmm0, xmm1
jbe failed