Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 1.06 KB

iii.3.65-sub-ovf-type.md

File metadata and controls

24 lines (14 loc) · 1.06 KB

III.3.65 sub.ovf.<type> – subtract integer values, checking for overflow

Format Assembly Format Description
DA sub.ovf Subtract native int from a native int. Signed result shall fit in same size.
DB sub.ovf.un Subtract native unsigned int from a native unsigned int. Unsigned result shall fit in same size.

Stack Transition:

…, value1, value2 → …, result

Description:

The sub.ovf instruction subtracts value2 from value1 and pushes the result on the stack. The type of the values and the return type are specified by the instruction. An exception is thrown if the result does not fit in the result type.

The acceptable operand types and their corresponding result data type is encapsulated in Table 7: Overflow Arithmetic Operations.

Exceptions:

System.OverflowException is thrown if the result can not be represented in the result type.

Correctness and Verifiability:

See Table 7: Overflow Arithmetic Operations.