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

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

Issue 10809052: Rename MoveMemory to MoveMemoryToMemory to fix compilation on Win32 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix flow_graph_compiler.h Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | 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) 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" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 __ movl(destination.reg(), source.reg()); 1127 __ movl(destination.reg(), source.reg());
1128 } else { 1128 } else {
1129 ASSERT(destination.IsSpillSlot()); 1129 ASSERT(destination.IsSpillSlot());
1130 __ movl(ToAddress(destination), source.reg()); 1130 __ movl(ToAddress(destination), source.reg());
1131 } 1131 }
1132 } else if (source.IsSpillSlot()) { 1132 } else if (source.IsSpillSlot()) {
1133 if (destination.IsRegister()) { 1133 if (destination.IsRegister()) {
1134 __ movl(destination.reg(), ToAddress(source)); 1134 __ movl(destination.reg(), ToAddress(source));
1135 } else { 1135 } else {
1136 ASSERT(destination.IsSpillSlot()); 1136 ASSERT(destination.IsSpillSlot());
1137 MoveMemory(ToAddress(destination), ToAddress(source)); 1137 MoveMemoryToMemory(ToAddress(destination), ToAddress(source));
1138 } 1138 }
1139 } else { 1139 } else {
1140 ASSERT(source.IsConstant()); 1140 ASSERT(source.IsConstant());
1141 if (destination.IsRegister()) { 1141 if (destination.IsRegister()) {
1142 __ LoadObject(destination.reg(), source.constant()); 1142 __ LoadObject(destination.reg(), source.constant());
1143 } else { 1143 } else {
1144 ASSERT(destination.IsSpillSlot()); 1144 ASSERT(destination.IsSpillSlot());
1145 StoreObject(ToAddress(destination), source.constant()); 1145 StoreObject(ToAddress(destination), source.constant());
1146 } 1146 }
1147 } 1147 }
(...skipping 30 matching lines...) Expand all
1178 const MoveOperands& other_move = *moves_[i]; 1178 const MoveOperands& other_move = *moves_[i];
1179 if (other_move.Blocks(source)) { 1179 if (other_move.Blocks(source)) {
1180 moves_[i]->set_src(destination); 1180 moves_[i]->set_src(destination);
1181 } else if (other_move.Blocks(destination)) { 1181 } else if (other_move.Blocks(destination)) {
1182 moves_[i]->set_src(source); 1182 moves_[i]->set_src(source);
1183 } 1183 }
1184 } 1184 }
1185 } 1185 }
1186 1186
1187 1187
1188 void ParallelMoveResolver::MoveMemory(const Address& dst, const Address& src) { 1188 void ParallelMoveResolver::MoveMemoryToMemory(const Address& dst,
1189 const Address& src) {
1189 // TODO(vegorov): allocate temporary register for such moves. 1190 // TODO(vegorov): allocate temporary register for such moves.
1190 __ pushl(EAX); 1191 __ pushl(EAX);
1191 __ movl(EAX, src); 1192 __ movl(EAX, src);
1192 __ movl(dst, EAX); 1193 __ movl(dst, EAX);
1193 __ popl(EAX); 1194 __ popl(EAX);
1194 } 1195 }
1195 1196
1196 1197
1197 void ParallelMoveResolver::StoreObject(const Address& dst, const Object& obj) { 1198 void ParallelMoveResolver::StoreObject(const Address& dst, const Object& obj) {
1198 // TODO(vegorov): allocate temporary register for such moves. 1199 // TODO(vegorov): allocate temporary register for such moves.
(...skipping 26 matching lines...) Expand all
1225 __ popl(ECX); 1226 __ popl(ECX);
1226 __ popl(EAX); 1227 __ popl(EAX);
1227 } 1228 }
1228 1229
1229 1230
1230 #undef __ 1231 #undef __
1231 1232
1232 } // namespace dart 1233 } // namespace dart
1233 1234
1234 #endif // defined TARGET_ARCH_IA32 1235 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698