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

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

Issue 19940005: Add two argument SSE shuffle instructions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 749
750 750
751 void Assembler::reciprocalps(XmmRegister dst) { 751 void Assembler::reciprocalps(XmmRegister dst) {
752 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 752 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
753 EmitUint8(0x0F); 753 EmitUint8(0x0F);
754 EmitUint8(0x53); 754 EmitUint8(0x53);
755 EmitXmmRegisterOperand(dst, dst); 755 EmitXmmRegisterOperand(dst, dst);
756 } 756 }
757 757
758 758
759 void Assembler::movhlps(XmmRegister dst, XmmRegister src) {
760 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
761 EmitUint8(0x0F);
762 EmitUint8(0x12);
763 EmitXmmRegisterOperand(dst, src);
764 }
765
766
767 void Assembler::movlhps(XmmRegister dst, XmmRegister src) {
768 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
769 EmitUint8(0x0F);
770 EmitUint8(0x16);
771 EmitXmmRegisterOperand(dst, src);
772 }
773
774
775 void Assembler::unpcklps(XmmRegister dst, XmmRegister src) {
776 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
777 EmitUint8(0x0F);
778 EmitUint8(0x14);
779 EmitXmmRegisterOperand(dst, src);
780 }
781
782
783 void Assembler::unpckhps(XmmRegister dst, XmmRegister src) {
784 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
785 EmitUint8(0x0F);
786 EmitUint8(0x15);
787 EmitXmmRegisterOperand(dst, src);
788 }
789
790
791 void Assembler::unpcklpd(XmmRegister dst, XmmRegister src) {
792 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
793 EmitUint8(0x66);
794 EmitUint8(0x0F);
795 EmitUint8(0x14);
796 EmitXmmRegisterOperand(dst, src);
797 }
798
799
800 void Assembler::unpckhpd(XmmRegister dst, XmmRegister src) {
801 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
802 EmitUint8(0x66);
803 EmitUint8(0x0F);
804 EmitUint8(0x15);
805 EmitXmmRegisterOperand(dst, src);
806 }
807
808
759 void Assembler::set1ps(XmmRegister dst, Register tmp1, const Immediate& imm) { 809 void Assembler::set1ps(XmmRegister dst, Register tmp1, const Immediate& imm) {
760 // Load 32-bit immediate value into tmp1. 810 // Load 32-bit immediate value into tmp1.
761 movl(tmp1, imm); 811 movl(tmp1, imm);
762 // Move value from tmp1 into dst. 812 // Move value from tmp1 into dst.
763 movd(dst, tmp1); 813 movd(dst, tmp1);
764 // Broadcast low lane into other three lanes. 814 // Broadcast low lane into other three lanes.
765 shufps(dst, dst, Immediate(0x0)); 815 shufps(dst, dst, Immediate(0x0));
766 } 816 }
767 817
768 818
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2403 2453
2404 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2454 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2405 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 2455 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
2406 return xmm_reg_names[reg]; 2456 return xmm_reg_names[reg];
2407 } 2457 }
2408 2458
2409 2459
2410 } // namespace dart 2460 } // namespace dart
2411 2461
2412 #endif // defined TARGET_ARCH_IA32 2462 #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