Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: runtime/vm/instructions_arm64.cc

Issue 928833003: Add Function based profile tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/instructions_arm64.h ('k') | runtime/vm/instructions_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_arm64.cc
diff --git a/runtime/vm/instructions_arm64.cc b/runtime/vm/instructions_arm64.cc
index de513c7b6534e3bfd7aabb83d418317efd7eae9d..aea111fdc4d1e78a07a5d48ed21466b6c1d2139c 100644
--- a/runtime/vm/instructions_arm64.cc
+++ b/runtime/vm/instructions_arm64.cc
@@ -365,6 +365,19 @@ void JumpPattern::SetTargetAddress(uword target_address) const {
CPU::FlushICache(pc_, 4 * Instr::kInstrSize);
}
+
+ReturnPattern::ReturnPattern(uword pc)
+ : pc_(pc) {
+}
+
+
+bool ReturnPattern::IsValid() const {
+ Instr* bx_lr = Instr::At(pc_);
+ const Register crn = ConcreteRegister(LR);
+ const int32_t instruction = RET | (static_cast<int32_t>(crn) << kRnShift);
+ return bx_lr->InstructionBits() == instruction;
+}
+
} // namespace dart
#endif // defined TARGET_ARCH_ARM64
« no previous file with comments | « runtime/vm/instructions_arm64.h ('k') | runtime/vm/instructions_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698