diff options
| author | 2011-09-26 17:51:15 -0700 | |
|---|---|---|
| committer | 2011-09-26 17:51:15 -0700 | |
| commit | 1ff230d113d25fbcd2986773799ac1ef504a6af0 (patch) | |
| tree | bff83a4e728f339d18a1bf7f8cb9384348bcf59c /src/compiler/codegen/CodegenFactory.cc | |
| parent | 20d8d673ed402e9d0292f1770313476ce94a9ef2 (diff) | |
| parent | b29e4d1423028fab47db3be6e41e4b2a067bf100 (diff) | |
Merge "Misc codegen fixes related to register promotion" into dalvik-dev
Diffstat (limited to 'src/compiler/codegen/CodegenFactory.cc')
| -rw-r--r-- | src/compiler/codegen/CodegenFactory.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/codegen/CodegenFactory.cc b/src/compiler/codegen/CodegenFactory.cc index 108bc83521..55ed8af080 100644 --- a/src/compiler/codegen/CodegenFactory.cc +++ b/src/compiler/codegen/CodegenFactory.cc @@ -131,8 +131,9 @@ STATIC void storeValue(CompilationUnit* cUnit, RegLocation rlDest, rlDest = oatUpdateLoc(cUnit, rlDest); if (rlSrc.location == kLocPhysReg) { if (oatIsLive(cUnit, rlSrc.lowReg) || + oatIsPromoted(cUnit, rlSrc.lowReg) || (rlDest.location == kLocPhysReg)) { - // Src is live or Dest has assigned reg. + // Src is live/promoted or Dest has assigned reg. rlDest = oatEvalLoc(cUnit, rlDest, kAnyReg, false); genRegCopy(cUnit, rlDest.lowReg, rlSrc.lowReg); } else { @@ -192,8 +193,10 @@ STATIC void storeValueWide(CompilationUnit* cUnit, RegLocation rlDest, if (rlSrc.location == kLocPhysReg) { if (oatIsLive(cUnit, rlSrc.lowReg) || oatIsLive(cUnit, rlSrc.highReg) || + oatIsPromoted(cUnit, rlSrc.lowReg) || + oatIsPromoted(cUnit, rlSrc.highReg) || (rlDest.location == kLocPhysReg)) { - // Src is live or Dest has assigned reg. + // Src is live or promoted or Dest has assigned reg. rlDest = oatEvalLoc(cUnit, rlDest, kAnyReg, false); genRegCopyWide(cUnit, rlDest.lowReg, rlDest.highReg, rlSrc.lowReg, rlSrc.highReg); |