| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/heap.h" | 9 #include "vm/heap.h" |
| 10 #include "vm/memory_region.h" | 10 #include "vm/memory_region.h" |
| (...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 } | 1320 } |
| 1321 | 1321 |
| 1322 | 1322 |
| 1323 void Assembler::MoveRegister(Register to, Register from) { | 1323 void Assembler::MoveRegister(Register to, Register from) { |
| 1324 if (to != from) { | 1324 if (to != from) { |
| 1325 movq(to, from); | 1325 movq(to, from); |
| 1326 } | 1326 } |
| 1327 } | 1327 } |
| 1328 | 1328 |
| 1329 | 1329 |
| 1330 void Assembler::PushRegister(Register r) { |
| 1331 pushq(r); |
| 1332 } |
| 1333 |
| 1334 |
| 1335 void Assembler::PopRegister(Register r) { |
| 1336 popq(r); |
| 1337 } |
| 1338 |
| 1339 |
| 1330 void Assembler::AddImmediate(Register reg, const Immediate& imm) { | 1340 void Assembler::AddImmediate(Register reg, const Immediate& imm) { |
| 1331 int64_t value = imm.value(); | 1341 int64_t value = imm.value(); |
| 1332 if (value > 0) { | 1342 if (value > 0) { |
| 1333 if (value == 1) { | 1343 if (value == 1) { |
| 1334 incq(reg); | 1344 incq(reg); |
| 1335 } else if (value != 0) { | 1345 } else if (value != 0) { |
| 1336 addq(reg, imm); | 1346 addq(reg, imm); |
| 1337 } | 1347 } |
| 1338 } else if (value < 0) { | 1348 } else if (value < 0) { |
| 1339 value = -value; | 1349 value = -value; |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1664 comments.SetCommentAt(i, comments_[i]->comment()); | 1674 comments.SetCommentAt(i, comments_[i]->comment()); |
| 1665 } | 1675 } |
| 1666 | 1676 |
| 1667 return comments; | 1677 return comments; |
| 1668 } | 1678 } |
| 1669 | 1679 |
| 1670 | 1680 |
| 1671 } // namespace dart | 1681 } // namespace dart |
| 1672 | 1682 |
| 1673 #endif // defined TARGET_ARCH_X64 | 1683 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |