| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1404 } | 1404 } |
| 1405 | 1405 |
| 1406 | 1406 |
| 1407 // LR: return address (Dart code). | 1407 // LR: return address (Dart code). |
| 1408 // R4: Arguments descriptor array. | 1408 // R4: Arguments descriptor array. |
| 1409 void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) { | 1409 void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) { |
| 1410 // Create a stub frame as we are pushing some objects on the stack before | 1410 // Create a stub frame as we are pushing some objects on the stack before |
| 1411 // calling into the runtime. | 1411 // calling into the runtime. |
| 1412 __ EnterStubFrame(); | 1412 __ EnterStubFrame(); |
| 1413 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); | 1413 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); |
| 1414 // // Preserve arguments descriptor and make room for result. | 1414 // Preserve arguments descriptor and make room for result. |
| 1415 __ PushList((1 << R0) | (1 << R4)); | 1415 __ PushList((1 << R0) | (1 << R4)); |
| 1416 __ CallRuntime(kBreakpointStaticHandlerRuntimeEntry); | 1416 __ CallRuntime(kBreakpointStaticHandlerRuntimeEntry); |
| 1417 // Pop code object result and restore arguments descriptor. | 1417 // Pop code object result and restore arguments descriptor. |
| 1418 __ PopList((1 << R0) | (1 << R4)); | 1418 __ PopList((1 << R0) | (1 << R4)); |
| 1419 __ LeaveStubFrame(); | 1419 __ LeaveStubFrame(); |
| 1420 | 1420 |
| 1421 // Now call the static function. The breakpoint handler function | 1421 // Now call the static function. The breakpoint handler function |
| 1422 // ensures that the call target is compiled. | 1422 // ensures that the call target is compiled. |
| 1423 __ ldr(R0, FieldAddress(R0, Code::instructions_offset())); | 1423 __ ldr(R0, FieldAddress(R0, Code::instructions_offset())); |
| 1424 __ AddImmediate(R0, Instructions::HeaderSize() - kHeapObjectTag); | 1424 __ AddImmediate(R0, Instructions::HeaderSize() - kHeapObjectTag); |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1788 __ Bind(&reference_compare); | 1788 __ Bind(&reference_compare); |
| 1789 __ cmp(left, ShifterOperand(right)); | 1789 __ cmp(left, ShifterOperand(right)); |
| 1790 __ Bind(&done); | 1790 __ Bind(&done); |
| 1791 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); | 1791 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); |
| 1792 __ Ret(); | 1792 __ Ret(); |
| 1793 } | 1793 } |
| 1794 | 1794 |
| 1795 } // namespace dart | 1795 } // namespace dart |
| 1796 | 1796 |
| 1797 #endif // defined TARGET_ARCH_ARM | 1797 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |