x86-64 instructions for floating-point comparisons

What are the x86-64 instructions for floating-point comparisons like the cmpq for quard-word integer comparison?

asked Jun 27, 2014 by Eric Z Ma (44,280 points)

1 Answer

 
Best answer

The SSE3 extenstions provide two instructions for comparing floating values:

Instruction       Based on    Description
ucomiss S2, S1    S1 - S2     Compare single precision
ucomisd S2, S1    S1 - S2     Compare double precision

As with cmpq, they follow the GAS convention of listing the operands in reverse order. Argument S2 must be in an XMM register, while S1 can either be in an XMM register or in memory.

Reference: https://www.cs.cmu.edu/~fp/courses/15213-s07/misc/asm64-handout.pdf

Check more: https://www.systutorials.com/3024/x86-64-isa-assembly-references/

answered Jun 27, 2014 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...