summaryrefslogtreecommitdiff
path: root/compiler/utils/dex_instruction_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils/dex_instruction_utils.h')
-rw-r--r--compiler/utils/dex_instruction_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/utils/dex_instruction_utils.h b/compiler/utils/dex_instruction_utils.h
index ad7d750dea..2c6e525e1d 100644
--- a/compiler/utils/dex_instruction_utils.h
+++ b/compiler/utils/dex_instruction_utils.h
@@ -49,6 +49,10 @@ std::ostream& operator<<(std::ostream& os, const DexMemAccessType& type);
// NOTE: The following functions disregard quickened instructions.
+constexpr bool IsInstructionReturn(Instruction::Code opcode) {
+ return Instruction::RETURN_VOID <= opcode && opcode <= Instruction::RETURN_OBJECT;
+}
+
constexpr bool IsInstructionInvoke(Instruction::Code opcode) {
return Instruction::INVOKE_VIRTUAL <= opcode && opcode <= Instruction::INVOKE_INTERFACE_RANGE &&
opcode != Instruction::RETURN_VOID_BARRIER;