Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 1.11 KB

iii.3.25-clt.md

File metadata and controls

27 lines (15 loc) · 1.11 KB

III.3.25 clt – compare less than

Format Assembly Format Description
FE 04 clt Push 1 (of type int32) if value1 < value2, else push 0.

Stack Transition:

…, value1, value2 → …, result

Description:

The clt instruction compares value1 and value2. If value1 is strictly less than value2, then 1 (of type int32) is pushed on the stack. Otherwise, 0 (of type int32) is pushed on the stack.

For floating-point numbers, clt will return 0 if the numbers are unordered (that is, one or both of the arguments are NaN). As per IEC 60559:1989, infinite values are ordered with respect to normal numbers (e.g., +infinity > 5.0 > -infinity). The acceptable operand types are encapsulated in Table 4: Binary Comparison or Branch Operations.

Exceptions:

None.

Correctness:

Correct CIL provides two values on the stack whose types match those specified in Table 4: Binary Comparison or Branch Operations

Verifiability:

There are no additional verification requirements.