diff options
| author | 2012-11-16 16:50:17 -0800 | |
|---|---|---|
| committer | 2012-11-16 16:50:18 -0800 | |
| commit | 6aa852b927a12ba16f5c05ee7d044ac1372feb7f (patch) | |
| tree | e88e202952fcf09fad44a58eb366b6a59dcd0424 /src/compiler/codegen/ralloc_util.cc | |
| parent | 2bcb4a496b7aa00d996df3a070524f7568fb35a1 (diff) | |
| parent | eaf09bc65f9a10d12befcdb239156938c9bceef2 (diff) | |
Merge "Quick compiler: more refactoring" into dalvik-dev
Diffstat (limited to 'src/compiler/codegen/ralloc_util.cc')
| -rw-r--r-- | src/compiler/codegen/ralloc_util.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/compiler/codegen/ralloc_util.cc b/src/compiler/codegen/ralloc_util.cc index 059d1c3c24..4b66ddf286 100644 --- a/src/compiler/codegen/ralloc_util.cc +++ b/src/compiler/codegen/ralloc_util.cc @@ -19,7 +19,8 @@ #include "../compiler_utility.h" #include "../compiler_ir.h" #include "../dataflow.h" -#include "ralloc.h" +#include "ralloc_util.h" +#include "codegen_util.h" namespace art { @@ -935,8 +936,8 @@ RegLocation evalLocWide(CompilationUnit* cUnit, RegLocation loc, newRegs = oatAllocTypedTempPair(cUnit, loc.fp, regClass); lowReg = newRegs & 0xff; highReg = (newRegs >> 8) & 0xff; - oatRegCopyWide(cUnit, lowReg, highReg, loc.lowReg, - loc.highReg); + opRegCopyWide(cUnit, lowReg, highReg, loc.lowReg, + loc.highReg); copyRegInfo(cUnit, lowReg, loc.lowReg); copyRegInfo(cUnit, highReg, loc.highReg); oatClobber(cUnit, loc.lowReg); @@ -980,7 +981,7 @@ extern RegLocation oatEvalLoc(CompilationUnit* cUnit, RegLocation loc, if (!regClassMatches(regClass, loc.lowReg)) { /* Wrong register class. Realloc, copy and transfer ownership */ newReg = oatAllocTypedTemp(cUnit, loc.fp, regClass); - oatRegCopy(cUnit, newReg, loc.lowReg); + opRegCopy(cUnit, newReg, loc.lowReg); copyRegInfo(cUnit, newReg, loc.lowReg); oatClobber(cUnit, loc.lowReg); loc.lowReg = newReg; @@ -1006,24 +1007,28 @@ extern RegLocation oatGetRawSrc(CompilationUnit* cUnit, MIR* mir, int num) RegLocation res = cUnit->regLocation[mir->ssaRep->uses[num]]; return res; } + extern RegLocation oatGetRawDest(CompilationUnit* cUnit, MIR* mir) { DCHECK_GT(mir->ssaRep->numDefs, 0); RegLocation res = cUnit->regLocation[mir->ssaRep->defs[0]]; return res; } + extern RegLocation oatGetDest(CompilationUnit* cUnit, MIR* mir) { RegLocation res = oatGetRawDest(cUnit, mir); DCHECK(!res.wide); return res; } + extern RegLocation oatGetSrc(CompilationUnit* cUnit, MIR* mir, int num) { RegLocation res = oatGetRawSrc(cUnit, mir, num); DCHECK(!res.wide); return res; } + extern RegLocation oatGetDestWide(CompilationUnit* cUnit, MIR* mir) { RegLocation res = oatGetRawDest(cUnit, mir); |