Contents | Prev | Next | Index

swap

Operation
Swap top two operand stack words

swap

Forms
swap = 95 (0x5f)

Stack
..., word2, word1 ..., word1, word2

Description
The top two words on the operand stack are swapped.

The swap instruction must not be used unless each of word2 and word1 is a word that contains a 32-bit data type.

Notes
Except for restrictions preserving the integrity of 64-bit data types, the swap instruction operates on untyped words, ignoring the types of the data they contain.


Contents | Prev | Next | Index

Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com