MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / GetTargetOffset

Method GetTargetOffset

Bcore/src/main/cpp/dex/dex_instruction.cc:76–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74};
75
76int32_t Instruction::GetTargetOffset() const {
77 switch (FormatOf(Opcode())) {
78 // Cases for conditional branches follow.
79 case k22t: return VRegC_22t();
80 case k21t: return VRegB_21t();
81 // Cases for unconditional branches follow.
82 case k10t: return VRegA_10t();
83 case k20t: return VRegA_20t();
84 case k30t: return VRegA_30t();
85 default: LOG(FATAL) << "Tried to access the branch offset of an instruction " << Name() <<
86 " which does not have a target operand.";
87 }
88 return 0;
89}
90
91bool Instruction::CanFlowThrough() const {
92 const uint16_t* insns = reinterpret_cast<const uint16_t*>(this);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected