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

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

Issue 10825236: Replace deopt stubs location/register shuffling with using deopt-info. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/stub_code_ia32.cc ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/assembler_macros.h" 9 #include "vm/assembler_macros.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 __ pushq(static_cast<Register>(i)); 587 __ pushq(static_cast<Register>(i));
588 } 588 }
589 __ movq(RCX, RSP); // Saved saved registers block. 589 __ movq(RCX, RSP); // Saved saved registers block.
590 __ ReserveAlignedFrameSpace(0); 590 __ ReserveAlignedFrameSpace(0);
591 __ SmiUntag(RAX); 591 __ SmiUntag(RAX);
592 __ movq(RDI, RCX); // Set up argument 1 saved_registers_address. 592 __ movq(RDI, RCX); // Set up argument 1 saved_registers_address.
593 593
594 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry); 594 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry);
595 // Result (RAX) is stack-size (FP - SP) in bytes, incl. the return address. 595 // Result (RAX) is stack-size (FP - SP) in bytes, incl. the return address.
596 __ LeaveFrame(); 596 __ LeaveFrame();
597 __ popq(RCX); // Discard return address. 597 __ popq(RCX); // Preserve return address.
598 __ movq(RSP, RBP); 598 __ movq(RSP, RBP);
599 __ subq(RSP, RAX); 599 __ subq(RSP, RAX);
600 __ movq(Address(RSP, 0), RCX);
600 601
601 __ EnterFrame(0); 602 __ EnterFrame(0);
602 __ movq(RCX, RSP); // Get last FP address. 603 __ movq(RCX, RSP); // Get last FP address.
603 __ ReserveAlignedFrameSpace(0); 604 __ ReserveAlignedFrameSpace(0);
604 __ movq(RDI, RCX); // Set up argument 1 last_fp. 605 __ movq(RDI, RCX); // Set up argument 1 last_fp.
605 __ CallRuntime(kDeoptimizeFillFrameRuntimeEntry); 606 __ CallRuntime(kDeoptimizeFillFrameRuntimeEntry);
606 __ LeaveFrame(); 607 __ LeaveFrame();
607 __ ret(); 608 __ ret();
608 } 609 }
609 610
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { 1933 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) {
1933 __ movq(RAX, RCX); // error object. 1934 __ movq(RAX, RCX); // error object.
1934 __ movq(RBP, RDX); // target frame_pointer. 1935 __ movq(RBP, RDX); // target frame_pointer.
1935 __ movq(RSP, RSI); // target stack_pointer. 1936 __ movq(RSP, RSI); // target stack_pointer.
1936 __ jmp(RDI); // Jump to the exception handler code. 1937 __ jmp(RDI); // Jump to the exception handler code.
1937 } 1938 }
1938 1939
1939 } // namespace dart 1940 } // namespace dart
1940 1941
1941 #endif // defined TARGET_ARCH_X64 1942 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698