summaryrefslogtreecommitdiffstats
path: root/compiler/dex/mir_graph.h
diff options
context:
space:
mode:
authorJean Christophe Beyler <jean.christophe.beyler@intel.com>2014-07-29 13:20:42 -0700
committerJean Christophe Beyler <jean.christophe.beyler@intel.com>2014-08-25 13:49:12 -0700
commitfb0ea2df9a52e5db18e1aa85da282938bbd92f2e (patch)
tree2c73e8bf5e2811a81e0ede8c007e6b896eb724a5 /compiler/dex/mir_graph.h
parent02cdc91cae56a91e7833eae154fe9a7694103ae5 (diff)
downloadart-fb0ea2df9a52e5db18e1aa85da282938bbd92f2e.tar.gz
art-fb0ea2df9a52e5db18e1aa85da282938bbd92f2e.tar.bz2
art-fb0ea2df9a52e5db18e1aa85da282938bbd92f2e.zip
ART: Extending FlagsOf
Modified FlagsOf to handle extended flags. Change-Id: I9e47e0c42816136b2b53512c914200dd9dd11376 Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
Diffstat (limited to 'compiler/dex/mir_graph.h')
-rw-r--r--compiler/dex/mir_graph.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/compiler/dex/mir_graph.h b/compiler/dex/mir_graph.h
index 491d72e9e8..08b3ca4763 100644
--- a/compiler/dex/mir_graph.h
+++ b/compiler/dex/mir_graph.h
@@ -297,37 +297,37 @@ struct MIR {
}
bool IsInvoke() const {
- return !IsPseudoMirOp(opcode) && ((Instruction::FlagsOf(opcode) & Instruction::kInvoke) == Instruction::kInvoke);
+ return ((FlagsOf() & Instruction::kInvoke) == Instruction::kInvoke);
}
bool IsStore() const {
- return !IsPseudoMirOp(opcode) && ((Instruction::FlagsOf(opcode) & Instruction::kStore) == Instruction::kStore);
+ return ((FlagsOf() & Instruction::kStore) == Instruction::kStore);
}
bool IsLoad() const {
- return !IsPseudoMirOp(opcode) && ((Instruction::FlagsOf(opcode) & Instruction::kLoad) == Instruction::kLoad);
+ return ((FlagsOf() & Instruction::kLoad) == Instruction::kLoad);
}
bool IsConditionalBranch() const {
- return !IsPseudoMirOp(opcode) && (Instruction::FlagsOf(opcode) == (Instruction::kContinue | Instruction::kBranch));
+ return (FlagsOf() == (Instruction::kContinue | Instruction::kBranch));
}
/**
* @brief Is the register C component of the decoded instruction a constant?
*/
bool IsCFieldOrConstant() const {
- return !IsPseudoMirOp(opcode) && ((Instruction::FlagsOf(opcode) & Instruction::kRegCFieldOrConstant) == Instruction::kRegCFieldOrConstant);
+ return ((FlagsOf() & Instruction::kRegCFieldOrConstant) == Instruction::kRegCFieldOrConstant);
}
/**
* @brief Is the register C component of the decoded instruction a constant?
*/
bool IsBFieldOrConstant() const {
- return !IsPseudoMirOp(opcode) && ((Instruction::FlagsOf(opcode) & Instruction::kRegBFieldOrConstant) == Instruction::kRegBFieldOrConstant);
+ return ((FlagsOf() & Instruction::kRegBFieldOrConstant) == Instruction::kRegBFieldOrConstant);
}
bool IsCast() const {
- return !IsPseudoMirOp(opcode) && ((Instruction::FlagsOf(opcode) & Instruction::kCast) == Instruction::kCast);
+ return ((FlagsOf() & Instruction::kCast) == Instruction::kCast);
}
/**
@@ -337,12 +337,14 @@ struct MIR {
* when crossing such an instruction.
*/
bool Clobbers() const {
- return !IsPseudoMirOp(opcode) && ((Instruction::FlagsOf(opcode) & Instruction::kClobber) == Instruction::kClobber);
+ return ((FlagsOf() & Instruction::kClobber) == Instruction::kClobber);
}
bool IsLinear() const {
- return !IsPseudoMirOp(opcode) && (Instruction::FlagsOf(opcode) & (Instruction::kAdd | Instruction::kSubtract)) != 0;
+ return (FlagsOf() & (Instruction::kAdd | Instruction::kSubtract)) != 0;
}
+
+ int FlagsOf() const;
} dalvikInsn;
NarrowDexOffset offset; // Offset of the instruction in code units.