summaryrefslogtreecommitdiff
path: root/runtime/dex_instruction-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/dex_instruction-inl.h')
-rw-r--r--runtime/dex_instruction-inl.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/runtime/dex_instruction-inl.h b/runtime/dex_instruction-inl.h
index 7344d13805..e160a103d9 100644
--- a/runtime/dex_instruction-inl.h
+++ b/runtime/dex_instruction-inl.h
@@ -454,8 +454,8 @@ inline bool Instruction::HasVarArgs25x() const {
return FormatOf(Opcode()) == k25x;
}
-// Copies all of the parameter registers into the arg array. Check the length with VRegB_25x()+1.
-inline void Instruction::GetAllArgs25x(uint32_t arg[kMaxVarArgRegs]) const {
+// Copies all of the parameter registers into the arg array. Check the length with VRegB_25x()+2.
+inline void Instruction::GetAllArgs25x(uint32_t (&arg)[kMaxVarArgRegs25x]) const {
DCHECK_EQ(FormatOf(Opcode()), k25x);
/*
@@ -500,19 +500,21 @@ inline void Instruction::GetAllArgs25x(uint32_t arg[kMaxVarArgRegs]) const {
*/
switch (count) {
case 4:
- arg[4] = (Fetch16(0) >> 8) & 0x0f; // vG
+ arg[5] = (Fetch16(0) >> 8) & 0x0f; // vG
FALLTHROUGH_INTENDED;
case 3:
- arg[3] = (reg_list >> 12) & 0x0f; // vF
+ arg[4] = (reg_list >> 12) & 0x0f; // vF
FALLTHROUGH_INTENDED;
case 2:
- arg[2] = (reg_list >> 8) & 0x0f; // vE
+ arg[3] = (reg_list >> 8) & 0x0f; // vE
FALLTHROUGH_INTENDED;
case 1:
- arg[1] = (reg_list >> 4) & 0x0f; // vD
+ arg[2] = (reg_list >> 4) & 0x0f; // vD
FALLTHROUGH_INTENDED;
default: // case 0
+ // The required lambda 'this' is actually a pair, but the pair is implicit.
arg[0] = VRegC_25x(); // vC
+ arg[1] = arg[0] + 1; // vC + 1
break;
}
}