diff options
Diffstat (limited to 'libdexfile/dex/dex_instruction.h')
-rw-r--r-- | libdexfile/dex/dex_instruction.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libdexfile/dex/dex_instruction.h b/libdexfile/dex/dex_instruction.h index 3e263abe7e..0f12f45acd 100644 --- a/libdexfile/dex/dex_instruction.h +++ b/libdexfile/dex/dex_instruction.h @@ -459,6 +459,7 @@ class Instruction { // VRegH bool HasVRegH() const; int32_t VRegH() const; + ALWAYS_INLINE int32_t VRegH(Format format) const; uint16_t VRegH_45cc() const; uint16_t VRegH_4rcc() const; @@ -570,8 +571,11 @@ class Instruction { } // Determine if the instruction is any of 'return' instructions. + static constexpr bool IsReturn(Code opcode) { + return (InstructionDescriptorOf(opcode).flags & kReturn) != 0; + } bool IsReturn() const { - return (InstructionDescriptorOf(Opcode()).flags & kReturn) != 0; + return IsReturn(Opcode()); } // Determine if this instruction ends execution of its basic block. @@ -670,13 +674,13 @@ class Instruction { return insns[offset]; } + size_t SizeInCodeUnitsComplexOpcode() const; + private: static constexpr const InstructionDescriptor& InstructionDescriptorOf(Code opcode) { return kInstructionDescriptors[opcode]; } - size_t SizeInCodeUnitsComplexOpcode() const; - // Return how many code unit words are required to compute the size of the opcode. size_t CodeUnitsRequiredForSizeOfComplexOpcode() const; |