OSDN Git Service

Fix to MirGraph::GetSSANameWithConst()
authorMark Mendell <mark.p.mendell@intel.com>
Mon, 6 Oct 2014 14:58:54 +0000 (10:58 -0400)
committerMark Mendell <mark.p.mendell@intel.com>
Mon, 6 Oct 2014 14:58:54 +0000 (10:58 -0400)
Don't call ConstantValueWide() for a wide constant if high_word is set,
as it will DCHECK if you try to get the value for the high word.

Change-Id: I046ee3e6833ceb556a3c2dbc95699882d30d65f9
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
compiler/dex/mir_graph.cc

index bcbfb5a..563b64a 100644 (file)
@@ -1537,7 +1537,8 @@ std::string MIRGraph::GetSSANameWithConst(int ssa_reg, bool singles_only) {
     return GetSSAName(ssa_reg);
   }
   if (IsConst(reg_location_[ssa_reg])) {
-    if (!singles_only && reg_location_[ssa_reg].wide) {
+    if (!singles_only && reg_location_[ssa_reg].wide &&
+        !reg_location_[ssa_reg].high_word) {
       return StringPrintf("v%d_%d#0x%" PRIx64, SRegToVReg(ssa_reg), GetSSASubscript(ssa_reg),
                           ConstantValueWide(reg_location_[ssa_reg]));
     } else {