Chromium Code Reviews| 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 542 ASSERT(dst <= XMM7); | 542 ASSERT(dst <= XMM7); |
| 543 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 543 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
| 544 EmitUint8(0x66); | 544 EmitUint8(0x66); |
| 545 EmitOperandREX(0, src, REX_NONE); | 545 EmitOperandREX(0, src, REX_NONE); |
| 546 EmitUint8(0x0F); | 546 EmitUint8(0x0F); |
| 547 EmitUint8(0x57); | 547 EmitUint8(0x57); |
| 548 EmitOperand(dst & 7, src); | 548 EmitOperand(dst & 7, src); |
| 549 } | 549 } |
| 550 | 550 |
| 551 | 551 |
| 552 void Assembler::cvtsi2sd(XmmRegister dst, Register src) { | |
| 553 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | |
| 554 ASSERT(dst <= XMM7); | |
| 555 Operand operand(src); | |
| 556 EmitUint8(0xF2); | |
| 557 EmitOperandREX(0, operand, REX_NONE); | |
| 558 EmitUint8(0x0F); | |
| 559 EmitUint8(0x2A); | |
| 560 EmitOperand(dst, operand); | |
|
srdjan
2012/06/08 05:18:22
Please add a test in assembler_x64_test (see test
Vyacheslav Egorov (Google)
2012/06/08 11:11:13
done
| |
| 561 } | |
| 562 | |
| 563 | |
| 552 void Assembler::xchgl(Register dst, Register src) { | 564 void Assembler::xchgl(Register dst, Register src) { |
| 553 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 565 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
| 554 Operand operand(src); | 566 Operand operand(src); |
| 555 EmitOperandREX(dst, operand, REX_NONE); | 567 EmitOperandREX(dst, operand, REX_NONE); |
| 556 EmitUint8(0x87); | 568 EmitUint8(0x87); |
| 557 EmitOperand(dst & 7, operand); | 569 EmitOperand(dst & 7, operand); |
| 558 } | 570 } |
| 559 | 571 |
| 560 | 572 |
| 561 void Assembler::xchgq(Register dst, Register src) { | 573 void Assembler::xchgq(Register dst, Register src) { |
| (...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1641 comments.SetCommentAt(i, comments_[i]->comment()); | 1653 comments.SetCommentAt(i, comments_[i]->comment()); |
| 1642 } | 1654 } |
| 1643 | 1655 |
| 1644 return comments; | 1656 return comments; |
| 1645 } | 1657 } |
| 1646 | 1658 |
| 1647 | 1659 |
| 1648 } // namespace dart | 1660 } // namespace dart |
| 1649 | 1661 |
| 1650 #endif // defined TARGET_ARCH_X64 | 1662 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |