Difference between revisions of "Assembler:Commands:COMISS"

From Cheat Engine
Jump to navigation Jump to search
(Created page with "Category:Assembler '''command''' comiss ''operand1'', ''operand2'' Compares the single-precision floating-point (single-fp) value in the low doubleword of the first opera...")
 
m
 
(6 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
The '''CF''', '''ZF''' and '''PF''' flags are set according to the result (unordered, greater than, less than, or equal).
 
The '''CF''', '''ZF''' and '''PF''' flags are set according to the result (unordered, greater than, less than, or equal).
 
The '''OF''', '''SF ''' and '''AF''' flags are set to 0.
 
The '''OF''', '''SF ''' and '''AF''' flags are set to 0.
The unordered result is returned if either source operand is a NaN (QNaN or SNaN).
 
  
  
=== Command Parameters ===
+
== Command Parameters ==
 
{|width="85%" cellpadding="10%" cellpadding="5%" cellspacing="0" border="0"
 
{|width="85%" cellpadding="10%" cellpadding="5%" cellspacing="0" border="0"
 
!align="left"|Parameter
 
!align="left"|Parameter
Line 20: Line 19:
 
|The second operand to compare. May be an XMM register or a 32 bit memory location
 
|The second operand to compare. May be an XMM register or a 32 bit memory location
 
|}
 
|}
 +
 +
== Resulting Flag State ==
 +
{|width="85%" cellpadding="5%" cellspacing="0" border="0"
 +
!align="left"|Parameters
 +
!style="width: 2%;background-color:white;" align="left"|ZF
 +
!style="width: 2%;background-color:white;" align="left"|PF
 +
!style="width: 76%;background-color:white;" align="left"|CF
 +
|-
 +
|operand1 < operand2
 +
|0
 +
|0
 +
|1
 +
|-
 +
|operand1 = operand2
 +
|1
 +
|0
 +
|0
 +
|-
 +
|operand1 > operand2
 +
|0
 +
|0
 +
|0
 +
|-
 +
|unordered
 +
|1
 +
|1
 +
|1
 +
|}
 +
The unordered result is returned if either source operand is a NaN (QNaN or SNaN).
 +
The OF, SF and AF flags are set to 0.
  
 
== Examples ==
 
== Examples ==

Latest revision as of 16:25, 25 March 2022

command comiss operand1, operand2

Compares the single-precision floating-point (single-fp) value in the low doubleword of the first operand with the single-fp value in the low doubleword of the second operand and sets the status flags in the (E)FLAGS register.

The CF, ZF and PF flags are set according to the result (unordered, greater than, less than, or equal). The OF, SF and AF flags are set to 0.


Command Parameters[edit]

Parameter Description
operand1 The first operand to compare. Must be a XMM register.
operand2 The second operand to compare. May be an XMM register or a 32 bit memory location

Resulting Flag State[edit]

Parameters ZF PF CF
operand1 < operand2 0 0 1
operand1 = operand2 1 0 0
operand1 > operand2 0 0 0
unordered 1 1 1

The unordered result is returned if either source operand is a NaN (QNaN or SNaN). The OF, SF and AF flags are set to 0.

Examples[edit]

comiss xmm2,xmm5
comiss xmm2,[eax]
comiss xmm0,[00123ABC]

See also[edit]

External links[edit]