Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 902 Bytes

iii.3.32-div-un.md

File metadata and controls

32 lines (20 loc) · 902 Bytes

III.3.32 div.un – divide integer values, unsigned

Format Assembly Format Description
5C div.un Divide two values, unsigned, returning a quotient.

Stack Transition:

…, value1, value2 → …, result

Description:

The div.un instruction computes value1 divided by value2, both taken as unsigned integers, and pushes the result on the stack.

The acceptable operand types and their corresponding result data type are encapsulated in Table 5: Integer Operations.

Exceptions:

System.DivideByZeroException is thrown if value2 is zero.

Example:

 
+5 div.un +3 is 1
+5 div.un -3 is 0
-5 div.un +3 is 14316557630 or 0x55555553
-5 div.un -3 is 0

Correctness and Verifiability

See Table 5: Integer Operations.