Various bugfixes
divide by zero check for longs, off-by-one error on fill-array-data,
register management hygene, mvn encoding, iget/iput <= 32bits are
done as 32-bit (code was using type size for ld/st).
Change-Id: Ia09323e7d92f4ad21890af4c10f2f8c8f05f3b0e
diff --git a/src/compiler/codegen/RallocUtil.cc b/src/compiler/codegen/RallocUtil.cc
index 47d5ac0..9df80bd 100644
--- a/src/compiler/codegen/RallocUtil.cc
+++ b/src/compiler/codegen/RallocUtil.cc
@@ -884,6 +884,7 @@
if (infoLo->pair) {
oatClobber(cUnit, infoLo->reg);
oatClobber(cUnit, infoLo->partner);
+ oatFreeTemp(cUnit, infoLo->reg);
} else {
loc.lowReg = infoLo->reg;
loc.location = kLocPhysReg;
@@ -957,14 +958,16 @@
DCHECK(!FPREG(loc.lowReg) || ((loc.lowReg & 0x1) == 0));
return loc;
}
- // Can't easily reuse - clobber any overlaps
+ // Can't easily reuse - clobber and free any overlaps
if (infoLo) {
oatClobber(cUnit, infoLo->reg);
+ oatFreeTemp(cUnit, infoLo->reg);
if (infoLo->pair)
oatClobber(cUnit, infoLo->partner);
}
if (infoHi) {
oatClobber(cUnit, infoHi->reg);
+ oatFreeTemp(cUnit, infoHi->reg);
if (infoHi->pair)
oatClobber(cUnit, infoHi->partner);
}