having read the intel manual I understand that comisd instruction results in bits being set in the eflags register. However I do not uinderstand how to check the eflags register as for unordered arguments to comisd all relevant flags are set and for ordered comparisons individual relevant flags are set. Could someone please give some code as examples of the use of comisd and the checking of the eflags register.

Liamo :)
Posted on 2004-09-06 19:22:59 by Liamo

comisd XMM1, XMM2

jpe comisd_NaN
ja comisd_greaterthan
jc comisd_lessthan
;Code here for equal, or a jmp, or a jz.
Posted on 2004-09-07 04:42:08 by Mirno
Thanks Mirno
Posted on 2004-09-07 17:04:05 by Liamo
If I recall correctly, you can just use ja and jb. For some reason they decided not to use jg and jl. All other should work as expected.
Posted on 2004-09-08 02:42:08 by C0D1F1ED