---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 26 Edition"
java_version: 26
chapter: "Chapter 6. The Java Virtual Machine Instruction Set"
section: "6.5.dup2_x2"
heading: "dup2_x2"
parent: "6.5. Instructions"
source: https://docs.oracle.com/javase/specs/jvms/se26/html/jvms-6.html#jvms-6.5.dup2_x2
id: "6.5.dup2_x2"
url: https://jvm.obfuscated.software/jvms/se26/6.5.dup2_x2.html
raw: https://jvm.obfuscated.software/jvms/se26/6.5.dup2_x2.md
---

# dup2_x2

## Operation

Duplicate the top one or two operand stack values and insert two, three, or four values down

## Format

```
dup2_x2
```

## Forms

*dup2_x2* = 94 (0x5e)

## Operand Stack

Form 1:

..., *value4*, *value3*, *value2*, *value1* →

..., *value2*, *value1*, *value4*, *value3*, *value2*, *value1*

where *value1*, *value2*, *value3*, and *value4* are all values of a category 1 computational type ([§2.11.1](2.11.1.md)).

Form 2:

..., *value3*, *value2*, *value1* →

..., *value1*, *value3*, *value2*, *value1*

where *value1* is a value of a category 2 computational type and *value2* and *value3* are both values of a category 1 computational type ([§2.11.1](2.11.1.md)).

Form 3:

..., *value3*, *value2*, *value1* →

..., *value2*, *value1*, *value3*, *value2*, *value1*

where *value1* and *value2* are both values of a category 1 computational type and *value3* is a value of a category 2 computational type ([§2.11.1](2.11.1.md)).

Form 4:

..., *value2*, *value1* →

..., *value1*, *value2*, *value1*

where *value1* and *value2* are both values of a category 2 computational type ([§2.11.1](2.11.1.md)).

## Description

Duplicate the top one or two values on the operand stack and insert the duplicated values, in the original order, into the operand stack.
