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

Side by Side Diff: runtime/vm/assembler_x64.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, 3 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_x64.h ('k') | runtime/vm/assembler_x64_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_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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 ASSERT(src <= XMM7); 472 ASSERT(src <= XMM7);
473 ASSERT(dst <= XMM7); 473 ASSERT(dst <= XMM7);
474 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 474 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
475 EmitUint8(0xF2); 475 EmitUint8(0xF2);
476 EmitUint8(0x0F); 476 EmitUint8(0x0F);
477 EmitUint8(0x11); 477 EmitUint8(0x11);
478 EmitXmmRegisterOperand(src & 7, dst); 478 EmitXmmRegisterOperand(src & 7, dst);
479 } 479 }
480 480
481 481
482 void Assembler::movaps(XmmRegister dst, XmmRegister src) {
483 // TODO(vegorov): implement and test XMM8 - XMM15.
484 ASSERT(src <= XMM7);
485 ASSERT(dst <= XMM7);
486 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
487 EmitUint8(0x0F);
488 EmitUint8(0x28);
489 EmitXmmRegisterOperand(dst & 7, src);
490 }
491
492
482 void Assembler::addsd(XmmRegister dst, XmmRegister src) { 493 void Assembler::addsd(XmmRegister dst, XmmRegister src) {
483 // TODO(srdjan): implement and test XMM8 - XMM15. 494 // TODO(srdjan): implement and test XMM8 - XMM15.
484 ASSERT(src <= XMM7); 495 ASSERT(src <= XMM7);
485 ASSERT(dst <= XMM7); 496 ASSERT(dst <= XMM7);
486 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 497 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
487 EmitUint8(0xF2); 498 EmitUint8(0xF2);
488 EmitUint8(0x0F); 499 EmitUint8(0x0F);
489 EmitUint8(0x58); 500 EmitUint8(0x58);
490 EmitXmmRegisterOperand(dst, src); 501 EmitXmmRegisterOperand(dst, src);
491 } 502 }
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" 1925 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
1915 }; 1926 };
1916 1927
1917 1928
1918 const char* Assembler::RegisterName(Register reg) { 1929 const char* Assembler::RegisterName(Register reg) {
1919 ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters)); 1930 ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters));
1920 return cpu_reg_names[reg]; 1931 return cpu_reg_names[reg];
1921 } 1932 }
1922 1933
1923 1934
1935 static const char* xmm_reg_names[kNumberOfXmmRegisters] = {
1936 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
1937 };
1938
1939
1940 const char* Assembler::XmmRegisterName(XmmRegister reg) {
1941 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
1942 return xmm_reg_names[reg];
1943 }
1944
1945
1924 } // namespace dart 1946 } // namespace dart
1925 1947
1926 #endif // defined TARGET_ARCH_X64 1948 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698