diff options
| author | 2012-11-19 17:21:31 -0800 | |
|---|---|---|
| committer | 2012-11-19 17:21:31 -0800 | |
| commit | 78f1dc74c54c63bce57d434e756199205c3abf7f (patch) | |
| tree | e9c467473ba72838a592377d7f56aa3c378feb3b /src/compiler/codegen/ralloc_util.cc | |
| parent | 11d4ab2dd052b74923d4a3c6afc3ef4b15f064dc (diff) | |
| parent | cbd6d44c0a94f3d26671b5325aa21bbf1335ffe8 (diff) | |
Merge "C++'ification of Quick compiler's casts" into dalvik-dev
Diffstat (limited to 'src/compiler/codegen/ralloc_util.cc')
| -rw-r--r-- | src/compiler/codegen/ralloc_util.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/compiler/codegen/ralloc_util.cc b/src/compiler/codegen/ralloc_util.cc index 4b66ddf286..efdbd32daa 100644 --- a/src/compiler/codegen/ralloc_util.cc +++ b/src/compiler/codegen/ralloc_util.cc @@ -67,8 +67,8 @@ void dumpRegPool(RegisterInfo* p, int numRegs) LOG(INFO) << StringPrintf( "R[%d]: T:%d, U:%d, P:%d, p:%d, LV:%d, D:%d, SR:%d, ST:%x, EN:%x", p[i].reg, p[i].isTemp, p[i].inUse, p[i].pair, p[i].partner, - p[i].live, p[i].dirty, p[i].sReg,(int)p[i].defStart, - (int)p[i].defEnd); + p[i].live, p[i].dirty, p[i].sReg, reinterpret_cast<uintptr_t>(p[i].defStart), + reinterpret_cast<uintptr_t>(p[i].defEnd)); } LOG(INFO) << "================================================"; } @@ -1077,8 +1077,8 @@ void oatCountRefs(CompilationUnit *cUnit, BasicBlock* bb, /* qsort callback function, sort descending */ int oatSortCounts(const void *val1, const void *val2) { - const RefCounts* op1 = (const RefCounts*)val1; - const RefCounts* op2 = (const RefCounts*)val2; + const RefCounts* op1 = reinterpret_cast<const RefCounts*>(val1); + const RefCounts* op2 = reinterpret_cast<const RefCounts*>(val2); return (op1->count == op2->count) ? 0 : (op1->count < op2->count ? 1 : -1); } @@ -1115,10 +1115,10 @@ extern void oatDoPromotion(CompilationUnit* cUnit) * TUNING: replace with linear scan once we have the ability * to describe register live ranges for GC. */ - RefCounts *coreRegs = (RefCounts *) - oatNew(cUnit, sizeof(RefCounts) * numRegs, true, kAllocRegAlloc); - RefCounts *fpRegs = (RefCounts *) - oatNew(cUnit, sizeof(RefCounts) * numRegs, true, kAllocRegAlloc); + RefCounts *coreRegs = static_cast<RefCounts*>(oatNew(cUnit, sizeof(RefCounts) * numRegs, + true, kAllocRegAlloc)); + RefCounts *fpRegs = static_cast<RefCounts *>(oatNew(cUnit, sizeof(RefCounts) * numRegs, + true, kAllocRegAlloc)); // Set ssa names for original Dalvik registers for (int i = 0; i < dalvikRegs; i++) { coreRegs[i].sReg = fpRegs[i].sReg = i; @@ -1128,7 +1128,7 @@ extern void oatDoPromotion(CompilationUnit* cUnit) fpRegs[dalvikRegs].sReg = cUnit->methodSReg; // For consistecy // Set ssa names for compilerTemps for (int i = 1; i <= cUnit->numCompilerTemps; i++) { - CompilerTemp* ct = (CompilerTemp*)cUnit->compilerTemps.elemList[i]; + CompilerTemp* ct = reinterpret_cast<CompilerTemp*>(cUnit->compilerTemps.elemList[i]); coreRegs[dalvikRegs + i].sReg = ct->sReg; fpRegs[dalvikRegs + i].sReg = ct->sReg; } @@ -1137,7 +1137,7 @@ extern void oatDoPromotion(CompilationUnit* cUnit) oatGrowableListIteratorInit(&cUnit->blockList, &iterator); while (true) { BasicBlock* bb; - bb = (BasicBlock*)oatGrowableListIteratorNext(&iterator); + bb = reinterpret_cast<BasicBlock*>(oatGrowableListIteratorNext(&iterator)); if (bb == NULL) break; oatCountRefs(cUnit, bb, coreRegs, fpRegs); } |