Question

In the CLI specifications (ECMA-335, page 329), and also on MSDN, it is stated that the CIL opcode bge is equivalent to performing a clt.un followed by a brfalse.

This baffles me. I don't understand why the equivalent is the unordered clt.un, and not the regular clt. Especially considering there is also a bge.un, which does not state an equivalent set of instructions. I whould have expected bge to be equivalent to [clt, brfalse], and bge.un to be equivalent to [clt.un, brfalse].

Is this an error in the specifications or am I missing something?

Was it helpful?

Solution

That PDF states:

The effect of a bge target instruction is identical to:

  • If stack operands are integers, then clt followed by a brfalse target
  • If stack operands are floating-point, then clt.un followed by a brfalse target
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top