diff options
Diffstat (limited to 'compiler/dex/quick/ralloc_util.cc')
-rw-r--r-- | compiler/dex/quick/ralloc_util.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/dex/quick/ralloc_util.cc b/compiler/dex/quick/ralloc_util.cc index be966e1ac3..4021c95791 100644 --- a/compiler/dex/quick/ralloc_util.cc +++ b/compiler/dex/quick/ralloc_util.cc @@ -359,19 +359,19 @@ RegStorage Mir2Lir::AllocTempBody(GrowableArray<RegisterInfo*> ®s, int* next_ RegisterInfo* info = regs.Get(next); // Try to allocate a register that doesn't hold a live value. if (info->IsTemp() && !info->InUse() && info->IsDead()) { - Clobber(info->GetReg()); - info->MarkInUse(); - /* - * NOTE: "wideness" is an attribute of how the container is used, not its physical size. - * The caller will set wideness as appropriate. - */ + // If it's wide, split it up. if (info->IsWide()) { - RegisterInfo* partner = GetRegInfo(info->Partner()); - DCHECK_EQ(info->GetReg().GetRegNum(), partner->Partner().GetRegNum()); - DCHECK(partner->IsWide()); + // If the pair was associated with a wide value, unmark the partner as well. + if (info->SReg() != INVALID_SREG) { + RegisterInfo* partner = GetRegInfo(info->Partner()); + DCHECK_EQ(info->GetReg().GetRegNum(), partner->Partner().GetRegNum()); + DCHECK(partner->IsWide()); + partner->SetIsWide(false); + } info->SetIsWide(false); - partner->SetIsWide(false); } + Clobber(info->GetReg()); + info->MarkInUse(); *next_temp = next + 1; return info->GetReg(); } |