From 010cffc1b8d64a4afc1943729642477a16e9c3fb Mon Sep 17 00:00:00 2001 From: buzbee Date: Wed, 21 Sep 2011 18:28:43 -0700 Subject: 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 --- src/compiler/codegen/arm/MethodCodegenDriver.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler/codegen/arm/MethodCodegenDriver.cc') 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); -- cgit v1.2.3-59-g8ed1b