diff options
author | Joe Onorato <joeo@google.com> | 2011-04-08 15:36:31 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-04-08 15:36:31 -0700 |
commit | 28d8e334a083e57fc0032e1e8036fad6725523f4 (patch) | |
tree | 818007dac718c27b72b7c96fa1b7e363d5b96b70 | |
parent | 66ce6bf5b6ded4249158c02ddbe9c09c0ac5313e (diff) | |
parent | 80d118aefbba31b7658299bf19f5ca72473390cd (diff) | |
download | android_dalvik-28d8e334a083e57fc0032e1e8036fad6725523f4.tar.gz android_dalvik-28d8e334a083e57fc0032e1e8036fad6725523f4.tar.bz2 android_dalvik-28d8e334a083e57fc0032e1e8036fad6725523f4.zip |
am 80d118ae: Revert "[JIT] Fix volatile test" - breaks build
* commit '80d118aefbba31b7658299bf19f5ca72473390cd':
Revert "[JIT] Fix volatile test" - breaks build
-rw-r--r-- | vm/compiler/codegen/arm/CodegenDriver.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c index 7b4e64464..e4c45367c 100644 --- a/vm/compiler/codegen/arm/CodegenDriver.c +++ b/vm/compiler/codegen/arm/CodegenDriver.c @@ -1645,23 +1645,12 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) dvmAbort(); } - /* - * On SMP systems, Dalvik opcodes found to be referencing - * volatile fields are rewritten to their _VOLATILE variant. - * However, this does not happen on non-SMP systems. The JIT - * still needs to know about volatility to avoid unsafe - * optimizations so we determine volatility based on either - * the opcode or the field access flags. - */ -#if ANDROID_SMP != 0 isVolatile = (opcode == OP_SGET_VOLATILE) || (opcode == OP_SGET_VOLATILE_JUMBO) || (opcode == OP_SGET_OBJECT_VOLATILE) || (opcode == OP_SGET_OBJECT_VOLATILE_JUMBO); + assert(isVolatile == dvmIsVolatileField((Field *) fieldPtr)); -#else - isVolatile = dvmIsVolatileField((Field *) fieldPtr); -#endif rlDest = dvmCompilerGetDest(cUnit, mir, 0); rlResult = dvmCompilerEvalLoc(cUnit, rlDest, kAnyReg, true); @@ -1736,15 +1725,12 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) dvmAbort(); } -#if ANDROID_SMP != 0 isVolatile = (opcode == OP_SPUT_VOLATILE) || (opcode == OP_SPUT_VOLATILE_JUMBO) || (opcode == OP_SPUT_OBJECT_VOLATILE) || (opcode == OP_SPUT_OBJECT_VOLATILE_JUMBO); + assert(isVolatile == dvmIsVolatileField((Field *) fieldPtr)); -#else - isVolatile = dvmIsVolatileField((Field *) fieldPtr); -#endif isSputObject = (opcode == OP_SPUT_OBJECT) || (opcode == OP_SPUT_OBJECT_JUMBO) || @@ -2424,10 +2410,8 @@ static bool handleFmt22c_Fmt52c(CompilationUnit *cUnit, MIR *mir) case OP_IPUT_VOLATILE_JUMBO: case OP_IPUT_OBJECT_VOLATILE: case OP_IPUT_OBJECT_VOLATILE_JUMBO: -#if ANDROID_SMP != 0 isVolatile = true; // NOTE: intentional fallthrough -#endif case OP_IGET: case OP_IGET_JUMBO: case OP_IGET_WIDE: @@ -2466,12 +2450,7 @@ static bool handleFmt22c_Fmt52c(CompilationUnit *cUnit, MIR *mir) LOGE("Unexpected null instance field"); dvmAbort(); } - -#if ANDROID_SMP != 0 - assert(isVolatile == dvmIsVolatileField((Field *) fieldPtr)); -#else - isVolatile = dvmIsVolatileField((Field *) fieldPtr); -#endif + assert(isVolatile == dvmIsVolatileField(fieldPtr)); fieldOffset = ((InstField *)fieldPtr)->byteOffset; break; } @@ -2580,6 +2559,8 @@ static bool handleFmt22c_Fmt52c(CompilationUnit *cUnit, MIR *mir) case OP_IGET_VOLATILE_JUMBO: case OP_IGET_OBJECT_VOLATILE: case OP_IGET_OBJECT_VOLATILE_JUMBO: + isVolatile = true; + // NOTE: intentional fallthrough case OP_IGET: case OP_IGET_JUMBO: case OP_IGET_OBJECT: @@ -2600,6 +2581,8 @@ static bool handleFmt22c_Fmt52c(CompilationUnit *cUnit, MIR *mir) break; case OP_IPUT_VOLATILE: case OP_IPUT_VOLATILE_JUMBO: + isVolatile = true; + // NOTE: intentional fallthrough case OP_IPUT: case OP_IPUT_JUMBO: case OP_IPUT_BOOLEAN: @@ -2614,6 +2597,8 @@ static bool handleFmt22c_Fmt52c(CompilationUnit *cUnit, MIR *mir) break; case OP_IPUT_OBJECT_VOLATILE: case OP_IPUT_OBJECT_VOLATILE_JUMBO: + isVolatile = true; + // NOTE: intentional fallthrough case OP_IPUT_OBJECT: case OP_IPUT_OBJECT_JUMBO: genIPut(cUnit, mir, kWord, fieldOffset, true, isVolatile); |