• Home
  • Raw
  • Download

Lines Matching refs:Instruction

31 using Op = Instruction::Op;
33 using Opcode = ::art::Instruction::Code;
48 case ::art::Instruction::INVOKE_VIRTUAL: in InvokeToInvokeRange()
49 return ::art::Instruction::INVOKE_VIRTUAL_RANGE; in InvokeToInvokeRange()
50 case ::art::Instruction::INVOKE_DIRECT: in InvokeToInvokeRange()
51 return ::art::Instruction::INVOKE_DIRECT_RANGE; in InvokeToInvokeRange()
52 case ::art::Instruction::INVOKE_STATIC: in InvokeToInvokeRange()
53 return ::art::Instruction::INVOKE_STATIC_RANGE; in InvokeToInvokeRange()
54 case ::art::Instruction::INVOKE_INTERFACE: in InvokeToInvokeRange()
55 return ::art::Instruction::INVOKE_INTERFACE_RANGE; in InvokeToInvokeRange()
64 std::ostream& operator<<(std::ostream& out, const Instruction::Op& opcode) { in operator <<()
66 case Instruction::Op::kReturn: in operator <<()
69 case Instruction::Op::kReturnObject: in operator <<()
72 case Instruction::Op::kMove: in operator <<()
75 case Instruction::Op::kMoveObject: in operator <<()
78 case Instruction::Op::kInvokeVirtual: in operator <<()
81 case Instruction::Op::kInvokeDirect: in operator <<()
84 case Instruction::Op::kInvokeStatic: in operator <<()
87 case Instruction::Op::kInvokeInterface: in operator <<()
90 case Instruction::Op::kBindLabel: in operator <<()
93 case Instruction::Op::kBranchEqz: in operator <<()
96 case Instruction::Op::kBranchNEqz: in operator <<()
99 case Instruction::Op::kNew: in operator <<()
102 case Instruction::Op::kCheckCast: in operator <<()
157 method.AddInstruction(Instruction::InvokeVirtual(string_length.id, result, Value::Parameter(0))); in WriteTestDexFile()
308 void MethodBuilder::AddInstruction(Instruction instruction) { in AddInstruction()
312 void MethodBuilder::BuildReturn() { AddInstruction(Instruction::OpNoArgs(Op::kReturn)); } in BuildReturn()
315 AddInstruction(Instruction::OpWithArgs( in BuildReturn()
321 AddInstruction(Instruction::OpWithArgs(Op::kMove, target, Value::Immediate(value))); in BuildConst4()
326 AddInstruction(Instruction::OpWithArgs(Op::kMove, target, Value::String(dex_string->orig_index))); in BuildConstString()
336 void MethodBuilder::EncodeInstruction(const Instruction& instruction) { in EncodeInstruction()
338 case Instruction::Op::kReturn: in EncodeInstruction()
339 return EncodeReturn(instruction, ::art::Instruction::RETURN); in EncodeInstruction()
340 case Instruction::Op::kReturnObject: in EncodeInstruction()
341 return EncodeReturn(instruction, ::art::Instruction::RETURN_OBJECT); in EncodeInstruction()
342 case Instruction::Op::kMove: in EncodeInstruction()
343 case Instruction::Op::kMoveObject: in EncodeInstruction()
345 case Instruction::Op::kInvokeVirtual: in EncodeInstruction()
346 return EncodeInvoke(instruction, art::Instruction::INVOKE_VIRTUAL); in EncodeInstruction()
347 case Instruction::Op::kInvokeDirect: in EncodeInstruction()
348 return EncodeInvoke(instruction, art::Instruction::INVOKE_DIRECT); in EncodeInstruction()
349 case Instruction::Op::kInvokeStatic: in EncodeInstruction()
350 return EncodeInvoke(instruction, art::Instruction::INVOKE_STATIC); in EncodeInstruction()
351 case Instruction::Op::kInvokeInterface: in EncodeInstruction()
352 return EncodeInvoke(instruction, art::Instruction::INVOKE_INTERFACE); in EncodeInstruction()
353 case Instruction::Op::kBindLabel: in EncodeInstruction()
355 case Instruction::Op::kBranchEqz: in EncodeInstruction()
356 return EncodeBranch(art::Instruction::IF_EQZ, instruction); in EncodeInstruction()
357 case Instruction::Op::kBranchNEqz: in EncodeInstruction()
358 return EncodeBranch(art::Instruction::IF_NEZ, instruction); in EncodeInstruction()
359 case Instruction::Op::kNew: in EncodeInstruction()
361 case Instruction::Op::kCheckCast: in EncodeInstruction()
366 void MethodBuilder::EncodeReturn(const Instruction& instruction, ::art::Instruction::Code opcode) { in EncodeReturn()
369 Encode10x(art::Instruction::RETURN_VOID); in EncodeReturn()
377 void MethodBuilder::EncodeMove(const Instruction& instruction) { in EncodeMove()
378 CHECK(Instruction::Op::kMove == instruction.opcode() || in EncodeMove()
379 Instruction::Op::kMoveObject == instruction.opcode()); in EncodeMove()
389 Encode11n(art::Instruction::CONST_4, RegisterValue(*instruction.dest()), source.value()); in EncodeMove()
394 Encode21c(::art::Instruction::CONST_STRING, RegisterValue(*instruction.dest()), source.value()); in EncodeMove()
400 Opcode opcode = instruction.opcode() == Instruction::Op::kMove in EncodeMove()
401 ? ::art::Instruction::MOVE_16 in EncodeMove()
402 : ::art::Instruction::MOVE_OBJECT_16; in EncodeMove()
409 void MethodBuilder::EncodeInvoke(const Instruction& instruction, ::art::Instruction::Code opcode) { in EncodeInvoke()
435 Instruction::Op move_op; in EncodeInvoke()
436 if (opcode == ::art::Instruction::INVOKE_VIRTUAL || in EncodeInvoke()
437 opcode == ::art::Instruction::INVOKE_DIRECT) { in EncodeInvoke()
440 move_op = Instruction::Op::kMoveObject; in EncodeInvoke()
442 move_op = prototype->ArgType(i - 1).is_object() ? Instruction::Op::kMoveObject in EncodeInvoke()
443 : Instruction::Op::kMove; in EncodeInvoke()
446 move_op = prototype->ArgType(i).is_object() ? Instruction::Op::kMoveObject in EncodeInvoke()
447 : Instruction::Op::kMove; in EncodeInvoke()
450 EncodeMove(Instruction::OpWithArgs(move_op, scratch[i], instruction.args()[i])); in EncodeInvoke()
470 Encode11x(instruction.result_is_object() ? art::Instruction::MOVE_RESULT_OBJECT in EncodeInvoke()
471 : art::Instruction::MOVE_RESULT, in EncodeInvoke()
479 void MethodBuilder::EncodeBranch(art::Instruction::Code op, const Instruction& instruction) { in EncodeBranch()
493 void MethodBuilder::EncodeNew(const Instruction& instruction) { in EncodeNew()
494 CHECK_EQ(Instruction::Op::kNew, instruction.opcode()); in EncodeNew()
502 Encode21c(::art::Instruction::NEW_INSTANCE, RegisterValue(*instruction.dest()), type.value()); in EncodeNew()
505 void MethodBuilder::EncodeCast(const Instruction& instruction) { in EncodeCast()
506 CHECK_EQ(Instruction::Op::kCheckCast, instruction.opcode()); in EncodeCast()
514 Encode21c(::art::Instruction::CHECK_CAST, RegisterValue(*instruction.dest()), type.value()); in EncodeCast()