OSDN Git Service

ART: ReEnable check for a gap between method's arg "in" vregs and rest of its vregs
authorAlexei Zavjalov <alexei.zavjalov@intel.com>
Tue, 15 Jul 2014 19:17:58 +0000 (02:17 +0700)
committerAlexei Zavjalov <alexei.zavjalov@intel.com>
Thu, 24 Jul 2014 08:27:12 +0000 (15:27 +0700)
The Quick backend's runtime model includes a gap between a method's
argument ("in") vregs and the rest of its vregs.  Handling a range instruction
which spans the gap is somewhat complicated, and should not happen
in normal usage of dx. Punt to the interpreter if it happened.

This issue relates to https://code.google.com/p/android/issues/detail?id=66371
Which was fixed, but the problem returned after some changes in the verify
flags set for the range bytecodes.

Change-Id: I214f32e7b4227a450257f30607135930d0adff53
Signed-off-by: Katkov, Serguei I <serguei.i.katkov@intel.com>
Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
compiler/dex/mir_graph.cc

index 331af21..8d0a5a3 100644 (file)
@@ -795,7 +795,8 @@ void MIRGraph::InlineMethod(const DexFile::CodeItem* code_item, uint32_t access_
     } else if (flags & Instruction::kSwitch) {
       cur_block = ProcessCanSwitch(cur_block, insn, current_offset_, width, flags);
     }
-    if (verify_flags & Instruction::kVerifyVarArgRange) {
+    if (verify_flags & Instruction::kVerifyVarArgRange ||
+        verify_flags & Instruction::kVerifyVarArgRangeNonZero) {
       /*
        * The Quick backend's runtime model includes a gap between a method's
        * argument ("in") vregs and the rest of its vregs.  Handling a range instruction