diff options
| author | Elliott Hughes <enh@google.com> | 2012-01-04 15:38:58 -0800 |
|---|---|---|
| committer | Elliott Hughes <enh@google.com> | 2012-01-05 10:47:28 -0800 |
| commit | ab35b50311951feea3782151dd5422ee944685c2 (patch) | |
| tree | 5f4743612c5c3d1ac48a90e90e39361d40acf7f1 /vm/compiler/codegen/arm/CodegenDriver.cpp | |
| parent | d04ce3821fb7db99685c653b25397e3ca51e5cfd (diff) | |
Remove unsupported experimental opcodes.
External developers were starting to try to get themselves into trouble with
this stuff...
Change-Id: I2b03bfeaa8c98b6a994bc7924fc8dcf4e4d4f6cb
Diffstat (limited to 'vm/compiler/codegen/arm/CodegenDriver.cpp')
| -rw-r--r-- | vm/compiler/codegen/arm/CodegenDriver.cpp | 146 |
1 files changed, 29 insertions, 117 deletions
diff --git a/vm/compiler/codegen/arm/CodegenDriver.cpp b/vm/compiler/codegen/arm/CodegenDriver.cpp index ef0f0432a..57fd38808 100644 --- a/vm/compiler/codegen/arm/CodegenDriver.cpp +++ b/vm/compiler/codegen/arm/CodegenDriver.cpp @@ -1034,9 +1034,6 @@ static void genProcessArgsRange(CompilationUnit *cUnit, MIR *mir, /* * Protect the loadMultiple instruction from being reordered with other * Dalvik stack accesses. - * - * This code is also shared by the invoke jumbo instructions, and this - * does not need to be done if the invoke jumbo has no arguments. */ if (numArgs != 0) loadMultiple(cUnit, r4PC, regMask); @@ -1493,7 +1490,7 @@ static bool handleFmt10x(CompilationUnit *cUnit, MIR *mir) case OP_UNUSED_73: case OP_UNUSED_79: case OP_UNUSED_7A: - case OP_DISPATCH_FF: + case OP_UNUSED_FF: LOGE("Codegen: got unused opcode %#x",dalvikOpcode); return true; case OP_NOP: @@ -1568,14 +1565,14 @@ static bool handleFmt21h(CompilationUnit *cUnit, MIR *mir) return false; } -static bool handleFmt20bc_Fmt40sc(CompilationUnit *cUnit, MIR *mir) +static bool handleFmt20bc(CompilationUnit *cUnit, MIR *mir) { - /* For OP_THROW_VERIFICATION_ERROR & OP_THROW_VERIFICATION_ERROR_JUMBO */ + /* For OP_THROW_VERIFICATION_ERROR */ genInterpSingleStep(cUnit, mir); return false; } -static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) +static bool handleFmt21c_Fmt31c(CompilationUnit *cUnit, MIR *mir) { RegLocation rlResult; RegLocation rlDest; @@ -1599,8 +1596,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) storeValue(cUnit, rlDest, rlResult); break; } - case OP_CONST_CLASS: - case OP_CONST_CLASS_JUMBO: { + case OP_CONST_CLASS: { void *classPtr = (void*) (cUnit->method->clazz->pDvmDex->pResClasses[mir->dalvikInsn.vB]); @@ -1618,20 +1614,12 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) } case OP_SGET: case OP_SGET_VOLATILE: - case OP_SGET_VOLATILE_JUMBO: - case OP_SGET_JUMBO: case OP_SGET_OBJECT: case OP_SGET_OBJECT_VOLATILE: - case OP_SGET_OBJECT_VOLATILE_JUMBO: - case OP_SGET_OBJECT_JUMBO: case OP_SGET_BOOLEAN: - case OP_SGET_BOOLEAN_JUMBO: case OP_SGET_CHAR: - case OP_SGET_CHAR_JUMBO: case OP_SGET_BYTE: - case OP_SGET_BYTE_JUMBO: - case OP_SGET_SHORT: - case OP_SGET_SHORT_JUMBO: { + case OP_SGET_SHORT: { int valOffset = OFFSETOF_MEMBER(StaticField, value); int tReg = dvmCompilerAllocTemp(cUnit); bool isVolatile; @@ -1657,9 +1645,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) #if ANDROID_SMP != 0 Opcode opcode = mir->dalvikInsn.opcode; isVolatile = (opcode == OP_SGET_VOLATILE) || - (opcode == OP_SGET_VOLATILE_JUMBO) || - (opcode == OP_SGET_OBJECT_VOLATILE) || - (opcode == OP_SGET_OBJECT_VOLATILE_JUMBO); + (opcode == OP_SGET_OBJECT_VOLATILE); assert(isVolatile == dvmIsVolatileField((Field *) fieldPtr)); #else isVolatile = dvmIsVolatileField((Field *) fieldPtr); @@ -1679,8 +1665,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) storeValue(cUnit, rlDest, rlResult); break; } - case OP_SGET_WIDE: - case OP_SGET_WIDE_JUMBO: { + case OP_SGET_WIDE: { int valOffset = OFFSETOF_MEMBER(StaticField, value); const Method *method = (mir->OptimizationFlags & MIR_CALLEE) ? mir->meta.calleeMethod : cUnit->method; @@ -1707,20 +1692,12 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) } case OP_SPUT: case OP_SPUT_VOLATILE: - case OP_SPUT_VOLATILE_JUMBO: - case OP_SPUT_JUMBO: case OP_SPUT_OBJECT: case OP_SPUT_OBJECT_VOLATILE: - case OP_SPUT_OBJECT_VOLATILE_JUMBO: - case OP_SPUT_OBJECT_JUMBO: case OP_SPUT_BOOLEAN: - case OP_SPUT_BOOLEAN_JUMBO: case OP_SPUT_CHAR: - case OP_SPUT_CHAR_JUMBO: case OP_SPUT_BYTE: - case OP_SPUT_BYTE_JUMBO: - case OP_SPUT_SHORT: - case OP_SPUT_SHORT_JUMBO: { + case OP_SPUT_SHORT: { int valOffset = OFFSETOF_MEMBER(StaticField, value); int tReg = dvmCompilerAllocTemp(cUnit); int objHead; @@ -1740,18 +1717,14 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) #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); + (opcode == OP_SPUT_OBJECT_VOLATILE); assert(isVolatile == dvmIsVolatileField((Field *) fieldPtr)); #else isVolatile = dvmIsVolatileField((Field *) fieldPtr); #endif isSputObject = (opcode == OP_SPUT_OBJECT) || - (opcode == OP_SPUT_OBJECT_JUMBO) || - (opcode == OP_SPUT_OBJECT_VOLATILE) || - (opcode == OP_SPUT_OBJECT_VOLATILE_JUMBO); + (opcode == OP_SPUT_OBJECT_VOLATILE); rlSrc = dvmCompilerGetSrc(cUnit, mir, 0); rlSrc = loadValue(cUnit, rlSrc, kAnyReg); @@ -1778,8 +1751,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) break; } - case OP_SPUT_WIDE: - case OP_SPUT_WIDE_JUMBO: { + case OP_SPUT_WIDE: { int tReg = dvmCompilerAllocTemp(cUnit); int valOffset = OFFSETOF_MEMBER(StaticField, value); const Method *method = (mir->OptimizationFlags & MIR_CALLEE) ? @@ -1802,8 +1774,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) HEAP_ACCESS_SHADOW(false); break; } - case OP_NEW_INSTANCE: - case OP_NEW_INSTANCE_JUMBO: { + case OP_NEW_INSTANCE: { /* * Obey the calling convention and don't mess with the register * usage. @@ -1847,8 +1818,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) storeValue(cUnit, rlDest, rlResult); break; } - case OP_CHECK_CAST: - case OP_CHECK_CAST_JUMBO: { + case OP_CHECK_CAST: { /* * Obey the calling convention and don't mess with the register * usage. @@ -1903,9 +1873,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) break; } case OP_SGET_WIDE_VOLATILE: - case OP_SGET_WIDE_VOLATILE_JUMBO: case OP_SPUT_WIDE_VOLATILE: - case OP_SPUT_WIDE_VOLATILE_JUMBO: genInterpSingleStep(cUnit, mir); break; default: @@ -2407,7 +2375,7 @@ static bool handleFmt22b_Fmt22s(CompilationUnit *cUnit, MIR *mir) return false; } -static bool handleFmt22c_Fmt52c(CompilationUnit *cUnit, MIR *mir) +static bool handleFmt22c(CompilationUnit *cUnit, MIR *mir) { Opcode dalvikOpcode = mir->dalvikInsn.opcode; int fieldOffset = -1; @@ -2417,50 +2385,30 @@ static bool handleFmt22c_Fmt52c(CompilationUnit *cUnit, MIR *mir) * Wide volatiles currently handled via single step. * Add them here if generating in-line code. * case OP_IGET_WIDE_VOLATILE: - * case OP_IGET_WIDE_VOLATILE_JUMBO: * case OP_IPUT_WIDE_VOLATILE: - * case OP_IPUT_WIDE_VOLATILE_JUMBO: */ case OP_IGET_VOLATILE: - case OP_IGET_VOLATILE_JUMBO: case OP_IGET_OBJECT_VOLATILE: - case OP_IGET_OBJECT_VOLATILE_JUMBO: case OP_IPUT_VOLATILE: - 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: - case OP_IGET_WIDE_JUMBO: case OP_IGET_OBJECT: - case OP_IGET_OBJECT_JUMBO: case OP_IGET_BOOLEAN: - case OP_IGET_BOOLEAN_JUMBO: case OP_IGET_BYTE: - case OP_IGET_BYTE_JUMBO: case OP_IGET_CHAR: - case OP_IGET_CHAR_JUMBO: case OP_IGET_SHORT: - case OP_IGET_SHORT_JUMBO: case OP_IPUT: - case OP_IPUT_JUMBO: case OP_IPUT_WIDE: - case OP_IPUT_WIDE_JUMBO: case OP_IPUT_OBJECT: - case OP_IPUT_OBJECT_JUMBO: case OP_IPUT_BOOLEAN: - case OP_IPUT_BOOLEAN_JUMBO: case OP_IPUT_BYTE: - case OP_IPUT_BYTE_JUMBO: case OP_IPUT_CHAR: - case OP_IPUT_CHAR_JUMBO: - case OP_IPUT_SHORT: - case OP_IPUT_SHORT_JUMBO: { + case OP_IPUT_SHORT: { const Method *method = (mir->OptimizationFlags & MIR_CALLEE) ? mir->meta.calleeMethod : cUnit->method; Field *fieldPtr = @@ -2485,8 +2433,7 @@ static bool handleFmt22c_Fmt52c(CompilationUnit *cUnit, MIR *mir) } switch (dalvikOpcode) { - case OP_NEW_ARRAY: - case OP_NEW_ARRAY_JUMBO: { + case OP_NEW_ARRAY: { // Generates a call - use explicit registers RegLocation rlSrc = dvmCompilerGetSrc(cUnit, mir, 0); RegLocation rlDest = dvmCompilerGetDest(cUnit, mir, 0); @@ -2530,8 +2477,7 @@ static bool handleFmt22c_Fmt52c(CompilationUnit *cUnit, MIR *mir) storeValue(cUnit, rlDest, rlResult); break; } - case OP_INSTANCE_OF: - case OP_INSTANCE_OF_JUMBO: { + case OP_INSTANCE_OF: { // May generate a call - use explicit registers RegLocation rlSrc = dvmCompilerGetSrc(cUnit, mir, 0); RegLocation rlDest = dvmCompilerGetDest(cUnit, mir, 0); @@ -2578,55 +2524,35 @@ static bool handleFmt22c_Fmt52c(CompilationUnit *cUnit, MIR *mir) break; } case OP_IGET_WIDE: - case OP_IGET_WIDE_JUMBO: genIGetWide(cUnit, mir, fieldOffset); break; case OP_IGET_VOLATILE: - case OP_IGET_VOLATILE_JUMBO: case OP_IGET_OBJECT_VOLATILE: - case OP_IGET_OBJECT_VOLATILE_JUMBO: case OP_IGET: - case OP_IGET_JUMBO: case OP_IGET_OBJECT: - case OP_IGET_OBJECT_JUMBO: case OP_IGET_BOOLEAN: - case OP_IGET_BOOLEAN_JUMBO: case OP_IGET_BYTE: - case OP_IGET_BYTE_JUMBO: case OP_IGET_CHAR: - case OP_IGET_CHAR_JUMBO: case OP_IGET_SHORT: - case OP_IGET_SHORT_JUMBO: genIGet(cUnit, mir, kWord, fieldOffset, isVolatile); break; case OP_IPUT_WIDE: - case OP_IPUT_WIDE_JUMBO: genIPutWide(cUnit, mir, fieldOffset); break; case OP_IPUT_VOLATILE: - case OP_IPUT_VOLATILE_JUMBO: case OP_IPUT: - case OP_IPUT_JUMBO: case OP_IPUT_BOOLEAN: - case OP_IPUT_BOOLEAN_JUMBO: case OP_IPUT_BYTE: - case OP_IPUT_BYTE_JUMBO: case OP_IPUT_CHAR: - case OP_IPUT_CHAR_JUMBO: case OP_IPUT_SHORT: - case OP_IPUT_SHORT_JUMBO: genIPut(cUnit, mir, kWord, fieldOffset, false, isVolatile); break; case OP_IPUT_OBJECT_VOLATILE: - case OP_IPUT_OBJECT_VOLATILE_JUMBO: case OP_IPUT_OBJECT: - case OP_IPUT_OBJECT_JUMBO: genIPut(cUnit, mir, kWord, fieldOffset, true, isVolatile); break; case OP_IGET_WIDE_VOLATILE: - case OP_IGET_WIDE_VOLATILE_JUMBO: case OP_IPUT_WIDE_VOLATILE: - case OP_IPUT_WIDE_VOLATILE_JUMBO: genInterpSingleStep(cUnit, mir); break; default: @@ -3052,7 +2978,7 @@ static void genLandingPadForMispredictedCallee(CompilationUnit *cUnit, MIR *mir, mir->meta.callsiteInfo->misPredBranchOver->target = (LIR *) target; } -static bool handleFmt35c_3rc_5rc(CompilationUnit *cUnit, MIR *mir, +static bool handleFmt35c_3rc(CompilationUnit *cUnit, MIR *mir, BasicBlock *bb, ArmLIR *labelList) { ArmLIR *retChainingCell = NULL; @@ -3073,8 +2999,7 @@ static bool handleFmt35c_3rc_5rc(CompilationUnit *cUnit, MIR *mir, * ] */ case OP_INVOKE_VIRTUAL: - case OP_INVOKE_VIRTUAL_RANGE: - case OP_INVOKE_VIRTUAL_JUMBO: { + case OP_INVOKE_VIRTUAL_RANGE: { ArmLIR *predChainingCell = &labelList[bb->taken->id]; int methodIndex = cUnit->method->clazz->pDvmDex->pResMethods[dInsn->vB]-> @@ -3105,8 +3030,7 @@ static bool handleFmt35c_3rc_5rc(CompilationUnit *cUnit, MIR *mir, * ->pResMethods[BBBB]->methodIndex] */ case OP_INVOKE_SUPER: - case OP_INVOKE_SUPER_RANGE: - case OP_INVOKE_SUPER_JUMBO: { + case OP_INVOKE_SUPER_RANGE: { /* Grab the method ptr directly from what the interpreter sees */ const Method *calleeMethod = mir->meta.callsiteInfo->method; assert(calleeMethod == cUnit->method->clazz->super->vtable[ @@ -3135,8 +3059,7 @@ static bool handleFmt35c_3rc_5rc(CompilationUnit *cUnit, MIR *mir, } /* calleeMethod = method->clazz->pDvmDex->pResMethods[BBBB] */ case OP_INVOKE_DIRECT: - case OP_INVOKE_DIRECT_RANGE: - case OP_INVOKE_DIRECT_JUMBO: { + case OP_INVOKE_DIRECT_RANGE: { /* Grab the method ptr directly from what the interpreter sees */ const Method *calleeMethod = mir->meta.callsiteInfo->method; assert(calleeMethod == @@ -3156,8 +3079,7 @@ static bool handleFmt35c_3rc_5rc(CompilationUnit *cUnit, MIR *mir, } /* calleeMethod = method->clazz->pDvmDex->pResMethods[BBBB] */ case OP_INVOKE_STATIC: - case OP_INVOKE_STATIC_RANGE: - case OP_INVOKE_STATIC_JUMBO: { + case OP_INVOKE_STATIC_RANGE: { /* Grab the method ptr directly from what the interpreter sees */ const Method *calleeMethod = mir->meta.callsiteInfo->method; assert(calleeMethod == @@ -3257,8 +3179,7 @@ static bool handleFmt35c_3rc_5rc(CompilationUnit *cUnit, MIR *mir, * 0x47357ebc : .word (0x425719dc) */ case OP_INVOKE_INTERFACE: - case OP_INVOKE_INTERFACE_RANGE: - case OP_INVOKE_INTERFACE_JUMBO: { + case OP_INVOKE_INTERFACE_RANGE: { ArmLIR *predChainingCell = &labelList[bb->taken->id]; /* @@ -3406,11 +3327,9 @@ static bool handleFmt35c_3rc_5rc(CompilationUnit *cUnit, MIR *mir, genTrap(cUnit, mir->offset, pcrLabel); break; } - case OP_INVOKE_OBJECT_INIT_JUMBO: case OP_INVOKE_OBJECT_INIT_RANGE: case OP_FILLED_NEW_ARRAY: - case OP_FILLED_NEW_ARRAY_RANGE: - case OP_FILLED_NEW_ARRAY_JUMBO: { + case OP_FILLED_NEW_ARRAY_RANGE: { /* Just let the interpreter deal with these */ genInterpSingleStep(cUnit, mir); break; @@ -4231,11 +4150,8 @@ static bool selfVerificationPuntOps(MIR *mir) case OP_MONITOR_ENTER: case OP_MONITOR_EXIT: case OP_NEW_INSTANCE: - case OP_NEW_INSTANCE_JUMBO: case OP_NEW_ARRAY: - case OP_NEW_ARRAY_JUMBO: case OP_CHECK_CAST: - case OP_CHECK_CAST_JUMBO: case OP_MOVE_EXCEPTION: case OP_FILL_ARRAY_DATA: case OP_EXECUTE_INLINE: @@ -4486,13 +4402,11 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit) notHandled = handleFmt12x(cUnit, mir); break; case kFmt20bc: - case kFmt40sc: - notHandled = handleFmt20bc_Fmt40sc(cUnit, mir); + notHandled = handleFmt20bc(cUnit, mir); break; case kFmt21c: case kFmt31c: - case kFmt41c: - notHandled = handleFmt21c_Fmt31c_Fmt41c(cUnit, mir); + notHandled = handleFmt21c_Fmt31c(cUnit, mir); break; case kFmt21h: notHandled = handleFmt21h(cUnit, mir); @@ -4509,8 +4423,7 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit) notHandled = handleFmt22b_Fmt22s(cUnit, mir); break; case kFmt22c: - case kFmt52c: - notHandled = handleFmt22c_Fmt52c(cUnit, mir); + notHandled = handleFmt22c(cUnit, mir); break; case kFmt22cs: notHandled = handleFmt22cs(cUnit, mir); @@ -4531,8 +4444,7 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit) break; case kFmt3rc: case kFmt35c: - case kFmt5rc: - notHandled = handleFmt35c_3rc_5rc(cUnit, mir, bb, + notHandled = handleFmt35c_3rc(cUnit, mir, bb, labelList); break; case kFmt3rms: |
