ldiv : divide a long integer : index : visitInsn()

Description
Pops the top two two-word long integers from the stack and divides by the top long integer (i.e. computes value2 / value1). The result is rounded to the nearest integer, with rounding going towards 0. The long integer quotient result is pushed back onto the stack.
Exceptions
ArithmeticException - the divisor (value2) is zero.
Notes
Because of the two's-complement representation used for negative numbers, dividing Long.MIN_VALUE by -1 produces Long.MIN_VALUE, not Long.MAX_VALUE as you might expect.
See also
idiv fdiv ddiv
Stack
Before After
value1-word1 result-word1
value1-word2 result-word2
value2-word1 ...
value2-word2 ...
... ...
Bytecode
Type Description
u1 ldiv opcode = 0x6D (109)