diff options
| author | Elliott Hughes <enh@google.com> | 2013-04-01 16:05:30 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2013-04-01 16:05:30 -0700 |
| commit | 24474096b4624d2f5ab20956bc4d26520935279c (patch) | |
| tree | 25eb810cd3bc5c3070814da57537880d3e5d9596 /vm/compiler/codegen | |
| parent | dbb1f813ad87baad3116c857a99d21b754269fea (diff) | |
| parent | d335cba5c2868922abf2fa09432f8a938907e2da (diff) | |
| download | android_dalvik-24474096b4624d2f5ab20956bc4d26520935279c.tar.gz android_dalvik-24474096b4624d2f5ab20956bc4d26520935279c.tar.bz2 android_dalvik-24474096b4624d2f5ab20956bc4d26520935279c.zip | |
am d335cba5: Merge "[x86] Terminate trace if SGET/SPUT have unresolved fields in codegen"
* commit 'd335cba5c2868922abf2fa09432f8a938907e2da':
[x86] Terminate trace if SGET/SPUT have unresolved fields in codegen
Diffstat (limited to 'vm/compiler/codegen')
| -rw-r--r-- | vm/compiler/codegen/x86/LowerGetPut.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/vm/compiler/codegen/x86/LowerGetPut.cpp b/vm/compiler/codegen/x86/LowerGetPut.cpp index c87b17403..be519b124 100644 --- a/vm/compiler/codegen/x86/LowerGetPut.cpp +++ b/vm/compiler/codegen/x86/LowerGetPut.cpp @@ -668,7 +668,17 @@ int sget_sput_common(int flag, u2 vA, u2 tmp, bool isObj, bool isVolatile) { void *fieldPtr = (void*) (currentMethod->clazz->pDvmDex->pResFields[tmp]); #endif - assert(fieldPtr != NULL); + + /* Usually, fieldPtr should not be null. The interpreter should resolve + * it before we come here, or not allow this opcode in a trace. However, + * we can be in a loop trace and this opcode might have been picked up + * by exhaustTrace. Sending a -1 here will terminate the loop formation + * and fall back to normal trace, which will not have this opcode. + */ + if (!fieldPtr) { + return -1; + } + move_imm_to_reg(OpndSize_32, (int)fieldPtr, PhysicalReg_EAX, true); if(flag == SGET) { move_mem_to_reg(OpndSize_32, offStaticField_value, PhysicalReg_EAX, true, 7, false); //access field |
