| 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
|
|
|