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

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

Issue 10696183: Add some missing x64 instruction variations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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_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 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 865
866 void Assembler::andq(Register dst, Register src) { 866 void Assembler::andq(Register dst, Register src) {
867 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 867 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
868 Operand operand(src); 868 Operand operand(src);
869 EmitOperandREX(dst, operand, REX_W); 869 EmitOperandREX(dst, operand, REX_W);
870 EmitUint8(0x23); 870 EmitUint8(0x23);
871 EmitOperand(dst & 7, operand); 871 EmitOperand(dst & 7, operand);
872 } 872 }
873 873
874 874
875 void Assembler::andq(Register dst, const Address& address) {
876 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
877 EmitOperandREX(dst, address, REX_W);
878 EmitUint8(0x23);
879 EmitOperand(dst & 7, address);
880 }
881
882
875 void Assembler::andq(Register dst, const Immediate& imm) { 883 void Assembler::andq(Register dst, const Immediate& imm) {
876 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 884 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
877 EmitRegisterREX(dst, REX_W); 885 EmitRegisterREX(dst, REX_W);
878 EmitComplex(4, Operand(dst), imm); 886 EmitComplex(4, Operand(dst), imm);
879 } 887 }
880 888
881 889
882 void Assembler::orq(Register dst, Register src) { 890 void Assembler::orq(Register dst, Register src) {
883 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 891 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
884 Operand operand(src); 892 Operand operand(src);
885 EmitOperandREX(dst, operand, REX_W); 893 EmitOperandREX(dst, operand, REX_W);
886 EmitUint8(0x0B); 894 EmitUint8(0x0B);
887 EmitOperand(dst & 7, operand); 895 EmitOperand(dst & 7, operand);
888 } 896 }
889 897
890 898
899 void Assembler::orq(Register dst, const Address& address) {
900 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
901 EmitOperandREX(dst, address, REX_W);
902 EmitUint8(0x0B);
903 EmitOperand(dst & 7, address);
904 }
905
906
891 void Assembler::orq(Register dst, const Immediate& imm) { 907 void Assembler::orq(Register dst, const Immediate& imm) {
892 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 908 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
893 EmitRegisterREX(dst, REX_W); 909 EmitRegisterREX(dst, REX_W);
894 EmitComplex(1, Operand(dst), imm); 910 EmitComplex(1, Operand(dst), imm);
895 } 911 }
896 912
897 913
898 void Assembler::xorq(Register dst, Register src) { 914 void Assembler::xorq(Register dst, Register src) {
899 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 915 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
900 Operand operand(src); 916 Operand operand(src);
901 EmitOperandREX(dst, operand, REX_W); 917 EmitOperandREX(dst, operand, REX_W);
902 EmitUint8(0x33); 918 EmitUint8(0x33);
903 EmitOperand(dst & 7, operand); 919 EmitOperand(dst & 7, operand);
904 } 920 }
905 921
906 922
923 void Assembler::xorq(Register dst, const Address& address) {
924 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
925 EmitOperandREX(dst, address, REX_W);
926 EmitUint8(0x33);
927 EmitOperand(dst & 7, address);
928 }
929
930
907 void Assembler::addl(Register dst, Register src) { 931 void Assembler::addl(Register dst, Register src) {
908 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 932 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
909 Operand operand(src); 933 Operand operand(src);
910 EmitOperandREX(dst, operand, REX_NONE); 934 EmitOperandREX(dst, operand, REX_NONE);
911 EmitUint8(0x03); 935 EmitUint8(0x03);
912 EmitOperand(dst & 7, operand); 936 EmitOperand(dst & 7, operand);
913 } 937 }
914 938
915 939
916 void Assembler::addq(Register dst, Register src) { 940 void Assembler::addq(Register dst, Register src) {
917 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 941 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
918 Operand operand(src); 942 Operand operand(src);
919 EmitOperandREX(dst, operand, REX_W); 943 EmitOperandREX(dst, operand, REX_W);
920 EmitUint8(0x03); 944 EmitUint8(0x03);
921 EmitOperand(dst & 7, operand); 945 EmitOperand(dst & 7, operand);
922 } 946 }
923 947
924 948
949 void Assembler::addq(Register dst, const Address& address) {
950 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
951 EmitOperandREX(dst, address, REX_W);
952 EmitUint8(0x03);
953 EmitOperand(dst & 7, address);
954 }
955
956
925 void Assembler::addl(const Address& address, const Immediate& imm) { 957 void Assembler::addl(const Address& address, const Immediate& imm) {
926 UNIMPLEMENTED(); 958 UNIMPLEMENTED();
927 } 959 }
928 960
929 961
930 void Assembler::addq(Register reg, const Immediate& imm) { 962 void Assembler::addq(Register reg, const Immediate& imm) {
931 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 963 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
932 EmitRegisterREX(reg, REX_W); 964 EmitRegisterREX(reg, REX_W);
933 EmitComplex(0, Operand(reg), imm); 965 EmitComplex(0, Operand(reg), imm);
934 } 966 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 void Assembler::imulq(Register dst, Register src) { 1050 void Assembler::imulq(Register dst, Register src) {
1019 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1051 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1020 Operand operand(src); 1052 Operand operand(src);
1021 EmitOperandREX(dst, operand, REX_W); 1053 EmitOperandREX(dst, operand, REX_W);
1022 EmitUint8(0x0F); 1054 EmitUint8(0x0F);
1023 EmitUint8(0xAF); 1055 EmitUint8(0xAF);
1024 EmitOperand(dst & 7, operand); 1056 EmitOperand(dst & 7, operand);
1025 } 1057 }
1026 1058
1027 1059
1060 void Assembler::imulq(Register dst, const Address& address) {
1061 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1062 EmitOperandREX(dst, address, REX_W);
1063 EmitUint8(0x0F);
1064 EmitUint8(0xAF);
1065 EmitOperand(dst & 7, address);
1066 }
1067
1068
1028 void Assembler::subq(Register dst, Register src) { 1069 void Assembler::subq(Register dst, Register src) {
1029 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1070 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1030 Operand operand(src); 1071 Operand operand(src);
1031 EmitOperandREX(dst, operand, REX_W); 1072 EmitOperandREX(dst, operand, REX_W);
1032 EmitUint8(0x2B); 1073 EmitUint8(0x2B);
1033 EmitOperand(dst & 7, operand); 1074 EmitOperand(dst & 7, operand);
1034 } 1075 }
1035 1076
1036 1077
1037 void Assembler::subq(Register reg, const Immediate& imm) { 1078 void Assembler::subq(Register reg, const Immediate& imm) {
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
1852 1893
1853 const char* Assembler::RegisterName(Register reg) { 1894 const char* Assembler::RegisterName(Register reg) {
1854 ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters)); 1895 ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters));
1855 return cpu_reg_names[reg]; 1896 return cpu_reg_names[reg];
1856 } 1897 }
1857 1898
1858 1899
1859 } // namespace dart 1900 } // namespace dart
1860 1901
1861 #endif // defined TARGET_ARCH_X64 1902 #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