i2s

Operation

Convert int to short

Format

Image

Forms

i2s = 147 (0x93)

Operand

..., value

Stack

..., result

Description

The value on the top of the operand stack must be of type int. It is popped from the operand stack, truncated to a short, then sign-extended to an int result. That result is pushed onto the operand stack.

Notes

The i2s instruction performs a narrowing primitive conversion (JLS §5.1.3). It may lose information about the overall magnitude of value. The result may also not have the same sign as value.

iadd

Operation

Add int

Format

Forms

iadd = 96 (0x60)

Operand

..., value1, value2

Stack

..., result

Description

Both value1 and ...

Get The Java® Virtual Machine Specification, Java SE 8 Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.