Lines Matching refs:dex_instr
424 Operand* CodeIr::GetRegA(const dex::Instruction& dex_instr) { in GetRegA() argument
425 auto verify_flags = dex::GetVerifyFlagsFromOpcode(dex_instr.opcode); in GetRegA()
427 return Alloc<VRegPair>(dex_instr.vA); in GetRegA()
429 return Alloc<VReg>(dex_instr.vA); in GetRegA()
433 Operand* CodeIr::GetRegB(const dex::Instruction& dex_instr) { in GetRegB() argument
434 auto verify_flags = dex::GetVerifyFlagsFromOpcode(dex_instr.opcode); in GetRegB()
436 return Alloc<VRegPair>(dex_instr.vB); in GetRegB()
438 return Alloc<VReg>(dex_instr.vB); in GetRegB()
442 Operand* CodeIr::GetRegC(const dex::Instruction& dex_instr) { in GetRegC() argument
443 auto verify_flags = dex::GetVerifyFlagsFromOpcode(dex_instr.opcode); in GetRegC()
445 return Alloc<VRegPair>(dex_instr.vC); in GetRegC()
447 return Alloc<VReg>(dex_instr.vC); in GetRegC()
452 auto dex_instr = dex::DecodeInstruction(ptr); in DecodeBytecode() local
455 instr->opcode = dex_instr.opcode; in DecodeBytecode()
457 auto index_type = dex::GetIndexTypeFromOpcode(dex_instr.opcode); in DecodeBytecode()
459 switch (dex::GetFormatFromOpcode(dex_instr.opcode)) { in DecodeBytecode()
466 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
467 instr->operands.push_back(GetRegB(dex_instr)); in DecodeBytecode()
473 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
474 instr->operands.push_back(Alloc<Const32>(dex_instr.vB)); in DecodeBytecode()
478 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
485 auto label = GetLabel(offset + dex::s4(dex_instr.vA)); in DecodeBytecode()
492 dex::u4 targetOffset = offset + dex::s4(dex_instr.vB); in DecodeBytecode()
493 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
497 if (dex_instr.opcode == dex::OP_PACKED_SWITCH) { in DecodeBytecode()
502 } else if (dex_instr.opcode == dex::OP_SPARSE_SWITCH) { in DecodeBytecode()
507 } else if (dex_instr.opcode == dex::OP_FILL_ARRAY_DATA) { in DecodeBytecode()
513 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
514 instr->operands.push_back(GetRegB(dex_instr)); in DecodeBytecode()
515 instr->operands.push_back(GetRegC(dex_instr)); in DecodeBytecode()
520 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
521 instr->operands.push_back(GetRegB(dex_instr)); in DecodeBytecode()
522 auto label = GetLabel(offset + dex::s4(dex_instr.vC)); in DecodeBytecode()
528 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
529 instr->operands.push_back(GetRegB(dex_instr)); in DecodeBytecode()
530 instr->operands.push_back(Alloc<Const32>(dex_instr.vC)); in DecodeBytecode()
534 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
535 instr->operands.push_back(GetRegB(dex_instr)); in DecodeBytecode()
536 instr->operands.push_back(GetIndexedOperand(index_type, dex_instr.vC)); in DecodeBytecode()
541 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
542 instr->operands.push_back(GetIndexedOperand(index_type, dex_instr.vB)); in DecodeBytecode()
547 SLICER_CHECK(dex_instr.vA <= 5); in DecodeBytecode()
549 for (dex::u4 i = 0; i < dex_instr.vA; ++i) { in DecodeBytecode()
550 vreg_list->registers.push_back(dex_instr.arg[i]); in DecodeBytecode()
553 instr->operands.push_back(GetIndexedOperand(index_type, dex_instr.vB)); in DecodeBytecode()
558 auto vreg_range = Alloc<VRegRange>(dex_instr.vC, dex_instr.vA); in DecodeBytecode()
560 instr->operands.push_back(GetIndexedOperand(index_type, dex_instr.vB)); in DecodeBytecode()
564 switch (dex_instr.opcode) { in DecodeBytecode()
566 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
567 instr->operands.push_back(Alloc<Const32>(dex_instr.vB << 16)); in DecodeBytecode()
571 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
572 instr->operands.push_back(Alloc<Const64>(dex::u8(dex_instr.vB) << 48)); in DecodeBytecode()
576 SLICER_FATAL("Unexpected opcode 0x%02x", dex_instr.opcode); in DecodeBytecode()
581 instr->operands.push_back(GetRegA(dex_instr)); in DecodeBytecode()
582 instr->operands.push_back(Alloc<Const64>(dex_instr.vB_wide)); in DecodeBytecode()
586 SLICER_FATAL("Unexpected bytecode format (opcode 0x%02x)", dex_instr.opcode); in DecodeBytecode()