summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2011-03-01 15:47:46 -0800
committerAndy McFadden <fadden@android.com>2011-03-02 13:28:25 -0800
commit0346e9dcddccd449c731e42ef83708ff6d8f0976 (patch)
tree8a32dec433440dd8860b2324239467f79ec9fefc
parent131ec9ff58fcc6a7440297e2cbee23df93d2974d (diff)
downloaddalvik-0346e9dcddccd449c731e42ef83708ff6d8f0976.tar.gz
Change invoke-object-init to /range form
The invoke-object-init instruction pretends to be a regular invoke that only knows how to call Object.<init>. As such it always takes one argument, and if we use the /range version we can specify the "this" register with 16 bits instead of only 4. Bug 3486699 Change-Id: I9ee4700c6935beee1dcbaa583b57befd33641414
-rw-r--r--libdex/DexOpcodes.c2
-rw-r--r--libdex/DexOpcodes.h4
-rw-r--r--opcode-gen/bytecode.txt2
-rw-r--r--vm/DalvikVersion.h2
-rw-r--r--vm/analysis/CodeVerify.c2
-rw-r--r--vm/analysis/DexVerify.c2
-rw-r--r--vm/analysis/Liveness.c2
-rw-r--r--vm/analysis/Optimize.c21
-rw-r--r--vm/compiler/Dataflow.c2
-rw-r--r--vm/compiler/codegen/arm/CodegenDriver.c2
-rw-r--r--vm/mterp/armv5te/OP_INVOKE_OBJECT_INIT_RANGE.S (renamed from vm/mterp/armv5te/OP_INVOKE_OBJECT_INIT.S)3
-rw-r--r--vm/mterp/c/OP_INVOKE_OBJECT_INIT_RANGE.c (renamed from vm/mterp/c/OP_INVOKE_OBJECT_INIT.c)8
-rw-r--r--vm/mterp/config-x862
-rw-r--r--vm/mterp/config-x86-atom2
-rw-r--r--vm/mterp/out/InterpAsm-armv5te-vfp.S9
-rw-r--r--vm/mterp/out/InterpAsm-armv5te.S9
-rw-r--r--vm/mterp/out/InterpAsm-armv7-a-neon.S9
-rw-r--r--vm/mterp/out/InterpAsm-armv7-a.S9
-rw-r--r--vm/mterp/out/InterpAsm-x86-atom.S6
-rw-r--r--vm/mterp/out/InterpAsm-x86.S10
-rw-r--r--vm/mterp/out/InterpC-allstubs.c10
-rw-r--r--vm/mterp/out/InterpC-portdbg.c10
-rw-r--r--vm/mterp/out/InterpC-portstd.c10
-rw-r--r--vm/mterp/out/InterpC-x86-atom.c10
-rw-r--r--vm/mterp/out/InterpC-x86.c10
-rw-r--r--vm/mterp/x86-atom/OP_INVOKE_OBJECT_INIT_RANGE.S (renamed from vm/mterp/x86-atom/OP_INVOKE_OBJECT_INIT.S)0
-rw-r--r--vm/mterp/x86-atom/entry.S2
-rw-r--r--vm/mterp/x86/OP_INVOKE_OBJECT_INIT_RANGE.S (renamed from vm/mterp/x86/OP_INVOKE_OBJECT_INIT.S)0
28 files changed, 82 insertions, 78 deletions
diff --git a/libdex/DexOpcodes.c b/libdex/DexOpcodes.c
index ae4e2d167..b7a34144c 100644
--- a/libdex/DexOpcodes.c
+++ b/libdex/DexOpcodes.c
@@ -270,7 +270,7 @@ static const char* gOpNames[kNumPackedOpcodes] = {
"^throw-verification-error",
"+execute-inline",
"+execute-inline/range",
- "+invoke-object-init",
+ "+invoke-object-init/range",
"+return-void-barrier",
"+iget-quick",
"+iget-wide-quick",
diff --git a/libdex/DexOpcodes.h b/libdex/DexOpcodes.h
index c1e9d0d8b..10fd8a118 100644
--- a/libdex/DexOpcodes.h
+++ b/libdex/DexOpcodes.h
@@ -308,7 +308,7 @@ typedef enum Opcode {
OP_THROW_VERIFICATION_ERROR = 0xed,
OP_EXECUTE_INLINE = 0xee,
OP_EXECUTE_INLINE_RANGE = 0xef,
- OP_INVOKE_OBJECT_INIT = 0xf0,
+ OP_INVOKE_OBJECT_INIT_RANGE = 0xf0,
OP_RETURN_VOID_BARRIER = 0xf1,
OP_IGET_QUICK = 0xf2,
OP_IGET_WIDE_QUICK = 0xf3,
@@ -830,7 +830,7 @@ typedef enum Opcode {
H(OP_THROW_VERIFICATION_ERROR), \
H(OP_EXECUTE_INLINE), \
H(OP_EXECUTE_INLINE_RANGE), \
- H(OP_INVOKE_OBJECT_INIT), \
+ H(OP_INVOKE_OBJECT_INIT_RANGE), \
H(OP_RETURN_VOID_BARRIER), \
H(OP_IGET_QUICK), \
H(OP_IGET_WIDE_QUICK), \
diff --git a/opcode-gen/bytecode.txt b/opcode-gen/bytecode.txt
index 1a2270702..6fd57dbdb 100644
--- a/opcode-gen/bytecode.txt
+++ b/opcode-gen/bytecode.txt
@@ -332,7 +332,7 @@ op ef +execute-inline/range 3rmi n inline-method optimized|continue|thro
# doesn't invoke the method unless a debugger is attached. The verifier
# will ensure that Object.<init> is present and empty, so there is no
# opportunity for an exception to be thrown.
-op f0 +invoke-object-init 35c n method-ref optimized|continue
+op f0 +invoke-object-init/range 35c n method-ref optimized|continue
op f1 +return-void-barrier 10x n none optimized|return
op f2 +iget-quick 22cs y field-offset optimized|continue|throw
diff --git a/vm/DalvikVersion.h b/vm/DalvikVersion.h
index d36c770c6..a1000ab94 100644
--- a/vm/DalvikVersion.h
+++ b/vm/DalvikVersion.h
@@ -32,6 +32,6 @@
* way classes load changes, e.g. field ordering or vtable layout. Changing
* this guarantees that the optimized form of the DEX file is regenerated.
*/
-#define DALVIK_VM_BUILD 25
+#define DALVIK_VM_BUILD 26
#endif /*_DALVIK_VERSION*/
diff --git a/vm/analysis/CodeVerify.c b/vm/analysis/CodeVerify.c
index 760ef3b0e..2cefbc46e 100644
--- a/vm/analysis/CodeVerify.c
+++ b/vm/analysis/CodeVerify.c
@@ -5761,7 +5761,7 @@ sput_1nr_common:
*/
case OP_EXECUTE_INLINE:
case OP_EXECUTE_INLINE_RANGE:
- case OP_INVOKE_OBJECT_INIT:
+ case OP_INVOKE_OBJECT_INIT_RANGE:
case OP_IGET_QUICK:
case OP_IGET_WIDE_QUICK:
case OP_IGET_OBJECT_QUICK:
diff --git a/vm/analysis/DexVerify.c b/vm/analysis/DexVerify.c
index d8d707b8b..ce536e5ad 100644
--- a/vm/analysis/DexVerify.c
+++ b/vm/analysis/DexVerify.c
@@ -1197,7 +1197,7 @@ static bool verifyInstructions(VerifierData* vdata)
case OP_THROW_VERIFICATION_ERROR_JUMBO:
case OP_EXECUTE_INLINE:
case OP_EXECUTE_INLINE_RANGE:
- case OP_INVOKE_OBJECT_INIT:
+ case OP_INVOKE_OBJECT_INIT_RANGE:
case OP_RETURN_VOID_BARRIER:
case OP_IGET_QUICK:
case OP_IGET_WIDE_QUICK:
diff --git a/vm/analysis/Liveness.c b/vm/analysis/Liveness.c
index 44075ca64..04dfa019e 100644
--- a/vm/analysis/Liveness.c
+++ b/vm/analysis/Liveness.c
@@ -739,7 +739,7 @@ static bool processInstruction(VerifierData* vdata, u4 insnIdx,
/* quickened instructions, not expected to appear */
case OP_EXECUTE_INLINE:
case OP_EXECUTE_INLINE_RANGE:
- case OP_INVOKE_OBJECT_INIT:
+ case OP_INVOKE_OBJECT_INIT_RANGE:
case OP_IGET_QUICK:
case OP_IGET_WIDE_QUICK:
case OP_IGET_OBJECT_QUICK:
diff --git a/vm/analysis/Optimize.c b/vm/analysis/Optimize.c
index e6b3f9710..ae6eebe6f 100644
--- a/vm/analysis/Optimize.c
+++ b/vm/analysis/Optimize.c
@@ -167,7 +167,7 @@ static void optimizeMethod(Method* method, bool essentialOnly)
/*
* essential substitutions:
* {iget,iput,sget,sput}-wide --> *-wide-volatile
- * invoke-direct --> invoke-object-init
+ * invoke-direct[/range] --> invoke-object-init/range
*
* essential-on-SMP substitutions:
* iget-* --> iget-*-volatile
@@ -924,12 +924,21 @@ static bool rewriteInvokeObjectInit(Method* method, u2* insns)
dvmCompareNameDescriptorAndMethod("<init>", "()V", calledMethod) == 0)
{
/*
- * Replace the instruction. We want to modify as little as possible
- * because, if the debugger is attached, the interpreter will
- * forward execution to the invoke-direct handler.
+ * Replace the instruction. If the debugger is attached, the
+ * interpreter will forward execution to the invoke-direct/range
+ * handler. If this was an invoke-direct/range instruction we can
+ * just replace the opcode, but if it was an invoke-direct we
+ * have to set the argument count (high 8 bits of first code unit)
+ * to 1.
*/
- assert((insns[0] & 0xff) == OP_INVOKE_DIRECT);
- updateOpcode(method, insns, OP_INVOKE_OBJECT_INIT);
+ u1 origOp = insns[0] & 0xff;
+ if (origOp == OP_INVOKE_DIRECT) {
+ updateCodeUnit(method, insns, OP_INVOKE_OBJECT_INIT_RANGE | 0x100);
+ } else {
+ assert(origOp == OP_INVOKE_DIRECT_RANGE);
+ assert((insns[0] >> 8) == 1);
+ updateOpcode(method, insns, OP_INVOKE_OBJECT_INIT_RANGE);
+ }
LOGVV("DexOpt: replaced Object.<init> in %s.%s\n",
method->clazz->descriptor, method->name);
diff --git a/vm/compiler/Dataflow.c b/vm/compiler/Dataflow.c
index ca72a6860..38f822cb2 100644
--- a/vm/compiler/Dataflow.c
+++ b/vm/compiler/Dataflow.c
@@ -750,7 +750,7 @@ int dvmCompilerDataFlowAttributes[kMirOpLast] = {
// EF OP_EXECUTE_INLINE_RANGE
DF_FORMAT_3RC,
- // F0 OP_INVOKE_OBJECT_INIT
+ // F0 OP_INVOKE_OBJECT_INIT_RANGE
DF_NOP,
// F1 OP_RETURN_VOID_BARRIER
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c
index 02e6f877e..16fddafef 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.c
+++ b/vm/compiler/codegen/arm/CodegenDriver.c
@@ -3266,7 +3266,7 @@ static bool handleFmt35c_3rc_5rc(CompilationUnit *cUnit, MIR *mir,
genTrap(cUnit, mir->offset, pcrLabel);
break;
}
- case OP_INVOKE_OBJECT_INIT: {
+ case OP_INVOKE_OBJECT_INIT_RANGE: {
genInterpSingleStep(cUnit, mir);
break;
}
diff --git a/vm/mterp/armv5te/OP_INVOKE_OBJECT_INIT.S b/vm/mterp/armv5te/OP_INVOKE_OBJECT_INIT_RANGE.S
index 2ae5f5b79..d91c6d14d 100644
--- a/vm/mterp/armv5te/OP_INVOKE_OBJECT_INIT.S
+++ b/vm/mterp/armv5te/OP_INVOKE_OBJECT_INIT_RANGE.S
@@ -5,8 +5,7 @@
* Object's nullary constructor doesn't do anything, so we just
* skip it (we know a debugger isn't active).
*/
- FETCH(r0, 2) @ r0<- GFED
- and r1, r0, #15 @ r1<- D
+ FETCH(r1, 2) @ r1<- CCCC
GET_VREG(r0, r1) @ r0<- "this" ptr
cmp r0, #0 @ check for NULL
beq common_errNullObject @ export PC and throw NPE
diff --git a/vm/mterp/c/OP_INVOKE_OBJECT_INIT.c b/vm/mterp/c/OP_INVOKE_OBJECT_INIT_RANGE.c
index 1da8b0635..f2b623faf 100644
--- a/vm/mterp/c/OP_INVOKE_OBJECT_INIT.c
+++ b/vm/mterp/c/OP_INVOKE_OBJECT_INIT_RANGE.c
@@ -1,8 +1,8 @@
-HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
+HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT_RANGE /*{vCCCC..v(CCCC+AA-1)}, meth@BBBB*/)
{
Object* obj;
- vsrc1 = FETCH(2) & 0x0f; /* reg number of "this" pointer */
+ vsrc1 = FETCH(2); /* reg number of "this" pointer */
obj = GET_REGISTER_AS_OBJECT(vsrc1);
if (!checkForNullExportPC(obj, fp, pc))
@@ -22,8 +22,8 @@ HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
/* skip method invocation */
FINISH(3);
} else {
- /* behave like OP_INVOKE_DIRECT */
- GOTO_invoke(invokeDirect, false, false);
+ /* behave like OP_INVOKE_DIRECT_RANGE */
+ GOTO_invoke(invokeDirect, true, false);
}
#else
/* debugger can't be attached, skip method invocation */
diff --git a/vm/mterp/config-x86 b/vm/mterp/config-x86
index 76bd5f786..5a054f06d 100644
--- a/vm/mterp/config-x86
+++ b/vm/mterp/config-x86
@@ -43,7 +43,7 @@ op-start x86
op OP_SGET_WIDE_VOLATILE c
op OP_SPUT_WIDE_VOLATILE c
op OP_RETURN_VOID_BARRIER c
- op OP_INVOKE_OBJECT_INIT c
+ op OP_INVOKE_OBJECT_INIT_RANGE c
op-end
# arch-specific entry point to interpreter
diff --git a/vm/mterp/config-x86-atom b/vm/mterp/config-x86-atom
index 3b6a9e853..18fb5cda5 100644
--- a/vm/mterp/config-x86-atom
+++ b/vm/mterp/config-x86-atom
@@ -299,7 +299,7 @@ op OP_IPUT_WIDE_VOLATILE c
op OP_SGET_WIDE_VOLATILE c
op OP_SPUT_WIDE_VOLATILE c
op OP_RETURN_VOID_BARRIER c
-op OP_INVOKE_OBJECT_INIT c
+op OP_INVOKE_OBJECT_INIT_RANGE c
op-end
# arch-specific entry point to interpreter
diff --git a/vm/mterp/out/InterpAsm-armv5te-vfp.S b/vm/mterp/out/InterpAsm-armv5te-vfp.S
index 94db5812e..c42ca9d8f 100644
--- a/vm/mterp/out/InterpAsm-armv5te-vfp.S
+++ b/vm/mterp/out/InterpAsm-armv5te-vfp.S
@@ -7406,15 +7406,14 @@ dalvik_inst:
/* ------------------------------ */
.balign 64
-.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
-/* File: armv5te/OP_INVOKE_OBJECT_INIT.S */
+.L_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
+/* File: armv5te/OP_INVOKE_OBJECT_INIT_RANGE.S */
/*
* Invoke Object.<init> on an object. In practice we know that
* Object's nullary constructor doesn't do anything, so we just
* skip it (we know a debugger isn't active).
*/
- FETCH(r0, 2) @ r0<- GFED
- and r1, r0, #15 @ r1<- D
+ FETCH(r1, 2) @ r1<- CCCC
GET_VREG(r0, r1) @ r0<- "this" ptr
cmp r0, #0 @ check for NULL
beq common_errNullObject @ export PC and throw NPE
@@ -16514,7 +16513,7 @@ dvmAsmAltInstructionStart:
/* ------------------------------ */
.balign 64
-.L_ALT_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+.L_ALT_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
/* File: armv5te/alt_stub.S */
/*
* Inter-instruction transfer stub. Call out to dvmCheckInst to handle
diff --git a/vm/mterp/out/InterpAsm-armv5te.S b/vm/mterp/out/InterpAsm-armv5te.S
index 413432724..627f1a47b 100644
--- a/vm/mterp/out/InterpAsm-armv5te.S
+++ b/vm/mterp/out/InterpAsm-armv5te.S
@@ -7728,15 +7728,14 @@ d2i_doconv:
/* ------------------------------ */
.balign 64
-.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
-/* File: armv5te/OP_INVOKE_OBJECT_INIT.S */
+.L_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
+/* File: armv5te/OP_INVOKE_OBJECT_INIT_RANGE.S */
/*
* Invoke Object.<init> on an object. In practice we know that
* Object's nullary constructor doesn't do anything, so we just
* skip it (we know a debugger isn't active).
*/
- FETCH(r0, 2) @ r0<- GFED
- and r1, r0, #15 @ r1<- D
+ FETCH(r1, 2) @ r1<- CCCC
GET_VREG(r0, r1) @ r0<- "this" ptr
cmp r0, #0 @ check for NULL
beq common_errNullObject @ export PC and throw NPE
@@ -16972,7 +16971,7 @@ dvmAsmAltInstructionStart:
/* ------------------------------ */
.balign 64
-.L_ALT_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+.L_ALT_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
/* File: armv5te/alt_stub.S */
/*
* Inter-instruction transfer stub. Call out to dvmCheckInst to handle
diff --git a/vm/mterp/out/InterpAsm-armv7-a-neon.S b/vm/mterp/out/InterpAsm-armv7-a-neon.S
index d6d84562d..bbecc54b0 100644
--- a/vm/mterp/out/InterpAsm-armv7-a-neon.S
+++ b/vm/mterp/out/InterpAsm-armv7-a-neon.S
@@ -7364,15 +7364,14 @@ dalvik_inst:
/* ------------------------------ */
.balign 64
-.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
-/* File: armv5te/OP_INVOKE_OBJECT_INIT.S */
+.L_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
+/* File: armv5te/OP_INVOKE_OBJECT_INIT_RANGE.S */
/*
* Invoke Object.<init> on an object. In practice we know that
* Object's nullary constructor doesn't do anything, so we just
* skip it (we know a debugger isn't active).
*/
- FETCH(r0, 2) @ r0<- GFED
- and r1, r0, #15 @ r1<- D
+ FETCH(r1, 2) @ r1<- CCCC
GET_VREG(r0, r1) @ r0<- "this" ptr
cmp r0, #0 @ check for NULL
beq common_errNullObject @ export PC and throw NPE
@@ -16452,7 +16451,7 @@ dvmAsmAltInstructionStart:
/* ------------------------------ */
.balign 64
-.L_ALT_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+.L_ALT_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
/* File: armv5te/alt_stub.S */
/*
* Inter-instruction transfer stub. Call out to dvmCheckInst to handle
diff --git a/vm/mterp/out/InterpAsm-armv7-a.S b/vm/mterp/out/InterpAsm-armv7-a.S
index 658c09b10..ab581201b 100644
--- a/vm/mterp/out/InterpAsm-armv7-a.S
+++ b/vm/mterp/out/InterpAsm-armv7-a.S
@@ -7364,15 +7364,14 @@ dalvik_inst:
/* ------------------------------ */
.balign 64
-.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
-/* File: armv5te/OP_INVOKE_OBJECT_INIT.S */
+.L_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
+/* File: armv5te/OP_INVOKE_OBJECT_INIT_RANGE.S */
/*
* Invoke Object.<init> on an object. In practice we know that
* Object's nullary constructor doesn't do anything, so we just
* skip it (we know a debugger isn't active).
*/
- FETCH(r0, 2) @ r0<- GFED
- and r1, r0, #15 @ r1<- D
+ FETCH(r1, 2) @ r1<- CCCC
GET_VREG(r0, r1) @ r0<- "this" ptr
cmp r0, #0 @ check for NULL
beq common_errNullObject @ export PC and throw NPE
@@ -16452,7 +16451,7 @@ dvmAsmAltInstructionStart:
/* ------------------------------ */
.balign 64
-.L_ALT_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+.L_ALT_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
/* File: armv5te/alt_stub.S */
/*
* Inter-instruction transfer stub. Call out to dvmCheckInst to handle
diff --git a/vm/mterp/out/InterpAsm-x86-atom.S b/vm/mterp/out/InterpAsm-x86-atom.S
index 9d982caa5..7a9c7a490 100644
--- a/vm/mterp/out/InterpAsm-x86-atom.S
+++ b/vm/mterp/out/InterpAsm-x86-atom.S
@@ -14663,7 +14663,7 @@ OP_IF_LEZ_2f:
/* ------------------------------ */
.balign 64
-.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+.L_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
/* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -14685,7 +14685,7 @@ OP_IF_LEZ_2f:
SAVE_PC_FP_TO_GLUE %edx # save program counter and frame pointer
pushl rGLUE # push parameter glue
- call dvmMterp_OP_INVOKE_OBJECT_INIT # call c-based implementation
+ call dvmMterp_OP_INVOKE_OBJECT_INIT_RANGE # call c-based implementation
lea 4(%esp), %esp
LOAD_PC_FP_FROM_GLUE # restore program counter and frame pointer
FINISH_A # jump to next instruction
@@ -27322,7 +27322,7 @@ dvmAsmInstructionJmpTable = .LdvmAsmInstructionJmpTable
.long .L_OP_THROW_VERIFICATION_ERROR
.long .L_OP_EXECUTE_INLINE
.long .L_OP_EXECUTE_INLINE_RANGE
-.long .L_OP_INVOKE_OBJECT_INIT
+.long .L_OP_INVOKE_OBJECT_INIT_RANGE
.long .L_OP_UNUSED_F1
.long .L_OP_IGET_QUICK
.long .L_OP_IGET_WIDE_QUICK
diff --git a/vm/mterp/out/InterpAsm-x86.S b/vm/mterp/out/InterpAsm-x86.S
index 4e2fadbdf..13fffb03a 100644
--- a/vm/mterp/out/InterpAsm-x86.S
+++ b/vm/mterp/out/InterpAsm-x86.S
@@ -7540,11 +7540,11 @@ dvmAsmInstructionStartCode = .L_OP_NOP
FETCH_INST
GOTO_NEXT
/* ------------------------------ */
-.L_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+.L_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
/* (stub) */
SAVE_PC_FP_TO_SELF %ecx # leaves rSELF in %ecx
movl %ecx,OUT_ARG0(%esp) # self is first arg to function
- call dvmMterp_OP_INVOKE_OBJECT_INIT # do the real work
+ call dvmMterp_OP_INVOKE_OBJECT_INIT_RANGE # do the real work
movl rSELF,%ecx
LOAD_PC_FP_FROM_SELF # retrieve updated values
movl offThread_curHandlerTable(%ecx),rIBASE # set up rIBASE
@@ -15527,7 +15527,7 @@ dvmAsmAltInstructionStartCode:
jmp *dvmAsmInstructionStart+(239*4)
/* ------------------------------ */
-.L_ALT_OP_INVOKE_OBJECT_INIT: /* 0xf0 */
+.L_ALT_OP_INVOKE_OBJECT_INIT_RANGE: /* 0xf0 */
/* File: x86/alt_stub.S */
/*
* Inter-instruction transfer stub. Call out to dvmCheckInst to handle
@@ -20397,7 +20397,7 @@ dvmAsmInstructionStart:
.long .L_OP_THROW_VERIFICATION_ERROR /* 0xed */
.long .L_OP_EXECUTE_INLINE /* 0xee */
.long .L_OP_EXECUTE_INLINE_RANGE /* 0xef */
- .long .L_OP_INVOKE_OBJECT_INIT /* 0xf0 */
+ .long .L_OP_INVOKE_OBJECT_INIT_RANGE /* 0xf0 */
.long .L_OP_RETURN_VOID_BARRIER /* 0xf1 */
.long .L_OP_IGET_QUICK /* 0xf2 */
.long .L_OP_IGET_WIDE_QUICK /* 0xf3 */
@@ -20913,7 +20913,7 @@ dvmAsmAltInstructionStart:
.long .L_ALT_OP_THROW_VERIFICATION_ERROR /* 0xed */
.long .L_ALT_OP_EXECUTE_INLINE /* 0xee */
.long .L_ALT_OP_EXECUTE_INLINE_RANGE /* 0xef */
- .long .L_ALT_OP_INVOKE_OBJECT_INIT /* 0xf0 */
+ .long .L_ALT_OP_INVOKE_OBJECT_INIT_RANGE /* 0xf0 */
.long .L_ALT_OP_RETURN_VOID_BARRIER /* 0xf1 */
.long .L_ALT_OP_IGET_QUICK /* 0xf2 */
.long .L_ALT_OP_IGET_WIDE_QUICK /* 0xf3 */
diff --git a/vm/mterp/out/InterpC-allstubs.c b/vm/mterp/out/InterpC-allstubs.c
index 6dc0fac54..632d62d7e 100644
--- a/vm/mterp/out/InterpC-allstubs.c
+++ b/vm/mterp/out/InterpC-allstubs.c
@@ -3047,12 +3047,12 @@ HANDLE_OPCODE(OP_EXECUTE_INLINE_RANGE /*{vCCCC..v(CCCC+AA-1)}, inline@BBBB*/)
FINISH(3);
OP_END
-/* File: c/OP_INVOKE_OBJECT_INIT.c */
-HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
+/* File: c/OP_INVOKE_OBJECT_INIT_RANGE.c */
+HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT_RANGE /*{vCCCC..v(CCCC+AA-1)}, meth@BBBB*/)
{
Object* obj;
- vsrc1 = FETCH(2) & 0x0f; /* reg number of "this" pointer */
+ vsrc1 = FETCH(2); /* reg number of "this" pointer */
obj = GET_REGISTER_AS_OBJECT(vsrc1);
if (!checkForNullExportPC(obj, fp, pc))
@@ -3072,8 +3072,8 @@ HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
/* skip method invocation */
FINISH(3);
} else {
- /* behave like OP_INVOKE_DIRECT */
- GOTO_invoke(invokeDirect, false, false);
+ /* behave like OP_INVOKE_DIRECT_RANGE */
+ GOTO_invoke(invokeDirect, true, false);
}
#else
/* debugger can't be attached, skip method invocation */
diff --git a/vm/mterp/out/InterpC-portdbg.c b/vm/mterp/out/InterpC-portdbg.c
index 0a644e67a..090146f26 100644
--- a/vm/mterp/out/InterpC-portdbg.c
+++ b/vm/mterp/out/InterpC-portdbg.c
@@ -3410,12 +3410,12 @@ HANDLE_OPCODE(OP_EXECUTE_INLINE_RANGE /*{vCCCC..v(CCCC+AA-1)}, inline@BBBB*/)
FINISH(3);
OP_END
-/* File: c/OP_INVOKE_OBJECT_INIT.c */
-HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
+/* File: c/OP_INVOKE_OBJECT_INIT_RANGE.c */
+HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT_RANGE /*{vCCCC..v(CCCC+AA-1)}, meth@BBBB*/)
{
Object* obj;
- vsrc1 = FETCH(2) & 0x0f; /* reg number of "this" pointer */
+ vsrc1 = FETCH(2); /* reg number of "this" pointer */
obj = GET_REGISTER_AS_OBJECT(vsrc1);
if (!checkForNullExportPC(obj, fp, pc))
@@ -3435,8 +3435,8 @@ HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
/* skip method invocation */
FINISH(3);
} else {
- /* behave like OP_INVOKE_DIRECT */
- GOTO_invoke(invokeDirect, false, false);
+ /* behave like OP_INVOKE_DIRECT_RANGE */
+ GOTO_invoke(invokeDirect, true, false);
}
#else
/* debugger can't be attached, skip method invocation */
diff --git a/vm/mterp/out/InterpC-portstd.c b/vm/mterp/out/InterpC-portstd.c
index 4c5c2cc64..e71511ef8 100644
--- a/vm/mterp/out/InterpC-portstd.c
+++ b/vm/mterp/out/InterpC-portstd.c
@@ -3160,12 +3160,12 @@ HANDLE_OPCODE(OP_EXECUTE_INLINE_RANGE /*{vCCCC..v(CCCC+AA-1)}, inline@BBBB*/)
FINISH(3);
OP_END
-/* File: c/OP_INVOKE_OBJECT_INIT.c */
-HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
+/* File: c/OP_INVOKE_OBJECT_INIT_RANGE.c */
+HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT_RANGE /*{vCCCC..v(CCCC+AA-1)}, meth@BBBB*/)
{
Object* obj;
- vsrc1 = FETCH(2) & 0x0f; /* reg number of "this" pointer */
+ vsrc1 = FETCH(2); /* reg number of "this" pointer */
obj = GET_REGISTER_AS_OBJECT(vsrc1);
if (!checkForNullExportPC(obj, fp, pc))
@@ -3185,8 +3185,8 @@ HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
/* skip method invocation */
FINISH(3);
} else {
- /* behave like OP_INVOKE_DIRECT */
- GOTO_invoke(invokeDirect, false, false);
+ /* behave like OP_INVOKE_DIRECT_RANGE */
+ GOTO_invoke(invokeDirect, true, false);
}
#else
/* debugger can't be attached, skip method invocation */
diff --git a/vm/mterp/out/InterpC-x86-atom.c b/vm/mterp/out/InterpC-x86-atom.c
index edaac5ae3..e8013da33 100644
--- a/vm/mterp/out/InterpC-x86-atom.c
+++ b/vm/mterp/out/InterpC-x86-atom.c
@@ -1330,12 +1330,12 @@ OP_END
HANDLE_SPUT_X(OP_SPUT_WIDE_VOLATILE, "-wide-volatile", LongVolatile, _WIDE)
OP_END
-/* File: c/OP_INVOKE_OBJECT_INIT.c */
-HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
+/* File: c/OP_INVOKE_OBJECT_INIT_RANGE.c */
+HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT_RANGE /*{vCCCC..v(CCCC+AA-1)}, meth@BBBB*/)
{
Object* obj;
- vsrc1 = FETCH(2) & 0x0f; /* reg number of "this" pointer */
+ vsrc1 = FETCH(2); /* reg number of "this" pointer */
obj = GET_REGISTER_AS_OBJECT(vsrc1);
if (!checkForNullExportPC(obj, fp, pc))
@@ -1355,8 +1355,8 @@ HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
/* skip method invocation */
FINISH(3);
} else {
- /* behave like OP_INVOKE_DIRECT */
- GOTO_invoke(invokeDirect, false, false);
+ /* behave like OP_INVOKE_DIRECT_RANGE */
+ GOTO_invoke(invokeDirect, true, false);
}
#else
/* debugger can't be attached, skip method invocation */
diff --git a/vm/mterp/out/InterpC-x86.c b/vm/mterp/out/InterpC-x86.c
index ce8d5801d..00ac49529 100644
--- a/vm/mterp/out/InterpC-x86.c
+++ b/vm/mterp/out/InterpC-x86.c
@@ -1355,12 +1355,12 @@ HANDLE_OPCODE(OP_EXECUTE_INLINE_RANGE /*{vCCCC..v(CCCC+AA-1)}, inline@BBBB*/)
FINISH(3);
OP_END
-/* File: c/OP_INVOKE_OBJECT_INIT.c */
-HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
+/* File: c/OP_INVOKE_OBJECT_INIT_RANGE.c */
+HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT_RANGE /*{vCCCC..v(CCCC+AA-1)}, meth@BBBB*/)
{
Object* obj;
- vsrc1 = FETCH(2) & 0x0f; /* reg number of "this" pointer */
+ vsrc1 = FETCH(2); /* reg number of "this" pointer */
obj = GET_REGISTER_AS_OBJECT(vsrc1);
if (!checkForNullExportPC(obj, fp, pc))
@@ -1380,8 +1380,8 @@ HANDLE_OPCODE(OP_INVOKE_OBJECT_INIT /*vB, {vD, vE, vF, vG, vA}, meth@CCCC*/)
/* skip method invocation */
FINISH(3);
} else {
- /* behave like OP_INVOKE_DIRECT */
- GOTO_invoke(invokeDirect, false, false);
+ /* behave like OP_INVOKE_DIRECT_RANGE */
+ GOTO_invoke(invokeDirect, true, false);
}
#else
/* debugger can't be attached, skip method invocation */
diff --git a/vm/mterp/x86-atom/OP_INVOKE_OBJECT_INIT.S b/vm/mterp/x86-atom/OP_INVOKE_OBJECT_INIT_RANGE.S
index faf1565bc..faf1565bc 100644
--- a/vm/mterp/x86-atom/OP_INVOKE_OBJECT_INIT.S
+++ b/vm/mterp/x86-atom/OP_INVOKE_OBJECT_INIT_RANGE.S
diff --git a/vm/mterp/x86-atom/entry.S b/vm/mterp/x86-atom/entry.S
index ac6973be5..ff6ab0bc0 100644
--- a/vm/mterp/x86-atom/entry.S
+++ b/vm/mterp/x86-atom/entry.S
@@ -373,7 +373,7 @@ dvmAsmInstructionJmpTable = .LdvmAsmInstructionJmpTable
.long .L_OP_THROW_VERIFICATION_ERROR
.long .L_OP_EXECUTE_INLINE
.long .L_OP_EXECUTE_INLINE_RANGE
-.long .L_OP_INVOKE_OBJECT_INIT
+.long .L_OP_INVOKE_OBJECT_INIT_RANGE
.long .L_OP_UNUSED_F1
.long .L_OP_IGET_QUICK
.long .L_OP_IGET_WIDE_QUICK
diff --git a/vm/mterp/x86/OP_INVOKE_OBJECT_INIT.S b/vm/mterp/x86/OP_INVOKE_OBJECT_INIT_RANGE.S
index fb84b32bb..fb84b32bb 100644
--- a/vm/mterp/x86/OP_INVOKE_OBJECT_INIT.S
+++ b/vm/mterp/x86/OP_INVOKE_OBJECT_INIT_RANGE.S