Lines Matching refs:dex_instr
423 Operand* CodeIr::GetRegA(const dex::Instruction& dex_instr) { in GetRegA() argument
424 auto verify_flags = dex::GetVerifyFlagsFromOpcode(dex_instr.opcode); in GetRegA()
426 return Alloc<VRegPair>(dex_instr.vA); in GetRegA()
428 return Alloc<VReg>(dex_instr.vA); in GetRegA()
432 Operand* CodeIr::GetRegB(const dex::Instruction& dex_instr) { in GetRegB() argument
433 auto verify_flags = dex::GetVerifyFlagsFromOpcode(dex_instr.opcode); in GetRegB()
435 return Alloc<VRegPair>(dex_instr.vB); in GetRegB()
437 return Alloc<VReg>(dex_instr.vB); in GetRegB()
441 Operand* CodeIr::GetRegC(const dex::Instruction& dex_instr) { in GetRegC() argument
442 auto verify_flags = dex::GetVerifyFlagsFromOpcode(dex_instr.opcode); in GetRegC()
444 return Alloc<VRegPair>(dex_instr.vC); in GetRegC()
446 return Alloc<VReg>(dex_instr.vC); in GetRegC()
451 auto dex_instr = dex::DecodeInstruction(ptr); in DecodeBytecode() local
454 instr->opcode = dex_instr.opcode; in DecodeBytecode()
456 auto index_type = dex::GetIndexTypeFromOpcode(dex_instr.opcode); in DecodeBytecode()
457 auto format = dex::GetFormatFromOpcode(dex_instr.opcode); in DecodeBytecode()
465 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
466 instr->operands.push_back(GetRegB(dex_instr)); in DecodeBytecode()
472 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
473 instr->operands.push_back(Alloc<Const32>(dex_instr.vB)); in DecodeBytecode()
477 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
484 auto label = GetLabel(offset + dex::s4(dex_instr.vA)); in DecodeBytecode()
491 dex::u4 targetOffset = offset + dex::s4(dex_instr.vB); in DecodeBytecode()
492 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
496 if (dex_instr.opcode == dex::OP_PACKED_SWITCH) { in DecodeBytecode()
501 } else if (dex_instr.opcode == dex::OP_SPARSE_SWITCH) { in DecodeBytecode()
506 } else if (dex_instr.opcode == dex::OP_FILL_ARRAY_DATA) { in DecodeBytecode()
512 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
513 instr->operands.push_back(GetRegB(dex_instr)); in DecodeBytecode()
514 instr->operands.push_back(GetRegC(dex_instr)); in DecodeBytecode()
519 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
520 instr->operands.push_back(GetRegB(dex_instr)); in DecodeBytecode()
521 auto label = GetLabel(offset + dex::s4(dex_instr.vC)); in DecodeBytecode()
527 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
528 instr->operands.push_back(GetRegB(dex_instr)); in DecodeBytecode()
529 instr->operands.push_back(Alloc<Const32>(dex_instr.vC)); in DecodeBytecode()
533 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
534 instr->operands.push_back(GetRegB(dex_instr)); in DecodeBytecode()
535 instr->operands.push_back(GetIndexedOperand(index_type, dex_instr.vC)); in DecodeBytecode()
540 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
541 instr->operands.push_back(GetIndexedOperand(index_type, dex_instr.vB)); in DecodeBytecode()
546 SLICER_CHECK_LE(dex_instr.vA, 5); in DecodeBytecode()
548 for (dex::u4 i = 0; i < dex_instr.vA; ++i) { in DecodeBytecode()
549 vreg_list->registers.push_back(dex_instr.arg[i]); in DecodeBytecode()
552 instr->operands.push_back(GetIndexedOperand(index_type, dex_instr.vB)); in DecodeBytecode()
557 auto vreg_range = Alloc<VRegRange>(dex_instr.vC, dex_instr.vA); in DecodeBytecode()
559 instr->operands.push_back(GetIndexedOperand(index_type, dex_instr.vB)); in DecodeBytecode()
565 SLICER_CHECK_LE(dex_instr.vA, 5); in DecodeBytecode()
567 if (dex_instr.vA > 1) { in DecodeBytecode()
568 vreg_list->registers.push_back(dex_instr.vC); in DecodeBytecode()
571 for (dex::u4 i = 1; i < dex_instr.vA; ++i) { in DecodeBytecode()
572 vreg_list->registers.push_back(dex_instr.arg[i - 1]); in DecodeBytecode()
575 instr->operands.push_back(GetIndexedOperand(index_type, dex_instr.vB)); in DecodeBytecode()
576 dex::u4 vH = dex_instr.arg[4]; in DecodeBytecode()
583 auto vreg_range = Alloc<VRegRange>(dex_instr.vC, dex_instr.vA); in DecodeBytecode()
585 instr->operands.push_back(GetIndexedOperand(index_type, dex_instr.vB)); in DecodeBytecode()
586 dex::u4 vH = dex_instr.arg[4]; in DecodeBytecode()
592 switch (dex_instr.opcode) { in DecodeBytecode()
594 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
595 instr->operands.push_back(Alloc<Const32>(dex_instr.vB << 16)); in DecodeBytecode()
599 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
600 instr->operands.push_back(Alloc<Const64>(dex::u8(dex_instr.vB) << 48)); in DecodeBytecode()
605 ss << "Unexpected opcode: " << dex_instr.opcode; in DecodeBytecode()
612 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
613 instr->operands.push_back(Alloc<Const64>(dex_instr.vB_wide)); in DecodeBytecode()
618 ss << "Unexpected bytecode format " << format << " for opcode " << dex_instr.opcode; in DecodeBytecode()