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

Side by Side Diff: runtime/vm/stub_code_arm64.cc

Issue 274043003: Adds debugger patching to arm64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/simulator_arm64.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 1634
1635 __ LoadFieldFromOffset(R2, R0, Function::code_offset(), kNoPP); 1635 __ LoadFieldFromOffset(R2, R0, Function::code_offset(), kNoPP);
1636 __ LoadFieldFromOffset(R2, R2, Code::instructions_offset(), kNoPP); 1636 __ LoadFieldFromOffset(R2, R2, Code::instructions_offset(), kNoPP);
1637 __ AddImmediate( 1637 __ AddImmediate(
1638 R2, R2, Instructions::HeaderSize() - kHeapObjectTag, kNoPP); 1638 R2, R2, Instructions::HeaderSize() - kHeapObjectTag, kNoPP);
1639 __ br(R2); 1639 __ br(R2);
1640 } 1640 }
1641 1641
1642 1642
1643 void StubCode::GenerateBreakpointRuntimeStub(Assembler* assembler) { 1643 void StubCode::GenerateBreakpointRuntimeStub(Assembler* assembler) {
1644 __ Stop("GenerateBreakpointRuntimeStub"); 1644 __ EnterStubFrame();
1645 __ Push(R5); // Save IC Data.
1646 __ Push(R4); // Save arg. desc.
1647 __ PushObject(Object::null_object(), PP); // Space for result.
1648 __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0);
1649 __ Pop(R0);
1650 __ Pop(R4);
1651 __ Pop(R5);
1652 __ LeaveStubFrame();
1653 __ br(R0);
1645 } 1654 }
1646 1655
1647 1656
1648 // Called only from unoptimized code. All relevant registers have been saved. 1657 // Called only from unoptimized code. All relevant registers have been saved.
1649 void StubCode::GenerateDebugStepCheckStub( 1658 void StubCode::GenerateDebugStepCheckStub(
1650 Assembler* assembler) { 1659 Assembler* assembler) {
1651 // Check single stepping. 1660 // Check single stepping.
1652 Label not_stepping; 1661 Label not_stepping;
1653 __ LoadFieldFromOffset(R1, CTX, Context::isolate_offset(), kNoPP); 1662 __ LoadFieldFromOffset(R1, CTX, Context::isolate_offset(), kNoPP);
1654 __ LoadFromOffset( 1663 __ LoadFromOffset(
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 const Register right = R0; 1916 const Register right = R0;
1908 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP); 1917 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP);
1909 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP); 1918 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP);
1910 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); 1919 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
1911 __ ret(); 1920 __ ret();
1912 } 1921 }
1913 1922
1914 } // namespace dart 1923 } // namespace dart
1915 1924
1916 #endif // defined TARGET_ARCH_ARM64 1925 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/simulator_arm64.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698