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

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

Issue 1383573002: VM: More compact code for pushing constant arguments on ia32/x64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
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" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 734
735 void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) { 735 void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) {
736 if (is_optimizing()) { 736 if (is_optimizing()) {
737 return; 737 return;
738 } 738 }
739 Definition* defn = instr->AsDefinition(); 739 Definition* defn = instr->AsDefinition();
740 if ((defn != NULL) && defn->HasTemp()) { 740 if ((defn != NULL) && defn->HasTemp()) {
741 Location value = defn->locs()->out(0); 741 Location value = defn->locs()->out(0);
742 if (value.IsRegister()) { 742 if (value.IsRegister()) {
743 __ pushq(value.reg()); 743 __ pushq(value.reg());
744 } else if (value.IsConstant()) {
745 __ PushObject(value.constant());
744 } else { 746 } else {
745 ASSERT(value.IsStackSlot()); 747 ASSERT(value.IsStackSlot());
746 __ pushq(value.ToStackSlotAddress()); 748 __ pushq(value.ToStackSlotAddress());
747 } 749 }
748 } 750 }
749 } 751 }
750 752
751 753
752 void FlowGraphCompiler::CopyParameters() { 754 void FlowGraphCompiler::CopyParameters() {
753 __ Comment("Copy parameters"); 755 __ Comment("Copy parameters");
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 __ movups(reg, Address(RSP, 0)); 1755 __ movups(reg, Address(RSP, 0));
1754 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); 1756 __ AddImmediate(RSP, Immediate(kFpuRegisterSize));
1755 } 1757 }
1756 1758
1757 1759
1758 #undef __ 1760 #undef __
1759 1761
1760 } // namespace dart 1762 } // namespace dart
1761 1763
1762 #endif // defined TARGET_ARCH_X64 1764 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698