Lines Matching full:code
54 constexpr bool IsInstructionDirectConst(Instruction::Code opcode) {
58 constexpr bool IsInstructionConstWide(Instruction::Code opcode) {
62 constexpr bool IsInstructionReturn(Instruction::Code opcode) {
66 constexpr bool IsInstructionInvoke(Instruction::Code opcode) {
71 constexpr bool IsInstructionQuickInvoke(Instruction::Code opcode) {
76 constexpr bool IsInstructionInvokeStatic(Instruction::Code opcode) {
80 constexpr bool IsInstructionGoto(Instruction::Code opcode) {
84 constexpr bool IsInstructionIfCc(Instruction::Code opcode) {
88 constexpr bool IsInstructionIfCcZ(Instruction::Code opcode) {
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;
139 constexpr bool IsInvokeInstructionRange(Instruction::Code opcode) {
146 constexpr DexInvokeType InvokeInstructionType(Instruction::Code opcode) {
155 constexpr DexMemAccessType IGetMemAccessType(Instruction::Code code) {
157 DCHECK(IsInstructionIGet(code));
159 return static_cast<DexMemAccessType>(code - Instruction::IGET);
162 constexpr DexMemAccessType IPutMemAccessType(Instruction::Code code) {
164 DCHECK(IsInstructionIPut(code));
166 return static_cast<DexMemAccessType>(code - Instruction::IPUT);
169 constexpr DexMemAccessType SGetMemAccessType(Instruction::Code code) {
171 DCHECK(IsInstructionSGet(code));
173 return static_cast<DexMemAccessType>(code - Instruction::SGET);
176 constexpr DexMemAccessType SPutMemAccessType(Instruction::Code code) {
178 DCHECK(IsInstructionSPut(code));
180 return static_cast<DexMemAccessType>(code - Instruction::SPUT);
183 constexpr DexMemAccessType AGetMemAccessType(Instruction::Code code) {
185 DCHECK(IsInstructionAGet(code));
187 return static_cast<DexMemAccessType>(code - Instruction::AGET);
190 constexpr DexMemAccessType APutMemAccessType(Instruction::Code code) {
192 DCHECK(IsInstructionAPut(code));
194 return static_cast<DexMemAccessType>(code - Instruction::APUT);
197 constexpr DexMemAccessType IGetOrIPutMemAccessType(Instruction::Code code) {
199 DCHECK(IsInstructionIGetOrIPut(code));
201 return (code >= Instruction::IPUT) ? IPutMemAccessType(code) : IGetMemAccessType(code);
204 static inline DexMemAccessType IGetQuickOrIPutQuickMemAccessType(Instruction::Code code) {
205 DCHECK(IsInstructionIGetQuickOrIPutQuick(code));
206 switch (code) {
222 LOG(FATAL) << code;
227 constexpr DexMemAccessType SGetOrSPutMemAccessType(Instruction::Code code) {
229 DCHECK(IsInstructionSGetOrSPut(code));
231 return (code >= Instruction::SPUT) ? SPutMemAccessType(code) : SGetMemAccessType(code);
234 constexpr DexMemAccessType AGetOrAPutMemAccessType(Instruction::Code code) {
236 DCHECK(IsInstructionAGetOrAPut(code));
238 return (code >= Instruction::APUT) ? APutMemAccessType(code) : AGetMemAccessType(code);