Add const-class/jumbo.
I neglected to include this one in my original list of new opcodes.
Change-Id: Ia59b4b2f21516d851f0398361eb5db1cb413aaab
diff --git a/docs/dalvik-bytecode.html b/docs/dalvik-bytecode.html
index 160f9de..2c81e5f 100644
--- a/docs/dalvik-bytecode.html
+++ b/docs/dalvik-bytecode.html
@@ -983,6 +983,16 @@
</tr>
<tr>
<td>00ff 41c</td>
+ <td>const-class/jumbo vBBBB, type@AAAAAAAA</td>
+ <td><code>A:</code> type index (32 bits)<br/>
+ <code>B:</code> destination register (16 bits)</td>
+ <td>Move a reference to the class specified by the given index into the
+ specified register. See <code>const-class</code> description above
+ for details, caveats, and suggestions.
+ </td>
+</tr>
+<tr>
+ <td>01ff 41c</td>
<td>check-cast/jumbo vBBBB, type@AAAAAAAA</td>
<td><code>A:</code> type index (32 bits)<br/>
<code>B:</code> reference-bearing register (16 bits)
@@ -994,7 +1004,7 @@
</td>
</tr>
<tr>
- <td>01ff 52c</td>
+ <td>02ff 52c</td>
<td>instance-of/jumbo vBBBB, vCCCC, type@AAAAAAAA</td>
<td><code>A:</code> type index (32 bits)<br/>
<code>B:</code> destination register (16 bits)<br/>
@@ -1008,7 +1018,7 @@
</td>
</tr>
<tr>
- <td>02ff 41c</td>
+ <td>03ff 41c</td>
<td>new-instance/jumbo vBBBB, type@AAAAAAAA</td>
<td><code>A:</code> type index (32 bits)<br/>
<code>B:</code> destination register (16 bits)
@@ -1019,7 +1029,7 @@
</td>
</tr>
<tr>
- <td>03ff 52c</td>
+ <td>04ff 52c</td>
<td>new-array/jumbo vBBBB, vCCCC, type@AAAAAAAA</td>
<td><code>A:</code> type index (32 bits)<br/>
<code>B:</code> destination register (16 bits)<br/>
@@ -1031,7 +1041,7 @@
</td>
</tr>
<tr>
- <td>04ff 5rc</td>
+ <td>05ff 5rc</td>
<td>filled-new-array/jumbo {vCCCC .. vNNNN}, type@AAAAAAAA</td>
<td><code>A:</code> type index (32 bits)<br/>
<code>B:</code> array size and argument word count (16 bits)<br/>
@@ -1045,22 +1055,22 @@
</td>
</tr>
<tr>
- <td>05ff..12ff 52c</td>
+ <td>06ff..13ff 52c</td>
<td>i<i>instanceop</i>/jumbo vBBBB, vCCCC, field@AAAAAAAA<br/>
- 05ff: iget/jumbo<br/>
- 06ff: iget-wide/jumbo<br/>
- 07ff: iget-object/jumbo<br/>
- 08ff: iget-boolean/jumbo<br/>
- 09ff: iget-byte/jumbo<br/>
- 0aff: iget-char/jumbo<br/>
- 0bff: iget-short/jumbo<br/>
- 0cff: iput/jumbo<br/>
- 0dff: iput-wide/jumbo<br/>
- 0eff: iput-object/jumbo<br/>
- 0fff: iput-boolean/jumbo<br/>
- 10ff: iput-byte/jumbo<br/>
- 11ff: iput-char/jumbo<br/>
- 12ff: iput-short/jumbo
+ 06ff: iget/jumbo<br/>
+ 07ff: iget-wide/jumbo<br/>
+ 08ff: iget-object/jumbo<br/>
+ 09ff: iget-boolean/jumbo<br/>
+ 0aff: iget-byte/jumbo<br/>
+ 0bff: iget-char/jumbo<br/>
+ 0cff: iget-short/jumbo<br/>
+ 0dff: iput/jumbo<br/>
+ 0eff: iput-wide/jumbo<br/>
+ 0fff: iput-object/jumbo<br/>
+ 10ff: iput-boolean/jumbo<br/>
+ 11ff: iput-byte/jumbo<br/>
+ 12ff: iput-char/jumbo<br/>
+ 13ff: iput-short/jumbo
</td>
<td><code>A:</code> instance field reference index (32 bits)<br/>
<code>B:</code> value register or pair; may be source or dest
@@ -1073,22 +1083,22 @@
</td>
</tr>
<tr>
- <td>13ff..20ff 41c</td>
+ <td>14ff..21ff 41c</td>
<td>s<i>staticop</i>/jumbo vBBBB, field@AAAAAAAA<br/>
- 13ff: sget/jumbo<br/>
- 14ff: sget-wide/jumbo<br/>
- 15ff: sget-object/jumbo<br/>
- 16ff: sget-boolean/jumbo<br/>
- 17ff: sget-byte/jumbo<br/>
- 18ff: sget-char/jumbo<br/>
- 19ff: sget-short/jumbo<br/>
- 1aff: sput/jumbo<br/>
- 1bff: sput-wide/jumbo<br/>
- 1cff: sput-object/jumbo<br/>
- 1dff: sput-boolean/jumbo<br/>
- 1eff: sput-byte/jumbo<br/>
- 1fff: sput-char/jumbo<br/>
- 20ff: sput-short/jumbo
+ 14ff: sget/jumbo<br/>
+ 15ff: sget-wide/jumbo<br/>
+ 16ff: sget-object/jumbo<br/>
+ 17ff: sget-boolean/jumbo<br/>
+ 18ff: sget-byte/jumbo<br/>
+ 19ff: sget-char/jumbo<br/>
+ 1aff: sget-short/jumbo<br/>
+ 1bff: sput/jumbo<br/>
+ 1cff: sput-wide/jumbo<br/>
+ 1dff: sput-object/jumbo<br/>
+ 1eff: sput-boolean/jumbo<br/>
+ 1fff: sput-byte/jumbo<br/>
+ 20ff: sput-char/jumbo<br/>
+ 21ff: sput-short/jumbo
</td>
<td><code>A:</code> instance field reference index (32 bits)<br/>
<code>B:</code> value register or pair; may be source or dest
@@ -1100,13 +1110,13 @@
</td>
</tr>
<tr>
- <td>21ff..25ff 5rc</td>
+ <td>22ff..26ff 5rc</td>
<td>invoke-<i>kind</i>/jumbo {vCCCC .. vNNNN}, meth@AAAAAAAA<br/>
- 21ff: invoke-virtual/jumbo<br/>
- 22ff: invoke-super/jumbo<br/>
- 23ff: invoke-direct/jumbo<br/>
- 24ff: invoke-static/jumbo<br/>
- 25ff: invoke-interface/jumbo
+ 22ff: invoke-virtual/jumbo<br/>
+ 23ff: invoke-super/jumbo<br/>
+ 24ff: invoke-direct/jumbo<br/>
+ 25ff: invoke-static/jumbo<br/>
+ 26ff: invoke-interface/jumbo
</td>
<td><code>A:</code> method reference index (32 bits)<br/>
<code>B:</code> argument word count (16 bits)<br/>
diff --git a/dx/etc/bytecode.txt b/dx/etc/bytecode.txt
index 1592ac8..5a5940b 100644
--- a/dx/etc/bytecode.txt
+++ b/dx/etc/bytecode.txt
@@ -273,42 +273,43 @@
op e1 22b y shr-int/lit8
op e2 22b y ushr-int/lit8
# unused: op e3..fe
-op 00ff 41c n check-cast/jumbo
-op 01ff 52c y instance-of/jumbo
-op 02ff 41c y new-instance/jumbo
-op 03ff 52c y new-array/jumbo
-op 04ff 5rc n filled-new-array/jumbo
-op 05ff 52c y iget/jumbo
-op 06ff 52c y iget-wide/jumbo
-op 07ff 52c y iget-object/jumbo
-op 08ff 52c y iget-boolean/jumbo
-op 09ff 52c y iget-byte/jumbo
-op 0aff 52c y iget-char/jumbo
-op 0bff 52c y iget-short/jumbo
-op 0cff 52c n iput/jumbo
-op 0dff 52c n iput-wide/jumbo
-op 0eff 52c n iput-object/jumbo
-op 0fff 52c n iput-boolean/jumbo
-op 10ff 52c n iput-byte/jumbo
-op 11ff 52c n iput-char/jumbo
-op 12ff 52c n iput-short/jumbo
-op 13ff 41c y sget/jumbo
-op 14ff 41c y sget-wide/jumbo
-op 15ff 41c y sget-object/jumbo
-op 16ff 41c y sget-boolean/jumbo
-op 17ff 41c y sget-byte/jumbo
-op 18ff 41c y sget-char/jumbo
-op 19ff 41c y sget-short/jumbo
-op 1aff 41c n sput/jumbo
-op 1bff 41c n sput-wide/jumbo
-op 1cff 41c n sput-object/jumbo
-op 1dff 41c n sput-boolean/jumbo
-op 1eff 41c n sput-byte/jumbo
-op 1fff 41c n sput-char/jumbo
-op 20ff 41c n sput-short/jumbo
-op 21ff 5rc n invoke-virtual/jumbo
-op 22ff 5rc n invoke-super/jumbo
-op 23ff 5rc n invoke-direct/jumbo
-op 24ff 5rc n invoke-static/jumbo
-op 25ff 5rc n invoke-interface/jumbo
-# unused: op 26ff..ffff
+op 00ff 41c y const-class/jumbo
+op 01ff 41c n check-cast/jumbo
+op 02ff 52c y instance-of/jumbo
+op 03ff 41c y new-instance/jumbo
+op 04ff 52c y new-array/jumbo
+op 05ff 5rc n filled-new-array/jumbo
+op 06ff 52c y iget/jumbo
+op 07ff 52c y iget-wide/jumbo
+op 08ff 52c y iget-object/jumbo
+op 09ff 52c y iget-boolean/jumbo
+op 0aff 52c y iget-byte/jumbo
+op 0bff 52c y iget-char/jumbo
+op 0cff 52c y iget-short/jumbo
+op 0dff 52c n iput/jumbo
+op 0eff 52c n iput-wide/jumbo
+op 0fff 52c n iput-object/jumbo
+op 10ff 52c n iput-boolean/jumbo
+op 11ff 52c n iput-byte/jumbo
+op 12ff 52c n iput-char/jumbo
+op 13ff 52c n iput-short/jumbo
+op 14ff 41c y sget/jumbo
+op 15ff 41c y sget-wide/jumbo
+op 16ff 41c y sget-object/jumbo
+op 17ff 41c y sget-boolean/jumbo
+op 18ff 41c y sget-byte/jumbo
+op 19ff 41c y sget-char/jumbo
+op 1aff 41c y sget-short/jumbo
+op 1bff 41c n sput/jumbo
+op 1cff 41c n sput-wide/jumbo
+op 1dff 41c n sput-object/jumbo
+op 1eff 41c n sput-boolean/jumbo
+op 1fff 41c n sput-byte/jumbo
+op 20ff 41c n sput-char/jumbo
+op 21ff 41c n sput-short/jumbo
+op 22ff 5rc n invoke-virtual/jumbo
+op 23ff 5rc n invoke-super/jumbo
+op 24ff 5rc n invoke-direct/jumbo
+op 25ff 5rc n invoke-static/jumbo
+op 26ff 5rc n invoke-interface/jumbo
+# unused: op 27ff..ffff
diff --git a/dx/src/com/android/dx/dex/code/DalvOps.java b/dx/src/com/android/dx/dex/code/DalvOps.java
index 6c67fb8..2a83c70 100644
--- a/dx/src/com/android/dx/dex/code/DalvOps.java
+++ b/dx/src/com/android/dx/dex/code/DalvOps.java
@@ -252,44 +252,45 @@
public static final int SHL_INT_LIT8 = 0xe0;
public static final int SHR_INT_LIT8 = 0xe1;
public static final int USHR_INT_LIT8 = 0xe2;
- public static final int CHECK_CAST_JUMBO = 0x00ff;
- public static final int INSTANCE_OF_JUMBO = 0x01ff;
- public static final int NEW_INSTANCE_JUMBO = 0x02ff;
- public static final int NEW_ARRAY_JUMBO = 0x03ff;
- public static final int FILLED_NEW_ARRAY_JUMBO = 0x04ff;
- public static final int IGET_JUMBO = 0x05ff;
- public static final int IGET_WIDE_JUMBO = 0x06ff;
- public static final int IGET_OBJECT_JUMBO = 0x07ff;
- public static final int IGET_BOOLEAN_JUMBO = 0x08ff;
- public static final int IGET_BYTE_JUMBO = 0x09ff;
- public static final int IGET_CHAR_JUMBO = 0x0aff;
- public static final int IGET_SHORT_JUMBO = 0x0bff;
- public static final int IPUT_JUMBO = 0x0cff;
- public static final int IPUT_WIDE_JUMBO = 0x0dff;
- public static final int IPUT_OBJECT_JUMBO = 0x0eff;
- public static final int IPUT_BOOLEAN_JUMBO = 0x0fff;
- public static final int IPUT_BYTE_JUMBO = 0x10ff;
- public static final int IPUT_CHAR_JUMBO = 0x11ff;
- public static final int IPUT_SHORT_JUMBO = 0x12ff;
- public static final int SGET_JUMBO = 0x13ff;
- public static final int SGET_WIDE_JUMBO = 0x14ff;
- public static final int SGET_OBJECT_JUMBO = 0x15ff;
- public static final int SGET_BOOLEAN_JUMBO = 0x16ff;
- public static final int SGET_BYTE_JUMBO = 0x17ff;
- public static final int SGET_CHAR_JUMBO = 0x18ff;
- public static final int SGET_SHORT_JUMBO = 0x19ff;
- public static final int SPUT_JUMBO = 0x1aff;
- public static final int SPUT_WIDE_JUMBO = 0x1bff;
- public static final int SPUT_OBJECT_JUMBO = 0x1cff;
- public static final int SPUT_BOOLEAN_JUMBO = 0x1dff;
- public static final int SPUT_BYTE_JUMBO = 0x1eff;
- public static final int SPUT_CHAR_JUMBO = 0x1fff;
- public static final int SPUT_SHORT_JUMBO = 0x20ff;
- public static final int INVOKE_VIRTUAL_JUMBO = 0x21ff;
- public static final int INVOKE_SUPER_JUMBO = 0x22ff;
- public static final int INVOKE_DIRECT_JUMBO = 0x23ff;
- public static final int INVOKE_STATIC_JUMBO = 0x24ff;
- public static final int INVOKE_INTERFACE_JUMBO = 0x25ff;
+ public static final int CONST_CLASS_JUMBO = 0x00ff;
+ public static final int CHECK_CAST_JUMBO = 0x01ff;
+ public static final int INSTANCE_OF_JUMBO = 0x02ff;
+ public static final int NEW_INSTANCE_JUMBO = 0x03ff;
+ public static final int NEW_ARRAY_JUMBO = 0x04ff;
+ public static final int FILLED_NEW_ARRAY_JUMBO = 0x05ff;
+ public static final int IGET_JUMBO = 0x06ff;
+ public static final int IGET_WIDE_JUMBO = 0x07ff;
+ public static final int IGET_OBJECT_JUMBO = 0x08ff;
+ public static final int IGET_BOOLEAN_JUMBO = 0x09ff;
+ public static final int IGET_BYTE_JUMBO = 0x0aff;
+ public static final int IGET_CHAR_JUMBO = 0x0bff;
+ public static final int IGET_SHORT_JUMBO = 0x0cff;
+ public static final int IPUT_JUMBO = 0x0dff;
+ public static final int IPUT_WIDE_JUMBO = 0x0eff;
+ public static final int IPUT_OBJECT_JUMBO = 0x0fff;
+ public static final int IPUT_BOOLEAN_JUMBO = 0x10ff;
+ public static final int IPUT_BYTE_JUMBO = 0x11ff;
+ public static final int IPUT_CHAR_JUMBO = 0x12ff;
+ public static final int IPUT_SHORT_JUMBO = 0x13ff;
+ public static final int SGET_JUMBO = 0x14ff;
+ public static final int SGET_WIDE_JUMBO = 0x15ff;
+ public static final int SGET_OBJECT_JUMBO = 0x16ff;
+ public static final int SGET_BOOLEAN_JUMBO = 0x17ff;
+ public static final int SGET_BYTE_JUMBO = 0x18ff;
+ public static final int SGET_CHAR_JUMBO = 0x19ff;
+ public static final int SGET_SHORT_JUMBO = 0x1aff;
+ public static final int SPUT_JUMBO = 0x1bff;
+ public static final int SPUT_WIDE_JUMBO = 0x1cff;
+ public static final int SPUT_OBJECT_JUMBO = 0x1dff;
+ public static final int SPUT_BOOLEAN_JUMBO = 0x1eff;
+ public static final int SPUT_BYTE_JUMBO = 0x1fff;
+ public static final int SPUT_CHAR_JUMBO = 0x20ff;
+ public static final int SPUT_SHORT_JUMBO = 0x21ff;
+ public static final int INVOKE_VIRTUAL_JUMBO = 0x22ff;
+ public static final int INVOKE_SUPER_JUMBO = 0x23ff;
+ public static final int INVOKE_DIRECT_JUMBO = 0x24ff;
+ public static final int INVOKE_STATIC_JUMBO = 0x25ff;
+ public static final int INVOKE_INTERFACE_JUMBO = 0x26ff;
// END(opcodes)
/**
diff --git a/dx/src/com/android/dx/dex/code/Dops.java b/dx/src/com/android/dx/dex/code/Dops.java
index 01b245d..053f47b 100644
--- a/dx/src/com/android/dx/dex/code/Dops.java
+++ b/dx/src/com/android/dx/dex/code/Dops.java
@@ -205,7 +205,7 @@
public static final Dop CONST_CLASS =
new Dop(DalvOps.CONST_CLASS, DalvOps.CONST_CLASS,
- DalvOps.NO_NEXT, Form21c.THE_ONE, true,
+ DalvOps.CONST_CLASS_JUMBO, Form21c.THE_ONE, true,
"const-class");
public static final Dop MONITOR_ENTER =
@@ -1153,6 +1153,11 @@
DalvOps.NO_NEXT, Form22b.THE_ONE, true,
"ushr-int/lit8");
+ public static final Dop CONST_CLASS_JUMBO =
+ new Dop(DalvOps.CONST_CLASS_JUMBO, DalvOps.CONST_CLASS,
+ DalvOps.NO_NEXT, Form41c.THE_ONE, true,
+ "const-class/jumbo");
+
public static final Dop CHECK_CAST_JUMBO =
new Dop(DalvOps.CHECK_CAST_JUMBO, DalvOps.CHECK_CAST,
DalvOps.NO_NEXT, Form41c.THE_ONE, false,
@@ -1570,6 +1575,7 @@
set(SHL_INT_LIT8);
set(SHR_INT_LIT8);
set(USHR_INT_LIT8);
+ set(CONST_CLASS_JUMBO);
set(CHECK_CAST_JUMBO);
set(INSTANCE_OF_JUMBO);
set(NEW_INSTANCE_JUMBO);