summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/CodegenFactory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/codegen/CodegenFactory.cc')
-rw-r--r--src/compiler/codegen/CodegenFactory.cc7
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);