diff options
author | Ian Rogers <irogers@google.com> | 2011-10-31 17:32:48 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-31 17:32:48 -0700 |
commit | 43c71a1a99785e1b25374aadb29817d43efba78f (patch) | |
tree | 736b98afc41ab68d31c66ebd7d65e97081a26205 /src | |
parent | 5f7ee534dd3be2d734f92dd8b76cde2ace864971 (diff) | |
parent | 6a9967818deb13e31846cce083227e32517edf38 (diff) | |
download | art-43c71a1a99785e1b25374aadb29817d43efba78f.zip art-43c71a1a99785e1b25374aadb29817d43efba78f.tar.gz art-43c71a1a99785e1b25374aadb29817d43efba78f.tar.bz2 |
Merge "Ensure r0/ref isn't clobbered by call." into dalvik-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/codegen/arm/Thumb2/Gen.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/codegen/arm/Thumb2/Gen.cc b/src/compiler/codegen/arm/Thumb2/Gen.cc index e58a982..82ee016 100644 --- a/src/compiler/codegen/arm/Thumb2/Gen.cc +++ b/src/compiler/codegen/arm/Thumb2/Gen.cc @@ -726,7 +726,6 @@ STATIC void genInstanceof(CompilationUnit* cUnit, MIR* mir, RegLocation rlDest, oatLockCallTemps(cUnit); uint32_t type_idx = mir->dalvikInsn.vC; loadCurrMethodDirect(cUnit, r1); // r1 <= current Method* - loadValueDirectFixed(cUnit, rlSrc, r0); // r0 <= ref int classReg = r2; // r2 will hold the Class* if (!cUnit->compiler->CanAccessTypeWithoutChecks(cUnit->method, type_idx)) { // Check we have access to type_idx and if not throw IllegalAccessError, @@ -737,8 +736,10 @@ STATIC void genInstanceof(CompilationUnit* cUnit, MIR* mir, RegLocation rlDest, loadConstant(cUnit, r0, type_idx); callRuntimeHelper(cUnit, rLR); // InitializeTypeAndVerifyAccess(idx, method) genRegCopy(cUnit, classReg, r0); // Align usage with fast path + loadValueDirectFixed(cUnit, rlSrc, r0); // r0 <= ref } else { // Load dex cache entry into classReg (r2) + loadValueDirectFixed(cUnit, rlSrc, r0); // r0 <= ref loadWordDisp(cUnit, r1, Method::DexCacheResolvedTypesOffset().Int32Value(), classReg); int32_t offset_of_type = Array::DataOffset().Int32Value() + (sizeof(Class*) * type_idx); loadWordDisp(cUnit, classReg, offset_of_type, classReg); |