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/code_generator.h" | 10 #include "vm/code_generator.h" |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 __ popq(RAX); | 574 __ popq(RAX); |
575 __ popq(RAX); // Get result into RAX. | 575 __ popq(RAX); // Get result into RAX. |
576 | 576 |
577 // Remove the stub frame as we are about to return. | 577 // Remove the stub frame as we are about to return. |
578 __ LeaveFrame(); | 578 __ LeaveFrame(); |
579 __ ret(); | 579 __ ret(); |
580 } | 580 } |
581 | 581 |
582 | 582 |
583 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { | 583 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { |
584 __ Untested("Deoptimize stub"); | |
585 AssemblerMacros::EnterStubFrame(assembler); | 584 AssemblerMacros::EnterStubFrame(assembler); |
586 // RAX: deoptimization reason id. | 585 // RAX: deoptimization reason id. |
587 // Stack at this point: | 586 // Stack at this point: |
588 // TOS + 0: PC marker => RawInstruction object. | 587 // TOS + 0: PC marker => RawInstruction object. |
589 // TOS + 1: Saved EBP of function frame that will be deoptimized. <== EBP | 588 // TOS + 1: Saved EBP of function frame that will be deoptimized. <== EBP |
590 // TOS + 2: Deoptimization point (return address), will be patched. | 589 // TOS + 2: Deoptimization point (return address), will be patched. |
591 // TOS + 3: top-of-stack at deoptimization point (all arguments on stack). | 590 // TOS + 3: top-of-stack at deoptimization point (all arguments on stack). |
592 __ pushq(RAX); | 591 __ pushq(RAX); |
593 __ CallRuntime(kDeoptimizeRuntimeEntry); | 592 __ CallRuntime(kDeoptimizeRuntimeEntry); |
594 __ popq(RAX); | 593 __ popq(RAX); |
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 // TOS + 2: instance. | 1855 // TOS + 2: instance. |
1857 // TOS + 3: cache array. | 1856 // TOS + 3: cache array. |
1858 // Result in RCX: null -> not found, otherwise result (true or false). | 1857 // Result in RCX: null -> not found, otherwise result (true or false). |
1859 void StubCode::GenerateSubtype3TestCacheStub(Assembler* assembler) { | 1858 void StubCode::GenerateSubtype3TestCacheStub(Assembler* assembler) { |
1860 GenerateSubtypeNTestCacheStub(assembler, 3); | 1859 GenerateSubtypeNTestCacheStub(assembler, 3); |
1861 } | 1860 } |
1862 | 1861 |
1863 } // namespace dart | 1862 } // namespace dart |
1864 | 1863 |
1865 #endif // defined TARGET_ARCH_X64 | 1864 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |