diff options
| author | 2014-05-05 16:58:01 +0000 | |
|---|---|---|
| committer | 2014-05-05 16:58:01 +0000 | |
| commit | 8ea5baa10b04e9dbd0f0cf14b0358fe8b956bb2e (patch) | |
| tree | f12adc6e4b395f8c85927e5ef9b203aa5b62d1e9 /compiler/dex/quick/codegen_util.cc | |
| parent | 7c6247134c734f7ad205c6065f71cec3dbbf7204 (diff) | |
| parent | 091cc408e9dc87e60fb64c61e186bea568fc3d3a (diff) | |
Merge "Quick compiler: allocate doubles as doubles"
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
| -rw-r--r-- | compiler/dex/quick/codegen_util.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc index 0596d4fff0..396195450a 100644 --- a/compiler/dex/quick/codegen_util.cc +++ b/compiler/dex/quick/codegen_util.cc @@ -254,7 +254,7 @@ void Mir2Lir::DumpPromotionMap() { PromotionMap v_reg_map = promotion_map_[i]; std::string buf; if (v_reg_map.fp_location == kLocPhysReg) { - StringAppendF(&buf, " : s%d", v_reg_map.FpReg & FpRegMask()); + StringAppendF(&buf, " : s%d", RegStorage::RegNum(v_reg_map.FpReg)); } std::string buf3; @@ -942,7 +942,7 @@ Mir2Lir::Mir2Lir(CompilationUnit* cu, MIRGraph* mir_graph, ArenaAllocator* arena switch_tables_(arena, 4, kGrowableArraySwitchTables), fill_array_data_(arena, 4, kGrowableArrayFillArrayData), tempreg_info_(arena, 20, kGrowableArrayMisc), - reginfo_map_(arena, 64, kGrowableArrayMisc), + reginfo_map_(arena, RegStorage::kMaxRegs, kGrowableArrayMisc), pointer_storage_(arena, 128, kGrowableArrayMisc), data_offset_(0), total_size_(0), @@ -1185,8 +1185,19 @@ std::vector<uint8_t>* Mir2Lir::ReturnCallFrameInformation() { RegLocation Mir2Lir::NarrowRegLoc(RegLocation loc) { loc.wide = false; - if (loc.reg.IsPair()) { - loc.reg = loc.reg.GetLow(); + if (loc.location == kLocPhysReg) { + if (loc.reg.IsPair()) { + loc.reg = loc.reg.GetLow(); + } else { + // FIXME: temp workaround. + // Issue here: how do we narrow to a 32-bit value in 64-bit container? + // Probably the wrong thing to narrow the RegStorage container here. That + // should be a target decision. At the RegLocation level, we're only + // modifying the view of the Dalvik value - this is orthogonal to the storage + // container size. Consider this a temp workaround. + DCHECK(loc.reg.IsDouble()); + loc.reg = loc.reg.DoubleToLowSingle(); + } } return loc; } |