Home | History | Annotate | Download | only in dex

Lines Matching defs:Opcode

84 #define INSTRUCTION_ENUM(opcode, cname, p, f, i, a, e, v) cname = (opcode),
151 kExperimental = 0x80, // is an experimental opcode
168 kStore = 0x0080000, // store opcode
169 kLoad = 0x0100000, // load opcode
221 int8_t result = kInstructionDescriptors[Opcode()].size_in_code_units;
231 const int8_t result = kInstructionDescriptors[Opcode()].size_in_code_units;
253 DCHECK(FormatOf(Opcode()) >= k10x && FormatOf(Opcode()) <= k10t);
259 DCHECK(FormatOf(Opcode()) >= k20t && FormatOf(Opcode()) <= k22c);
265 DCHECK(FormatOf(Opcode()) >= k32x && FormatOf(Opcode()) <= k3rc);
271 DCHECK(FormatOf(Opcode()) >= k45cc && FormatOf(Opcode()) <= k4rcc);
277 DCHECK(FormatOf(Opcode()) == k51l);
281 // Returns the name of this instruction's opcode.
283 return Instruction::Name(Opcode());
286 // Returns the name of the given opcode.
287 static const char* Name(Code opcode) {
288 return kInstructionNames[opcode];
470 // Returns the opcode field of the instruction. The given "inst_data" parameter must be the first
472 Code Opcode(uint16_t inst_data) const {
477 // Returns the opcode field of the instruction from the first 16 bits of instruction.
478 Code Opcode() const {
479 return Opcode(Fetch16(0));
482 void SetOpcode(Code opcode) {
483 DCHECK_LT(static_cast<uint16_t>(opcode), 256u);
485 insns[0] = (insns[0] & 0xff00) | static_cast<uint16_t>(opcode);
489 DCHECK(FormatOf(Opcode()) == k10x);
495 DCHECK(FormatOf(Opcode()) == k3rc);
501 DCHECK(FormatOf(Opcode()) == k35c);
507 DCHECK(FormatOf(Opcode()) == k22c);
513 DCHECK(FormatOf(Opcode()) == k21c);
519 DCHECK(FormatOf(Opcode()) == k21c);
524 // Returns the format of the given opcode.
525 static Format FormatOf(Code opcode) {
526 return kInstructionDescriptors[opcode].format;
529 // Returns the index type of the given opcode.
530 static IndexType IndexTypeOf(Code opcode) {
531 return kInstructionDescriptors[opcode].index_type;
534 // Returns the flags for the given opcode.
535 static uint8_t FlagsOf(Code opcode) {
536 return kInstructionDescriptors[opcode].flags;
539 // Return the verify flags for the given opcode.
540 static uint32_t VerifyFlagsOf(Code opcode) {
541 return kInstructionDescriptors[opcode].verify_flags;
546 return (kInstructionDescriptors[Opcode()].flags & kBranch) != 0;
551 return (kInstructionDescriptors[Opcode()].flags & kUnconditional) != 0;
562 return (kInstructionDescriptors[Opcode()].index_type == kIndexFieldOffset) ||
563 (kInstructionDescriptors[Opcode()].index_type == kIndexVtableOffset);
568 return (kInstructionDescriptors[Opcode()].flags & kSwitch) != 0;
573 return (kInstructionDescriptors[Opcode()].flags & kThrow) != 0;
578 return (kInstructionDescriptors[Opcode()].flags & kReturn) != 0;
583 return IsBranch() || IsReturn() || Opcode() == THROW;
588 return (kInstructionDescriptors[Opcode()].flags & kInvoke) != 0;
593 return (kInstructionDescriptors[Opcode()].flags & kExperimental) != 0;
597 return (kInstructionDescriptors[Opcode()].verify_flags & (kVerifyRegA | kVerifyRegAWide));
601 return (kInstructionDescriptors[Opcode()].verify_flags & (kVerifyRegB | kVerifyRegBField |
607 return (kInstructionDescriptors[Opcode()].verify_flags & (kVerifyRegC | kVerifyRegCField |
612 return (kInstructionDescriptors[Opcode()].verify_flags & kVerifyRegHPrototype);
616 return (kInstructionDescriptors[Opcode()].verify_flags & (kVerifyArrayData |
622 return (kInstructionDescriptors[Opcode()].verify_flags & kVerifyRuntimeOnly) != 0;
648 // Return how many code unit words are required to compute the size of the opcode.