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

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

Issue 11358262: Add support for XMM8..XMM15 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes and more tests. Created 8 years, 1 month 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 | « no previous file | runtime/vm/assembler_x64.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 #ifndef VM_ASSEMBLER_X64_H_ 5 #ifndef VM_ASSEMBLER_X64_H_
6 #define VM_ASSEMBLER_X64_H_ 6 #define VM_ASSEMBLER_X64_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_x64.h directly; use assembler.h instead. 9 #error Do not include assembler_x64.h directly; use assembler.h instead.
10 #endif 10 #endif
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 inline void EmitUint8(uint8_t value); 671 inline void EmitUint8(uint8_t value);
672 inline void EmitInt32(int32_t value); 672 inline void EmitInt32(int32_t value);
673 inline void EmitInt64(int64_t value); 673 inline void EmitInt64(int64_t value);
674 674
675 inline void EmitRegisterREX(Register reg, uint8_t rex); 675 inline void EmitRegisterREX(Register reg, uint8_t rex);
676 inline void EmitRegisterOperand(int rm, int reg); 676 inline void EmitRegisterOperand(int rm, int reg);
677 inline void EmitOperandREX(int rm, const Operand& operand, uint8_t rex); 677 inline void EmitOperandREX(int rm, const Operand& operand, uint8_t rex);
678 inline void EmitXmmRegisterOperand(int rm, XmmRegister reg); 678 inline void EmitXmmRegisterOperand(int rm, XmmRegister reg);
679 inline void EmitFixup(AssemblerFixup* fixup); 679 inline void EmitFixup(AssemblerFixup* fixup);
680 inline void EmitOperandSizeOverride(); 680 inline void EmitOperandSizeOverride();
681 681 inline void EmitREX_RB(XmmRegister reg,
682 XmmRegister base,
683 uint8_t rex = REX_NONE);
684 inline void EmitREX_RB(XmmRegister reg,
685 const Operand& operand,
686 uint8_t rex = REX_NONE);
687 inline void EmitREX_RB(XmmRegister reg,
688 Register base,
689 uint8_t rex = REX_NONE);
690 inline void EmitREX_RB(Register reg,
691 XmmRegister base,
692 uint8_t rex = REX_NONE);
682 void EmitOperand(int rm, const Operand& operand); 693 void EmitOperand(int rm, const Operand& operand);
683 void EmitImmediate(const Immediate& imm); 694 void EmitImmediate(const Immediate& imm);
684 void EmitComplex(int rm, const Operand& operand, const Immediate& immediate); 695 void EmitComplex(int rm, const Operand& operand, const Immediate& immediate);
685 void EmitLabel(Label* label, int instruction_size); 696 void EmitLabel(Label* label, int instruction_size);
686 void EmitLabelLink(Label* label); 697 void EmitLabelLink(Label* label);
687 void EmitNearLabelLink(Label* label); 698 void EmitNearLabelLink(Label* label);
688 699
689 void EmitGenericShift(bool wide, int rm, Register reg, const Immediate& imm); 700 void EmitGenericShift(bool wide, int rm, Register reg, const Immediate& imm);
690 void EmitGenericShift(bool wide, int rm, Register operand, Register shifter); 701 void EmitGenericShift(bool wide, int rm, Register operand, Register shifter);
691 702
(...skipping 27 matching lines...) Expand all
719 730
720 731
721 inline void Assembler::EmitOperandREX(int rm, 732 inline void Assembler::EmitOperandREX(int rm,
722 const Operand& operand, 733 const Operand& operand,
723 uint8_t rex) { 734 uint8_t rex) {
724 rex |= (rm > 7 ? REX_R : REX_NONE) | operand.rex(); 735 rex |= (rm > 7 ? REX_R : REX_NONE) | operand.rex();
725 if (rex != REX_NONE) EmitUint8(REX_PREFIX | rex); 736 if (rex != REX_NONE) EmitUint8(REX_PREFIX | rex);
726 } 737 }
727 738
728 739
740 inline void Assembler::EmitREX_RB(XmmRegister reg,
741 XmmRegister base,
742 uint8_t rex) {
743 if (reg > 7) rex |= REX_R;
744 if (base > 7) rex |= REX_B;
745 if (rex != REX_NONE) EmitUint8(REX_PREFIX | rex);
746 }
747
748
749 inline void Assembler::EmitREX_RB(XmmRegister reg,
750 const Operand& operand,
751 uint8_t rex) {
752 if (reg > 7) rex |= REX_R;
753 rex |= operand.rex();
754 if (rex != REX_NONE) EmitUint8(REX_PREFIX | rex);
755 }
756
757
758 inline void Assembler::EmitREX_RB(XmmRegister reg,
759 Register base,
760 uint8_t rex) {
761 if (reg > 7) rex |= REX_R;
762 if (base > 7) rex |= REX_B;
763 if (rex != REX_NONE) EmitUint8(REX_PREFIX | rex);
764 }
765
766
767 inline void Assembler::EmitREX_RB(Register reg,
768 XmmRegister base,
769 uint8_t rex) {
770 if (reg > 7) rex |= REX_R;
771 if (base > 7) rex |= REX_B;
772 if (rex != REX_NONE) EmitUint8(REX_PREFIX | rex);
773 }
774
775
729 inline void Assembler::EmitFixup(AssemblerFixup* fixup) { 776 inline void Assembler::EmitFixup(AssemblerFixup* fixup) {
730 buffer_.EmitFixup(fixup); 777 buffer_.EmitFixup(fixup);
731 } 778 }
732 779
733 780
734 inline void Assembler::EmitOperandSizeOverride() { 781 inline void Assembler::EmitOperandSizeOverride() {
735 EmitUint8(0x66); 782 EmitUint8(0x66);
736 } 783 }
737 784
738 } // namespace dart 785 } // namespace dart
739 786
740 #endif // VM_ASSEMBLER_X64_H_ 787 #endif // VM_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698