ineg :
negate an integer : index : visitInsn()
- Description
- Pops an int off the stack, negates it, and pushes the negated integer
value back onto the stack. This is the same as multiplying the integer by -1.
- Notes
- Because of the two's-complement representation used for negative
numbers, negating Integer.MIN_VALUE actually produces Integer.MIN_VALUE, not
Integer.MAX_VALUE as you might expect.
- See also
- lneg fneg dneg
- Stack
Before
|
After |
value |
-value |
| ... |
- Bytecode
Type
|
Description |
u1
|
ineg
opcode = 0x74 (116)
|