Home | History | Annotate | Download | only in runtime

Lines Matching refs:Instruction

35 // Dex instruction memory access types correspond to the ordering of GET/PUT instructions;
54 constexpr bool IsInstructionDirectConst(Instruction::Code opcode) {
55 return Instruction::CONST_4 <= opcode && opcode <= Instruction::CONST_WIDE_HIGH16;
58 constexpr bool IsInstructionConstWide(Instruction::Code opcode) {
59 return Instruction::CONST_WIDE_16 <= opcode && opcode <= Instruction::CONST_WIDE_HIGH16;
62 constexpr bool IsInstructionReturn(Instruction::Code opcode) {
63 return Instruction::RETURN_VOID <= opcode && opcode <= Instruction::RETURN_OBJECT;
66 constexpr bool IsInstructionInvoke(Instruction::Code opcode) {
67 return Instruction::INVOKE_VIRTUAL <= opcode && opcode <= Instruction::INVOKE_INTERFACE_RANGE &&
68 opcode != Instruction::RETURN_VOID_NO_BARRIER;
71 constexpr bool IsInstructionQuickInvoke(Instruction::Code opcode) {
72 return opcode == Instruction::INVOKE_VIRTUAL_QUICK ||
73 opcode == Instruction::INVOKE_VIRTUAL_RANGE_QUICK;
76 constexpr bool IsInstructionInvokeStatic(Instruction::Code opcode) {
77 return opcode == Instruction::INVOKE_STATIC || opcode == Instruction::INVOKE_STATIC_RANGE;
80 constexpr bool IsInstructionGoto(Instruction::Code opcode) {
81 return Instruction::GOTO <= opcode && opcode <= Instruction::GOTO_32;
84 constexpr bool IsInstructionIfCc(Instruction::Code opcode) {
85 return Instruction::IF_EQ <= opcode && opcode <= Instruction::IF_LE;
88 constexpr bool IsInstructionIfCcZ(Instruction::Code opcode) {
89 return Instruction::IF_EQZ <= opcode && opcode <= Instruction::IF_LEZ;
92 constexpr bool IsInstructionIGet(Instruction::Code code) {
93 return Instruction::IGET <= code && code <= Instruction::IGET_SHORT;
96 constexpr bool IsInstructionIPut(Instruction::Code code) {
97 return Instruction::IPUT <= code && code <= Instruction::IPUT_SHORT;
100 constexpr bool IsInstructionSGet(Instruction::Code code) {
101 return Instruction::SGET <= code && code <= Instruction::SGET_SHORT;
104 constexpr bool IsInstructionSPut(Instruction::Code code) {
105 return Instruction::SPUT <= code && code <= Instruction::SPUT_SHORT;
108 constexpr bool IsInstructionAGet(Instruction::Code code) {
109 return Instruction::AGET <= code && code <= Instruction::AGET_SHORT;
112 constexpr bool IsInstructionAPut(Instruction::Code code) {
113 return Instruction::APUT <= code && code <= Instruction::APUT_SHORT;
116 constexpr bool IsInstructionIGetOrIPut(Instruction::Code code) {
117 return Instruction::IGET <= code && code <= Instruction::IPUT_SHORT;
120 constexpr bool IsInstructionIGetQuickOrIPutQuick(Instruction::Code code) {
121 return (code >= Instruction::IGET_QUICK && code <= Instruction::IPUT_OBJECT_QUICK) ||
122 (code >= Instruction::IPUT_BOOLEAN_QUICK && code <= Instruction::IGET_SHORT_QUICK);
125 constexpr bool IsInstructionSGetOrSPut(Instruction::Code code) {
126 return Instruction::SGET <= code && code <= Instruction::SPUT_SHORT;
129 constexpr bool IsInstructionAGetOrAPut(Instruction::Code code) {
130 return Instruction::AGET <= code && code <= Instruction::APUT_SHORT;
133 constexpr bool IsInstructionBinOp2Addr(Instruction::Code code) {
134 return Instruction::ADD_INT_2ADDR <= code && code <= Instruction::REM_DOUBLE_2ADDR;
137 constexpr bool IsInvokeInstructionRange(Instruction::Code opcode) {
139 return opcode >= Instruction::INVOKE_VIRTUAL_RANGE;
142 constexpr DexInvokeType InvokeInstructionType(Instruction::Code opcode) {
145 ? (opcode - Instruction::INVOKE_VIRTUAL_RANGE)
146 : (opcode - Instruction::INVOKE_VIRTUAL));
149 constexpr DexMemAccessType IGetMemAccessType(Instruction::Code code) {
151 return static_cast<DexMemAccessType>(code - Instruction::IGET);
154 constexpr DexMemAccessType IPutMemAccessType(Instruction::Code code) {
156 return static_cast<DexMemAccessType>(code - Instruction::IPUT);
159 constexpr DexMemAccessType SGetMemAccessType(Instruction::Code code) {
161 return static_cast<DexMemAccessType>(code - Instruction::SGET);
164 constexpr DexMemAccessType SPutMemAccessType(Instruction::Code code) {
166 return static_cast<DexMemAccessType>(code - Instruction::SPUT);
169 constexpr DexMemAccessType AGetMemAccessType(Instruction::Code code) {
171 return static_cast<DexMemAccessType>(code - Instruction::AGET);
174 constexpr DexMemAccessType APutMemAccessType(Instruction::Code code) {
176 return static_cast<DexMemAccessType>(code - Instruction::APUT);
179 constexpr DexMemAccessType IGetOrIPutMemAccessType(Instruction::Code code) {
181 return (code >= Instruction::IPUT) ? IPutMemAccessType(code) : IGetMemAccessType(code);
184 inline DexMemAccessType IGetQuickOrIPutQuickMemAccessType(Instruction::Code code) {
187 case Instruction::IGET_QUICK: case Instruction::IPUT_QUICK:
189 case Instruction::IGET_WIDE_QUICK: case Instruction::IPUT_WIDE_QUICK:
191 case Instruction::IGET_OBJECT_QUICK: case Instruction::IPUT_OBJECT_QUICK:
193 case Instruction::IGET_BOOLEAN_QUICK: case Instruction::IPUT_BOOLEAN_QUICK:
195 case Instruction::IGET_BYTE_QUICK: case Instruction::IPUT_BYTE_QUICK:
197 case Instruction::IGET_CHAR_QUICK: case Instruction::IPUT_CHAR_QUICK:
199 case Instruction::IGET_SHORT_QUICK: case Instruction::IPUT_SHORT_QUICK:
207 constexpr DexMemAccessType SGetOrSPutMemAccessType(Instruction::Code code) {
209 return (code >= Instruction::SPUT) ? SPutMemAccessType(code) : SGetMemAccessType(code);
212 constexpr DexMemAccessType AGetOrAPutMemAccessType(Instruction::Code code) {
214 return (code >= Instruction::APUT) ? APutMemAccessType(code) : AGetMemAccessType(code);