diff options
| author | Ben Cheng <bccheng@android.com> | 2011-05-11 16:55:48 -0700 |
|---|---|---|
| committer | Ben Cheng <bccheng@android.com> | 2011-05-11 16:55:48 -0700 |
| commit | fe108f779db4fb3bc720a92e69e58177983088c1 (patch) | |
| tree | 90dc67e893dd992d4cbb89215272c1740027520b /vm/compiler/codegen/CodegenFactory.cpp | |
| parent | 313d430d5b3b96b45370ccddee52a6d88a799f35 (diff) | |
Fix a Thumb vs Thumb2 codegen bug.
A Thumb2 pc-relative load is slipped into the codegen stream even though
the selected platform is armv5te (eg the emulator).
Bug: 4399358
Change-Id: I61dd6853cad6c82de43f384814c903dd9f3ae302
Diffstat (limited to 'vm/compiler/codegen/CodegenFactory.cpp')
| -rw-r--r-- | vm/compiler/codegen/CodegenFactory.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/vm/compiler/codegen/CodegenFactory.cpp b/vm/compiler/codegen/CodegenFactory.cpp index ef7a0a976..61e29d7d1 100644 --- a/vm/compiler/codegen/CodegenFactory.cpp +++ b/vm/compiler/codegen/CodegenFactory.cpp @@ -263,33 +263,3 @@ static void storeValueWide(CompilationUnit *cUnit, RegLocation rlDest, } } } - -/* - * Load a class pointer value into a fixed or temp register. Target - * register is clobbered, and marked inUse. - */ -static ArmLIR *loadClassPointer(CompilationUnit *cUnit, int rDest, int value) -{ - ArmLIR *res; - cUnit->hasClassLiterals = true; - if (dvmCompilerIsTemp(cUnit, rDest)) { - dvmCompilerClobber(cUnit, rDest); - dvmCompilerMarkInUse(cUnit, rDest); - } - ArmLIR *dataTarget = scanLiteralPool(cUnit->classPointerList, value, 0); - if (dataTarget == NULL) { - dataTarget = addWordData(cUnit, &cUnit->classPointerList, value); - /* Counts the number of class pointers in this translation */ - cUnit->numClassPointers++; - } - ArmLIR *loadPcRel = (ArmLIR *) dvmCompilerNew(sizeof(ArmLIR), true); - loadPcRel->opcode = kThumb2LdrPcRel12; - loadPcRel->generic.target = (LIR *) dataTarget; - loadPcRel->operands[0] = rDest; - setupResourceMasks(loadPcRel); - setMemRefType(loadPcRel, true, kLiteral); - loadPcRel->aliasInfo = dataTarget->operands[0]; - res = loadPcRel; - dvmCompilerAppendLIR(cUnit, (LIR *) loadPcRel); - return res; -} |
