summaryrefslogtreecommitdiff
path: root/compiler/utils/dex_instruction_utils.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2014-11-24 16:33:51 +0000
committer Vladimir Marko <vmarko@google.com> 2014-11-24 17:27:42 +0000
commit321b987ef037c44c0ed4e0e82661c88959a6239f (patch)
treeb333364689dbd22753d9fb543bd0a53541aa632f /compiler/utils/dex_instruction_utils.h
parent8173e4776afac6e8da01c42ddab09b635769415f (diff)
Further cleanup using dex_instruction_utils.h.
Change-Id: I85aa9e7d744b37ee3d2531c50470cd3fa87dc864
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;