OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |