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

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

Issue 1301963003: VM: Clean up and fix bugs in instructions patterns (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: s/Pattern::InstructionLength/Pattern::pattern_length_in_bytes/g Created 5 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
« runtime/vm/instructions_arm.cc ('K') | « 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) 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
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
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
OLDNEW
« runtime/vm/instructions_arm.cc ('K') | « runtime/vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698