summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/arm/MethodCodegenDriver.cc
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2011-09-21 18:28:43 -0700
committer buzbee <buzbee@google.com> 2011-09-21 18:28:43 -0700
commit010cffc1b8d64a4afc1943729642477a16e9c3fb (patch)
tree58a953afdf3b41372b367bc9a7a6de1b908ad2d4 /src/compiler/codegen/arm/MethodCodegenDriver.cc
parentc6766ed17d27417bfce62c31b342b3faa47ada5d (diff)
Restore Method* following invoke with > 20 args
In the case of a huge number of arguments, the invoke setup code will call memcpy(), which trashes the caller saves. Need to restore Method*, which had already been loaded into arg0/r0. Change-Id: I3a9b74132fb407263afef2a103ccac071ea6a653
Diffstat (limited to 'src/compiler/codegen/arm/MethodCodegenDriver.cc')
-rw-r--r--src/compiler/codegen/arm/MethodCodegenDriver.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/codegen/arm/MethodCodegenDriver.cc b/src/compiler/codegen/arm/MethodCodegenDriver.cc
index 8dc388c7e3..ce658033ea 100644
--- a/src/compiler/codegen/arm/MethodCodegenDriver.cc
+++ b/src/compiler/codegen/arm/MethodCodegenDriver.cc
@@ -849,6 +849,8 @@ static int genDalvikArgsRange(CompilationUnit* cUnit, MIR* mir,
loadWordDisp(cUnit, rSELF, OFFSETOF_MEMBER(Thread, pMemcpy), rLR);
loadConstant(cUnit, r2, (numArgs - 3) * 4);
callNoUnwindHelper(cUnit, rLR);
+ // Restore Method*
+ loadCurrMethodDirect(cUnit, r0);
} else {
// Use vldm/vstm pair using r3 as a temp
int regsLeft = std::min(numArgs - 3, 16);