| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/instructions.h" | 10 #include "vm/instructions.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 __ BranchLinkPatchable(*StubCode::InvokeDartCode_entry()); | 21 __ BranchLinkPatchable(*StubCode::InvokeDartCode_entry()); |
| 22 __ ret(); | 22 __ ret(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 | 25 |
| 26 ASSEMBLER_TEST_RUN(Call, test) { | 26 ASSEMBLER_TEST_RUN(Call, test) { |
| 27 // The return address, which must be the address of an instruction contained | 27 // The return address, which must be the address of an instruction contained |
| 28 // in the code, points to the Ret instruction above, i.e. one instruction | 28 // in the code, points to the Ret instruction above, i.e. one instruction |
| 29 // before the end of the code buffer. | 29 // before the end of the code buffer. |
| 30 uword end = test->payload_start() + test->code().Size(); | 30 uword end = test->payload_start() + test->code().Size(); |
| 31 CallPattern call(end - Instr::kInstrSize, | 31 CallPattern call(end - Instr::kInstrSize, test->code()); |
| 32 test->code()); | 32 EXPECT_EQ(StubCode::InvokeDartCode_entry()->code(), call.TargetCode()); |
| 33 EXPECT_EQ(StubCode::InvokeDartCode_entry()->code(), | |
| 34 call.TargetCode()); | |
| 35 } | 33 } |
| 36 | 34 |
| 37 | 35 |
| 38 } // namespace dart | 36 } // namespace dart |
| 39 | 37 |
| 40 #endif // defined TARGET_ARCH_ARM64 | 38 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |