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_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 __ ret(); | 472 __ ret(); |
473 } | 473 } |
474 | 474 |
475 | 475 |
476 // TOS: return address + call-instruction-size (5 bytes). | 476 // TOS: return address + call-instruction-size (5 bytes). |
477 // RAX: result, must be preserved | 477 // RAX: result, must be preserved |
478 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) { | 478 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) { |
479 // Correct return address to point just after the call that is being | 479 // Correct return address to point just after the call that is being |
480 // deoptimized. | 480 // deoptimized. |
481 __ popq(RBX); | 481 __ popq(RBX); |
482 __ subq(RBX, Immediate(ShortCallPattern::InstructionLength())); | 482 __ subq(RBX, Immediate(ShortCallPattern::pattern_length_in_bytes())); |
483 __ pushq(RBX); | 483 __ pushq(RBX); |
484 GenerateDeoptimizationSequence(assembler, true); // Preserve RAX. | 484 GenerateDeoptimizationSequence(assembler, true); // Preserve RAX. |
485 } | 485 } |
486 | 486 |
487 | 487 |
488 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { | 488 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { |
489 GenerateDeoptimizationSequence(assembler, false); // Don't preserve RAX. | 489 GenerateDeoptimizationSequence(assembler, false); // Don't preserve RAX. |
490 } | 490 } |
491 | 491 |
492 | 492 |
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2125 // Result: | 2125 // Result: |
2126 // RCX: entry point. | 2126 // RCX: entry point. |
2127 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { | 2127 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { |
2128 EmitMegamorphicLookup(assembler, RDI, RBX, RCX); | 2128 EmitMegamorphicLookup(assembler, RDI, RBX, RCX); |
2129 __ ret(); | 2129 __ ret(); |
2130 } | 2130 } |
2131 | 2131 |
2132 } // namespace dart | 2132 } // namespace dart |
2133 | 2133 |
2134 #endif // defined TARGET_ARCH_X64 | 2134 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |