| 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 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 if (destination.IsXmmRegister()) { | 1226 if (destination.IsXmmRegister()) { |
| 1227 __ movsd(destination.xmm_reg(), ToStackSlotAddress(source)); | 1227 __ movsd(destination.xmm_reg(), ToStackSlotAddress(source)); |
| 1228 } else { | 1228 } else { |
| 1229 ASSERT(destination.IsDoubleStackSlot()); | 1229 ASSERT(destination.IsDoubleStackSlot()); |
| 1230 __ movsd(XMM0, ToStackSlotAddress(source)); | 1230 __ movsd(XMM0, ToStackSlotAddress(source)); |
| 1231 __ movsd(ToStackSlotAddress(destination), XMM0); | 1231 __ movsd(ToStackSlotAddress(destination), XMM0); |
| 1232 } | 1232 } |
| 1233 } else { | 1233 } else { |
| 1234 ASSERT(source.IsConstant()); | 1234 ASSERT(source.IsConstant()); |
| 1235 if (destination.IsRegister()) { | 1235 if (destination.IsRegister()) { |
| 1236 __ LoadObject(destination.reg(), source.constant()); | 1236 const Object& constant = source.constant(); |
| 1237 if (constant.IsSmi() && (Smi::Cast(constant).Value() == 0)) { |
| 1238 __ xorq(destination.reg(), destination.reg()); |
| 1239 } else { |
| 1240 __ LoadObject(destination.reg(), constant); |
| 1241 } |
| 1237 } else { | 1242 } else { |
| 1238 ASSERT(destination.IsStackSlot()); | 1243 ASSERT(destination.IsStackSlot()); |
| 1239 StoreObject(ToStackSlotAddress(destination), source.constant()); | 1244 StoreObject(ToStackSlotAddress(destination), source.constant()); |
| 1240 } | 1245 } |
| 1241 } | 1246 } |
| 1242 | 1247 |
| 1243 move->Eliminate(); | 1248 move->Eliminate(); |
| 1244 } | 1249 } |
| 1245 | 1250 |
| 1246 | 1251 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1317 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
| 1313 __ Exchange(mem1, mem2); | 1318 __ Exchange(mem1, mem2); |
| 1314 } | 1319 } |
| 1315 | 1320 |
| 1316 | 1321 |
| 1317 #undef __ | 1322 #undef __ |
| 1318 | 1323 |
| 1319 } // namespace dart | 1324 } // namespace dart |
| 1320 | 1325 |
| 1321 #endif // defined TARGET_ARCH_X64 | 1326 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |