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

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

Issue 10542167: Inline Math.sqrt in new compilers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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
OLDNEW
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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 ASSERT(a <= XMM7); 531 ASSERT(a <= XMM7);
532 ASSERT(b <= XMM7); 532 ASSERT(b <= XMM7);
533 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 533 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
534 EmitUint8(0x66); 534 EmitUint8(0x66);
535 EmitUint8(0x0F); 535 EmitUint8(0x0F);
536 EmitUint8(0x2F); 536 EmitUint8(0x2F);
537 EmitXmmRegisterOperand(a, b); 537 EmitXmmRegisterOperand(a, b);
538 } 538 }
539 539
540 540
541 void Assembler::sqrtsd(XmmRegister dst, XmmRegister src) {
542 ASSERT(dst <= XMM7);
543 ASSERT(src <= XMM7);
544 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
545 EmitUint8(0xF2);
546 EmitUint8(0x0F);
547 EmitUint8(0x51);
548 EmitXmmRegisterOperand(dst, src);
549 }
550
551
541 void Assembler::xorpd(XmmRegister dst, const Address& src) { 552 void Assembler::xorpd(XmmRegister dst, const Address& src) {
542 ASSERT(dst <= XMM7); 553 ASSERT(dst <= XMM7);
543 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 554 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
544 EmitUint8(0x66); 555 EmitUint8(0x66);
545 EmitOperandREX(0, src, REX_NONE); 556 EmitOperandREX(0, src, REX_NONE);
546 EmitUint8(0x0F); 557 EmitUint8(0x0F);
547 EmitUint8(0x57); 558 EmitUint8(0x57);
548 EmitOperand(dst & 7, src); 559 EmitOperand(dst & 7, src);
549 } 560 }
550 561
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 comments.SetCommentAt(i, comments_[i]->comment()); 1664 comments.SetCommentAt(i, comments_[i]->comment());
1654 } 1665 }
1655 1666
1656 return comments; 1667 return comments;
1657 } 1668 }
1658 1669
1659 1670
1660 } // namespace dart 1671 } // namespace dart
1661 1672
1662 #endif // defined TARGET_ARCH_X64 1673 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698