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

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

Issue 10875030: Add support for XMM registers in SSA code generation pipeline. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix a bug pointed out by Florian Created 8 years, 4 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
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_ia32_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 419
420 void Assembler::movsd(XmmRegister dst, XmmRegister src) { 420 void Assembler::movsd(XmmRegister dst, XmmRegister src) {
421 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 421 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
422 EmitUint8(0xF2); 422 EmitUint8(0xF2);
423 EmitUint8(0x0F); 423 EmitUint8(0x0F);
424 EmitUint8(0x11); 424 EmitUint8(0x11);
425 EmitXmmRegisterOperand(src, dst); 425 EmitXmmRegisterOperand(src, dst);
426 } 426 }
427 427
428 428
429 void Assembler::movaps(XmmRegister dst, XmmRegister src) {
430 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
431 EmitUint8(0x0F);
432 EmitUint8(0x28);
433 EmitXmmRegisterOperand(dst, src);
434 }
435
436
429 void Assembler::addsd(XmmRegister dst, XmmRegister src) { 437 void Assembler::addsd(XmmRegister dst, XmmRegister src) {
430 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 438 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
431 EmitUint8(0xF2); 439 EmitUint8(0xF2);
432 EmitUint8(0x0F); 440 EmitUint8(0x0F);
433 EmitUint8(0x58); 441 EmitUint8(0x58);
434 EmitXmmRegisterOperand(dst, src); 442 EmitXmmRegisterOperand(dst, src);
435 } 443 }
436 444
437 445
438 void Assembler::addsd(XmmRegister dst, const Address& src) { 446 void Assembler::addsd(XmmRegister dst, const Address& src) {
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi" 1791 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi"
1784 }; 1792 };
1785 1793
1786 1794
1787 const char* Assembler::RegisterName(Register reg) { 1795 const char* Assembler::RegisterName(Register reg) {
1788 ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters)); 1796 ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters));
1789 return cpu_reg_names[reg]; 1797 return cpu_reg_names[reg];
1790 } 1798 }
1791 1799
1792 1800
1801 static const char* xmm_reg_names[kNumberOfXmmRegisters] = {
1802 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
1803 };
1804
1805
1806 const char* Assembler::XmmRegisterName(XmmRegister reg) {
1807 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
1808 return xmm_reg_names[reg];
1809 }
1810
1811
1793 } // namespace dart 1812 } // namespace dart
1794 1813
1795 #endif // defined TARGET_ARCH_IA32 1814 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_ia32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698