Skip to content

Latest commit

 

History

History
29 lines (16 loc) · 1.01 KB

iii.3.21-ceq.md

File metadata and controls

29 lines (16 loc) · 1.01 KB

III.3.21 ceq – compare equal

Format Assembly Format Description
FE 01 ceq Push 1 (of type int32) if value1 equals value2, else push 0.

Stack Transition:

…, value1, value2 → …, result

Description:

The ceq instruction compares value1 and value2. If value1 is equal to 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, ceq will return 0 if the numbers are unordered (either or both are NaN). The infinite values are equal to themselves.

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.