Home
last modified time | relevance | path

Searched refs:Opcode (Results 1 – 25 of 75) sorted by relevance

123

/art/tools/dexfuzz/src/dexfuzz/rawdex/
DInstruction.java298 private static Map<Opcode,OpcodeInfo> opcode_map_by_enum = new HashMap<Opcode,OpcodeInfo>();
300 public static OpcodeInfo getOpcodeInfo(Opcode opcode) { in getOpcodeInfo()
308 private static void addOpcodeInfo(Opcode opcode, String name, in addOpcodeInfo()
320 addOpcodeInfo(Opcode.NOP, "nop", 0x00, new Format10x()); in addOpcodeInfo()
321 addOpcodeInfo(Opcode.MOVE, "move", 0x01, new Format12x()); in addOpcodeInfo()
322 addOpcodeInfo(Opcode.MOVE_FROM16, "move/from16", 0x02, new Format22x()); in addOpcodeInfo()
323 addOpcodeInfo(Opcode.MOVE_16, "move/16", 0x03, new Format32x()); in addOpcodeInfo()
324 addOpcodeInfo(Opcode.MOVE_WIDE, "move-wide", 0x04, new Format12x()); in addOpcodeInfo()
325 addOpcodeInfo(Opcode.MOVE_WIDE_FROM16, "move-wide/from16", 0x05, new Format22x()); in addOpcodeInfo()
326 addOpcodeInfo(Opcode.MOVE_WIDE_16, "move-wide/16", 0x06, new Format32x()); in addOpcodeInfo()
[all …]
DCodeItem.java149 Opcode opcode = insn.info.opcode; in incrementIndex()
152 if (opcode == Opcode.CONST_STRING || opcode == Opcode.CONST_STRING_JUMBO) { in incrementIndex()
160 if (opcode == Opcode.CONST_CLASS in incrementIndex()
161 || opcode == Opcode.CHECK_CAST in incrementIndex()
162 || opcode == Opcode.NEW_INSTANCE in incrementIndex()
163 || opcode == Opcode.FILLED_NEW_ARRAY in incrementIndex()
164 || opcode == Opcode.FILLED_NEW_ARRAY_RANGE) { in incrementIndex()
169 } else if (opcode == Opcode.INSTANCE_OF || opcode == Opcode.NEW_ARRAY) { in incrementIndex()
177 if (Opcode.isBetween(opcode, Opcode.SGET, Opcode.SPUT_SHORT)) { in incrementIndex()
182 } else if (Opcode.isBetween(opcode, Opcode.IGET, Opcode.IPUT_SHORT)) { in incrementIndex()
[all …]
DOpcodeInfo.java27 public final Opcode opcode;
35 public OpcodeInfo(Opcode opcode, String name, int opcodeValue, AbstractFormat fmt) { in OpcodeInfo()
/art/tools/dexfuzz/src/dexfuzz/program/mutators/
DArithOpChanger.java25 import dexfuzz.rawdex.Opcode;
151 Opcode opcode = mInsn.insn.info.opcode; in isArithmeticOperation()
152 if (Opcode.isBetween(opcode, Opcode.ADD_INT, Opcode.USHR_INT_LIT8)) { in isArithmeticOperation()
158 private Opcode getLegalDifferentOpcode(MInsn mInsn) { in getLegalDifferentOpcode()
159 Opcode opcode = mInsn.insn.info.opcode; in getLegalDifferentOpcode()
161 for (List<Opcode> opcodeList : opcodeLists) { in getLegalDifferentOpcode()
162 Opcode first = opcodeList.get(0); in getLegalDifferentOpcode()
163 Opcode last = opcodeList.get(opcodeList.size() - 1); in getLegalDifferentOpcode()
164 if (Opcode.isBetween(opcode, first, last)) { in getLegalDifferentOpcode()
173 private static List<Opcode> intOpcodes = new ArrayList<Opcode>();
[all …]
DRandomBranchChanger.java22 import dexfuzz.rawdex.Opcode;
28 private static final Opcode[] EQUALITY_CMP_OP_LIST = {
29 Opcode.IF_EQ,
30 Opcode.IF_NE,
31 Opcode.IF_LT,
32 Opcode.IF_GE,
33 Opcode.IF_GT,
34 Opcode.IF_LE
37 private static final Opcode[] ZERO_CMP_OP_LIST = {
38 Opcode.IF_EQZ,
[all …]
DValuePrinter.java25 import dexfuzz.rawdex.Opcode;
156 valueCopyInsn.insn.info = Instruction.getOpcodeInfo(Opcode.MOVE_OBJECT_16); in applyMutation()
158 valueCopyInsn.insn.info = Instruction.getOpcodeInfo(Opcode.MOVE_WIDE_16); in applyMutation()
160 valueCopyInsn.insn.info = Instruction.getOpcodeInfo(Opcode.MOVE_16); in applyMutation()
167 streamLoadInsn.insn.info = Instruction.getOpcodeInfo(Opcode.SGET_OBJECT); in applyMutation()
173 invokeInsn.insn.info = Instruction.getOpcodeInfo(Opcode.INVOKE_VIRTUAL_RANGE); in applyMutation()
216 Opcode opcode = mInsn.insn.info.opcode; in getInstructionOutputType()
217 if (opcode == Opcode.CONST_STRING || opcode == Opcode.CONST_STRING_JUMBO) { in getInstructionOutputType()
220 if (opcode == Opcode.IGET_BOOLEAN || opcode == Opcode.SGET_BOOLEAN) { in getInstructionOutputType()
223 if (opcode == Opcode.IGET_BYTE || opcode == Opcode.SGET_BYTE in getInstructionOutputType()
[all …]
DOppositeBranchChanger.java23 import dexfuzz.rawdex.Opcode;
35 protected Opcode getModifiedOpcode(MInsn mInsn) { in getModifiedOpcode()
36 Opcode opcode = mInsn.insn.info.opcode; in getModifiedOpcode()
39 return Opcode.IF_NE; in getModifiedOpcode()
41 return Opcode.IF_EQ; in getModifiedOpcode()
43 return Opcode.IF_GE; in getModifiedOpcode()
45 return Opcode.IF_LE; in getModifiedOpcode()
47 return Opcode.IF_LT; in getModifiedOpcode()
49 return Opcode.IF_GT; in getModifiedOpcode()
51 return Opcode.IF_NEZ; in getModifiedOpcode()
[all …]
DInvokeChanger.java25 import dexfuzz.rawdex.Opcode;
33 private static final Opcode[] INVOKE_LIST = {
34 Opcode.INVOKE_VIRTUAL,
35 Opcode.INVOKE_SUPER,
36 Opcode.INVOKE_DIRECT,
37 Opcode.INVOKE_STATIC,
38 Opcode.INVOKE_INTERFACE,
41 private static final Opcode[] INVOKE_RANGE_LIST = {
42 Opcode.INVOKE_VIRTUAL_RANGE,
43 Opcode.INVOKE_SUPER_RANGE,
[all …]
DRandomInstructionGenerator.java26 import dexfuzz.rawdex.Opcode;
126 Opcode newOpcode = null; in generateMutation()
127 int opcodeCount = Opcode.values().length; in generateMutation()
131 newOpcode = Opcode.values()[rng.nextInt(opcodeCount)]; in generateMutation()
133 if (Opcode.isBetween(newOpcode, Opcode.FILLED_NEW_ARRAY, Opcode.FILL_ARRAY_DATA) in generateMutation()
134 || Opcode.isBetween(newOpcode, Opcode.PACKED_SWITCH, Opcode.SPARSE_SWITCH) in generateMutation()
135 || Opcode.isBetween(newOpcode, Opcode.INVOKE_VIRTUAL, Opcode.INVOKE_INTERFACE) in generateMutation()
136 || Opcode.isBetween(newOpcode, in generateMutation()
137 Opcode.INVOKE_VIRTUAL_RANGE, Opcode.INVOKE_INTERFACE_RANGE) in generateMutation()
139 || Opcode.isBetween(newOpcode, Opcode.IGET_QUICK, Opcode.IPUT_SHORT_QUICK) in generateMutation()
[all …]
DConversionRepeater.java25 import dexfuzz.rawdex.Opcode;
126 Opcode oppositeOpcode = null; in applyMutation()
129 oppositeOpcode = Opcode.LONG_TO_INT; in applyMutation()
132 oppositeOpcode = Opcode.FLOAT_TO_INT; in applyMutation()
135 oppositeOpcode = Opcode.DOUBLE_TO_INT; in applyMutation()
138 oppositeOpcode = Opcode.INT_TO_LONG; in applyMutation()
141 oppositeOpcode = Opcode.FLOAT_TO_LONG; in applyMutation()
144 oppositeOpcode = Opcode.DOUBLE_TO_LONG; in applyMutation()
147 oppositeOpcode = Opcode.INT_TO_FLOAT; in applyMutation()
150 oppositeOpcode = Opcode.LONG_TO_FLOAT; in applyMutation()
[all …]
DCmpBiasChanger.java25 import dexfuzz.rawdex.Opcode;
121 Opcode newOpcode = getLegalDifferentOpcode(cmpBiasInsn); in applyMutation()
133 private Opcode getLegalDifferentOpcode(MInsn mInsn) { in getLegalDifferentOpcode()
134 Opcode opcode = mInsn.insn.info.opcode; in getLegalDifferentOpcode()
135 if (opcode == Opcode.CMPG_DOUBLE) { in getLegalDifferentOpcode()
136 return Opcode.CMPL_DOUBLE; in getLegalDifferentOpcode()
138 if (opcode == Opcode.CMPL_DOUBLE) { in getLegalDifferentOpcode()
139 return Opcode.CMPG_DOUBLE; in getLegalDifferentOpcode()
141 if (opcode == Opcode.CMPG_FLOAT) { in getLegalDifferentOpcode()
142 return Opcode.CMPL_FLOAT; in getLegalDifferentOpcode()
[all …]
DIfBranchChanger.java25 import dexfuzz.rawdex.Opcode;
127 Opcode newOpcode = getModifiedOpcode(ifBranchInsn); in applyMutation()
143 protected abstract Opcode getModifiedOpcode(MInsn mInsn); in getModifiedOpcode()
152 Opcode opcode = mInsn.insn.info.opcode; in isIfBranchOperation()
153 if (Opcode.isBetween(opcode, Opcode.IF_EQ, Opcode.IF_LEZ)) { in isIfBranchOperation()
DInstructionDuplicator.java24 import dexfuzz.rawdex.Opcode;
74 Opcode opcode = oldInsn.insn.info.opcode; in generateMutation()
76 if (opcode == Opcode.SPARSE_SWITCH || opcode == Opcode.PACKED_SWITCH in generateMutation()
77 || opcode == Opcode.FILL_ARRAY_DATA || oldInsn.insn.justRaw) { in generateMutation()
DNewMethodCaller.java26 import dexfuzz.rawdex.Opcode;
148 newInsn.insn.info = Instruction.getOpcodeInfo(Opcode.INVOKE_VIRTUAL); in applyMutation()
151 newInsn.insn.info = Instruction.getOpcodeInfo(Opcode.INVOKE_DIRECT); in applyMutation()
154 newInsn.insn.info = Instruction.getOpcodeInfo(Opcode.INVOKE_SUPER); in applyMutation()
157 newInsn.insn.info = Instruction.getOpcodeInfo(Opcode.INVOKE_STATIC); in applyMutation()
160 newInsn.insn.info = Instruction.getOpcodeInfo(Opcode.INVOKE_INTERFACE); in applyMutation()
DFieldFlagChanger.java26 import dexfuzz.rawdex.Opcode;
156 Opcode opcode = mInsn.insn.info.opcode; in isFileDefinedFieldInstruction()
157 if (Opcode.isBetween(opcode, Opcode.IGET, Opcode.SPUT_SHORT)) { in isFileDefinedFieldInstruction()
DNewArrayLengthChanger.java25 import dexfuzz.rawdex.Opcode;
131 newInsn.insn.info = Instruction.getOpcodeInfo(Opcode.CONST_16); in applyMutation()
144 Opcode opcode = mInsn.insn.info.opcode; in isNewArray()
145 return opcode == Opcode.NEW_ARRAY; in isNewArray()
DNewInstanceChanger.java24 import dexfuzz.rawdex.Opcode;
90 if (mInsn.insn.info.opcode == Opcode.NEW_INSTANCE) { in generateCachedNewInstanceInsns()
105 if (mInsn.insn.info.opcode == Opcode.NEW_INSTANCE) { in canMutate()
202 return (mInsn.insn.info.opcode == Opcode.INVOKE_DIRECT || in isInvokeInst()
203 mInsn.insn.info.opcode == Opcode.INVOKE_DIRECT_RANGE); in isInvokeInst()
DNonsenseStringPrinter.java25 import dexfuzz.rawdex.Opcode;
123 constStringInsn.insn.info = Instruction.getOpcodeInfo(Opcode.CONST_STRING); in applyMutation()
129 streamLoadInsn.insn.info = Instruction.getOpcodeInfo(Opcode.SGET_OBJECT); in applyMutation()
135 invokeInsn.insn.info = Instruction.getOpcodeInfo(Opcode.INVOKE_VIRTUAL_RANGE); in applyMutation()
/art/libdexfile/dex/
Ddex_instruction-inl.h60 switch (FormatOf(Opcode())) { in HasVRegA()
92 return VRegA(FormatOf(Opcode()), Fetch16(0)); in VRegA()
96 DCHECK_EQ(format, FormatOf(Opcode())); in VRegA()
131 DCHECK_EQ(FormatOf(Opcode()), k10t); in VRegA_10t()
136 DCHECK_EQ(FormatOf(Opcode()), k10x); in VRegA_10x()
141 DCHECK_EQ(FormatOf(Opcode()), k11n); in VRegA_11n()
146 DCHECK_EQ(FormatOf(Opcode()), k11x); in VRegA_11x()
151 DCHECK_EQ(FormatOf(Opcode()), k12x); in VRegA_12x()
156 DCHECK_EQ(FormatOf(Opcode()), k20t); in VRegA_20t()
161 DCHECK_EQ(FormatOf(Opcode()), k21c); in VRegA_21c()
[all …]
Ddex_instruction.h222 int8_t result = kInstructionDescriptors[Opcode()].size_in_code_units; in SizeInCodeUnits()
235 const int8_t result = kInstructionDescriptors[Opcode()].size_in_code_units; in CodeUnitsRequiredForSizeComputation()
257 DCHECK(FormatOf(Opcode()) >= k10x && FormatOf(Opcode()) <= k10t); in Next_1xx()
263 DCHECK(FormatOf(Opcode()) >= k20t && FormatOf(Opcode()) <= k22c); in Next_2xx()
269 DCHECK(FormatOf(Opcode()) >= k32x && FormatOf(Opcode()) <= k3rc); in Next_3xx()
275 DCHECK(FormatOf(Opcode()) >= k45cc && FormatOf(Opcode()) <= k4rcc); in Next_4xx()
281 DCHECK(FormatOf(Opcode()) == k51l); in Next_51l()
287 return Instruction::Name(Opcode()); in Name()
479 Code Opcode(uint16_t inst_data) const { in Opcode() function
485 Code Opcode() const { in Opcode() function
[all …]
/art/tools/dexfuzz/src/dexfuzz/rawdex/formats/
DFormat21c.java21 import dexfuzz.rawdex.Opcode;
67 if (info.opcode == Opcode.CONST_STRING) { in getPoolIndexKind()
70 if (info.opcode == Opcode.CONST_CLASS in getPoolIndexKind()
71 || info.opcode == Opcode.CHECK_CAST in getPoolIndexKind()
72 || info.opcode == Opcode.NEW_INSTANCE) { in getPoolIndexKind()
DFormat22c.java21 import dexfuzz.rawdex.Opcode;
67 if (info.opcode == Opcode.INSTANCE_OF || info.opcode == Opcode.NEW_ARRAY) { in getPoolIndexKind()
/art/compiler/dex/
Dinline_method_analyser.cc61 template <Instruction::Code opcode> bool Opcode();
112 bool Matcher::Opcode() { in Opcode() function in art::__anonab18f0a00111::Matcher
113 return instruction_->Opcode() == opcode; in Opcode()
118 return IsInstructionDirectConst(instruction_->Opcode()) && in Const0()
119 (instruction_->Opcode() == Instruction::CONST_WIDE ? instruction_->VRegB_51l() == 0 in Const0()
125 return IsInstructionIPut(instruction_->Opcode()) && in IPutOnThis()
143 DCHECK_EQ(invoke_direct->Opcode(), Instruction::INVOKE_DIRECT); in GetTargetConstructor()
166 DCHECK_EQ(invoke_direct->Opcode(), Instruction::INVOKE_DIRECT); in CountForwardedConstructorArguments()
188 DCHECK(IsInstructionDirectConst(const0->Opcode())); in GetZeroVRegMask()
189 DCHECK((const0->Opcode() == Instruction::CONST_WIDE) ? const0->VRegB_51l() == 0u in GetZeroVRegMask()
[all …]
/art/tools/jvmti-agents/titrace/
Dinstruction_decoder.cc31 Bytecode::Opcode op = static_cast<Bytecode::Opcode>(opcode); in GetName()
42 enum Opcode { enum in titrace::ClassInstructionDecoder::Bytecode
252 static const char* ToString(Bytecode::Opcode op) { in ToString()
474 Bytecode::Opcode op = static_cast<Bytecode::Opcode>(opcode); in GetName()
486 enum Opcode { enum in titrace::DexInstructionDecoder::Bytecode
493 static_assert(static_cast<uint32_t>(Bytecode::Opcode::NOP) == 0, "");
494 static_assert(static_cast<uint32_t>(Bytecode::Opcode::MOVE) == 1, "");
496 static const char* ToString(Bytecode::Opcode op) { in ToString()
/art/tools/dexfuzz/src/dexfuzz/program/
DCodeTranslator.java24 import dexfuzz.rawdex.Opcode;
562 nop.insn.info = Instruction.getOpcodeInfo(Opcode.NOP); in alignDataInstructions()
578 Opcode opcode = insn.info.opcode; in isInstructionBranch()
579 if (Opcode.isBetween(opcode, Opcode.IF_EQ, Opcode.IF_LEZ) in isInstructionBranch()
580 || Opcode.isBetween(opcode, Opcode.GOTO, Opcode.GOTO_32)) { in isInstructionBranch()
590 Opcode opcode = insn.info.opcode; in isInstructionSwitch()
591 if (Opcode.isBetween(opcode, Opcode.PACKED_SWITCH, Opcode.SPARSE_SWITCH)) { in isInstructionSwitch()
598 return (insn.info.opcode == Opcode.FILL_ARRAY_DATA); in isInstructionFillArrayData()

123