Lines Matching refs:insn

158   MIR* insn = orig_block->first_mir_insn;  in SplitBlock()  local
160 while (insn) { in SplitBlock()
161 if (insn->offset == code_offset) break; in SplitBlock()
162 prev = insn; in SplitBlock()
163 insn = insn->next; in SplitBlock()
165 if (insn == NULL) { in SplitBlock()
172 bottom_block->first_mir_insn = insn; in SplitBlock()
229 DCHECK(insn != nullptr); in SplitBlock()
230 DCHECK(insn != orig_block->first_mir_insn); in SplitBlock()
231 DCHECK(insn == bottom_block->first_mir_insn); in SplitBlock()
232 DCHECK_EQ(insn->offset, bottom_block->start_offset); in SplitBlock()
233 DCHECK(static_cast<int>(insn->dalvikInsn.opcode) == kMirOpCheck || in SplitBlock()
234 !MIR::DecodedInstruction::IsPseudoMirOp(insn->dalvikInsn.opcode)); in SplitBlock()
235 DCHECK_EQ(dex_pc_to_block_map_.Get(insn->offset), orig_block->id); in SplitBlock()
236 MIR* p = insn; in SplitBlock()
399 BasicBlock* MIRGraph::ProcessCanBranch(BasicBlock* cur_block, MIR* insn, DexOffset cur_offset, in ProcessCanBranch() argument
403 switch (insn->dalvikInsn.opcode) { in ProcessCanBranch()
407 target += insn->dalvikInsn.vA; in ProcessCanBranch()
416 target += insn->dalvikInsn.vC; in ProcessCanBranch()
425 target += insn->dalvikInsn.vB; in ProcessCanBranch()
428 LOG(FATAL) << "Unexpected opcode(" << insn->dalvikInsn.opcode << ") with kBranch set"; in ProcessCanBranch()
466 BasicBlock* MIRGraph::ProcessCanSwitch(BasicBlock* cur_block, MIR* insn, DexOffset cur_offset, in ProcessCanSwitch() argument
469 reinterpret_cast<const uint16_t*>(GetCurrentInsns() + cur_offset + insn->dalvikInsn.vB); in ProcessCanSwitch()
485 if (insn->dalvikInsn.opcode == Instruction::PACKED_SWITCH) { in ProcessCanSwitch()
515 (insn->dalvikInsn.opcode == Instruction::PACKED_SWITCH) ? kPackedSwitch : kSparseSwitch; in ProcessCanSwitch()
527 (insn->dalvikInsn.opcode == Instruction::PACKED_SWITCH) ? in ProcessCanSwitch()
542 BasicBlock* MIRGraph::ProcessCanThrow(BasicBlock* cur_block, MIR* insn, DexOffset cur_offset, in ProcessCanThrow() argument
546 bool is_throw = (insn->dalvikInsn.opcode == Instruction::THROW); in ProcessCanThrow()
563 if (insn->dalvikInsn.opcode == Instruction::MONITOR_EXIT && in ProcessCanThrow()
564 IsBadMonitorExitCatch(insn->offset, catch_block->start_offset)) { in ProcessCanThrow()
636 new_block->start_offset = insn->offset; in ProcessCanThrow()
640 *new_insn = *insn; in ProcessCanThrow()
641 insn->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpCheck); in ProcessCanThrow()
643 insn->meta.throw_insn = new_insn; in ProcessCanThrow()
724 MIR *insn = NewMIR(); in InlineMethod() local
725 insn->offset = current_offset_; in InlineMethod()
726 insn->m_unit_index = current_method_; in InlineMethod()
727 int width = ParseInsn(code_ptr, &insn->dalvikInsn); in InlineMethod()
728 Instruction::Code opcode = insn->dalvikInsn.opcode; in InlineMethod()
733 int flags = Instruction::FlagsOf(insn->dalvikInsn.opcode); in InlineMethod()
734 int verify_flags = Instruction::VerifyFlagsOf(insn->dalvikInsn.opcode); in InlineMethod()
736 uint64_t df_flags = GetDataFlowAttributes(insn); in InlineMethod()
761 cur_block->AppendMIR(insn); in InlineMethod()
771 cur_block->AppendMIR(insn); in InlineMethod()
775 dex_pc_to_block_map_.Put(insn->offset, cur_block->id); in InlineMethod()
780 cur_block = ProcessCanBranch(cur_block, insn, current_offset_, in InlineMethod()
799 cur_block = ProcessCanThrow(cur_block, insn, current_offset_, width, flags, try_block_addr_, in InlineMethod()
802 cur_block = ProcessCanSwitch(cur_block, insn, current_offset_, width, flags); in InlineMethod()
812 int first_reg_in_range = insn->dalvikInsn.vC; in InlineMethod()
813 int last_reg_in_range = first_reg_in_range + insn->dalvikInsn.vA - 1; in InlineMethod()
1216 MIR::DecodedInstruction insn = mir->dalvikInsn; in GetDalvikDisassembly() local
1219 int opcode = insn.opcode; in GetDalvikDisassembly()
1232 insn = mir->meta.throw_insn->dalvikInsn; in GetDalvikDisassembly()
1236 opcode = insn.opcode; in GetDalvikDisassembly()
1240 insn.opcode = Instruction::At(current_code_item_->insns_ + mir->offset)->Opcode(); in GetDalvikDisassembly()
1241 opcode = insn.opcode; in GetDalvikDisassembly()
1248 dalvik_format = Instruction::FormatOf(insn.opcode); in GetDalvikDisassembly()
1249 flags = Instruction::FlagsOf(insn.opcode); in GetDalvikDisassembly()
1250 str.append(Instruction::Name(insn.opcode)); in GetDalvikDisassembly()
1272 offset = insn.vB; in GetDalvikDisassembly()
1277 offset = insn.vC; in GetDalvikDisassembly()
1282 offset = insn.vA; in GetDalvikDisassembly()
1285 LOG(FATAL) << "Unexpected branch format " << dalvik_format << " from " << insn.opcode; in GetDalvikDisassembly()
1315 str.append(StringPrintf(", #%d", insn.vB)); in GetDalvikDisassembly()
1318 str.append(StringPrintf(", #%" PRId64, insn.vB_wide)); in GetDalvikDisassembly()
1322 str.append(StringPrintf(", index #%d", insn.vB)); in GetDalvikDisassembly()
1325 str.append(StringPrintf(", index #%d", insn.vC)); in GetDalvikDisassembly()
1329 str.append(StringPrintf(", #%d", insn.vC)); in GetDalvikDisassembly()