NASM - The Netwide Assembler
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Calendar
Login
Register
NASM - The Netwide Assembler
»
NASM Forum
»
Programming with NASM
»
Comparing the contents of YMM/XMM registers
« previous
next »
Print
Pages: [
1
]
Author
Topic: Comparing the contents of YMM/XMM registers (Read 11644 times)
Kryptos
Jr. Member
Posts: 5
Comparing the contents of YMM/XMM registers
«
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?
Logged
Kryptos
Jr. Member
Posts: 5
Re: Comparing the contents of YMM/XMM registers
«
Reply #1 on:
April 20, 2012, 02:54:13 PM »
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
Logged
Print
Pages: [
1
]
« previous
next »
NASM - The Netwide Assembler
»
NASM Forum
»
Programming with NASM
»
Comparing the contents of YMM/XMM registers