| 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" // 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 "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 __ movq(destination.reg(), source.reg()); | 1130 __ movq(destination.reg(), source.reg()); |
| 1131 } else { | 1131 } else { |
| 1132 ASSERT(destination.IsSpillSlot()); | 1132 ASSERT(destination.IsSpillSlot()); |
| 1133 __ movq(ToAddress(destination), source.reg()); | 1133 __ movq(ToAddress(destination), source.reg()); |
| 1134 } | 1134 } |
| 1135 } else if (source.IsSpillSlot()) { | 1135 } else if (source.IsSpillSlot()) { |
| 1136 if (destination.IsRegister()) { | 1136 if (destination.IsRegister()) { |
| 1137 __ movq(destination.reg(), ToAddress(source)); | 1137 __ movq(destination.reg(), ToAddress(source)); |
| 1138 } else { | 1138 } else { |
| 1139 ASSERT(destination.IsSpillSlot()); | 1139 ASSERT(destination.IsSpillSlot()); |
| 1140 MoveMemory(ToAddress(destination), ToAddress(source)); | 1140 MoveMemoryToMemory(ToAddress(destination), ToAddress(source)); |
| 1141 } | 1141 } |
| 1142 } else { | 1142 } else { |
| 1143 ASSERT(source.IsConstant()); | 1143 ASSERT(source.IsConstant()); |
| 1144 if (destination.IsRegister()) { | 1144 if (destination.IsRegister()) { |
| 1145 __ LoadObject(destination.reg(), source.constant()); | 1145 __ LoadObject(destination.reg(), source.constant()); |
| 1146 } else { | 1146 } else { |
| 1147 ASSERT(destination.IsSpillSlot()); | 1147 ASSERT(destination.IsSpillSlot()); |
| 1148 StoreObject(ToAddress(destination), source.constant()); | 1148 StoreObject(ToAddress(destination), source.constant()); |
| 1149 } | 1149 } |
| 1150 } | 1150 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1181 const MoveOperands& other_move = *moves_[i]; | 1181 const MoveOperands& other_move = *moves_[i]; |
| 1182 if (other_move.Blocks(source)) { | 1182 if (other_move.Blocks(source)) { |
| 1183 moves_[i]->set_src(destination); | 1183 moves_[i]->set_src(destination); |
| 1184 } else if (other_move.Blocks(destination)) { | 1184 } else if (other_move.Blocks(destination)) { |
| 1185 moves_[i]->set_src(source); | 1185 moves_[i]->set_src(source); |
| 1186 } | 1186 } |
| 1187 } | 1187 } |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 | 1190 |
| 1191 void ParallelMoveResolver::MoveMemory(const Address& dst, const Address& src) { | 1191 void ParallelMoveResolver::MoveMemoryToMemory(const Address& dst, |
| 1192 __ MoveMemory(dst, src); | 1192 const Address& src) { |
| 1193 __ MoveMemoryToMemory(dst, src); |
| 1193 } | 1194 } |
| 1194 | 1195 |
| 1195 | 1196 |
| 1196 void ParallelMoveResolver::StoreObject(const Address& dst, const Object& obj) { | 1197 void ParallelMoveResolver::StoreObject(const Address& dst, const Object& obj) { |
| 1197 __ StoreObject(dst, obj); | 1198 __ StoreObject(dst, obj); |
| 1198 } | 1199 } |
| 1199 | 1200 |
| 1200 | 1201 |
| 1201 void ParallelMoveResolver::Exchange(Register reg, const Address& mem) { | 1202 void ParallelMoveResolver::Exchange(Register reg, const Address& mem) { |
| 1202 __ Exchange(reg, mem); | 1203 __ Exchange(reg, mem); |
| 1203 } | 1204 } |
| 1204 | 1205 |
| 1205 | 1206 |
| 1206 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1207 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
| 1207 __ Exchange(mem1, mem2); | 1208 __ Exchange(mem1, mem2); |
| 1208 } | 1209 } |
| 1209 | 1210 |
| 1210 | 1211 |
| 1211 #undef __ | 1212 #undef __ |
| 1212 | 1213 |
| 1213 } // namespace dart | 1214 } // namespace dart |
| 1214 | 1215 |
| 1215 #endif // defined TARGET_ARCH_X64 | 1216 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |