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

Side by Side Diff: src/ia32/disasm-ia32.cc

Issue 668056: Added new ia32 assembler instructions to the diassembler from Math.pow inline... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 data += PrintOperands("mov_w", REG_OPER_OP_ORDER, data); 1049 data += PrintOperands("mov_w", REG_OPER_OP_ORDER, data);
1050 } else if (*data == 0x89) { 1050 } else if (*data == 0x89) {
1051 data++; 1051 data++;
1052 int mod, regop, rm; 1052 int mod, regop, rm;
1053 get_modrm(*data, &mod, &regop, &rm); 1053 get_modrm(*data, &mod, &regop, &rm);
1054 AppendToBuffer("mov_w "); 1054 AppendToBuffer("mov_w ");
1055 data += PrintRightOperand(data); 1055 data += PrintRightOperand(data);
1056 AppendToBuffer(",%s", NameOfCPURegister(regop)); 1056 AppendToBuffer(",%s", NameOfCPURegister(regop));
1057 } else if (*data == 0x0F) { 1057 } else if (*data == 0x0F) {
1058 data++; 1058 data++;
1059 if (*data == 0x2F) { 1059 if (*data == 0x38) {
1060 data++;
1061 if (*data == 0x17) {
1062 data++;
1063 int mod, regop, rm;
1064 get_modrm(*data, &mod, &regop, &rm);
1065 AppendToBuffer("ptest %s,%s",
1066 NameOfXMMRegister(regop),
1067 NameOfXMMRegister(rm));
1068 data++;
1069 } else {
1070 UnimplementedInstruction();
1071 }
1072 } else if (*data == 0x2F) {
1060 data++; 1073 data++;
1061 int mod, regop, rm; 1074 int mod, regop, rm;
1062 get_modrm(*data, &mod, &regop, &rm); 1075 get_modrm(*data, &mod, &regop, &rm);
1063 AppendToBuffer("comisd %s,%s", 1076 AppendToBuffer("comisd %s,%s",
1064 NameOfXMMRegister(regop), 1077 NameOfXMMRegister(regop),
1065 NameOfXMMRegister(rm)); 1078 NameOfXMMRegister(rm));
1066 data++; 1079 data++;
1067 } else if (*data == 0x57) { 1080 } else if (*data == 0x57) {
1068 data++; 1081 data++;
1069 int mod, regop, rm; 1082 int mod, regop, rm;
1070 get_modrm(*data, &mod, &regop, &rm); 1083 get_modrm(*data, &mod, &regop, &rm);
1071 AppendToBuffer("xorpd %s,%s", 1084 AppendToBuffer("xorpd %s,%s",
1072 NameOfXMMRegister(regop), 1085 NameOfXMMRegister(regop),
1073 NameOfXMMRegister(rm)); 1086 NameOfXMMRegister(rm));
1074 data++; 1087 data++;
1088 } else if (*data == 0x6E) {
1089 data++;
1090 int mod, regop, rm;
1091 get_modrm(*data, &mod, &regop, &rm);
1092 AppendToBuffer("movd %s,", NameOfXMMRegister(regop));
1093 data += PrintRightOperand(data);
1075 } else if (*data == 0x6F) { 1094 } else if (*data == 0x6F) {
1076 data++; 1095 data++;
1077 int mod, regop, rm; 1096 int mod, regop, rm;
1078 get_modrm(*data, &mod, &regop, &rm); 1097 get_modrm(*data, &mod, &regop, &rm);
1079 AppendToBuffer("movdqa %s,", NameOfXMMRegister(regop)); 1098 AppendToBuffer("movdqa %s,", NameOfXMMRegister(regop));
1080 data += PrintRightOperand(data); 1099 data += PrintRightOperand(data);
1081 } else if (*data == 0x7F) { 1100 } else if (*data == 0x7F) {
1082 AppendToBuffer("movdqa "); 1101 AppendToBuffer("movdqa ");
1083 data++; 1102 data++;
1084 int mod, regop, rm; 1103 int mod, regop, rm;
1085 get_modrm(*data, &mod, &regop, &rm); 1104 get_modrm(*data, &mod, &regop, &rm);
1086 data += PrintRightOperand(data); 1105 data += PrintRightOperand(data);
1087 AppendToBuffer(",%s", NameOfXMMRegister(regop)); 1106 AppendToBuffer(",%s", NameOfXMMRegister(regop));
1107 } else if (*data == 0xEF) {
1108 data++;
1109 int mod, regop, rm;
1110 get_modrm(*data, &mod, &regop, &rm);
1111 AppendToBuffer("pxor %s,%s",
1112 NameOfXMMRegister(regop),
1113 NameOfXMMRegister(rm));
1114 data++;
1088 } else { 1115 } else {
1089 UnimplementedInstruction(); 1116 UnimplementedInstruction();
1090 } 1117 }
1091 } else { 1118 } else {
1092 UnimplementedInstruction(); 1119 UnimplementedInstruction();
1093 } 1120 }
1094 break; 1121 break;
1095 1122
1096 case 0xFE: 1123 case 0xFE:
1097 { data++; 1124 { data++;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 } else if (b2 == 0x10) { 1191 } else if (b2 == 0x10) {
1165 data += 3; 1192 data += 3;
1166 int mod, regop, rm; 1193 int mod, regop, rm;
1167 get_modrm(*data, &mod, &regop, &rm); 1194 get_modrm(*data, &mod, &regop, &rm);
1168 AppendToBuffer("movsd %s,", NameOfXMMRegister(regop)); 1195 AppendToBuffer("movsd %s,", NameOfXMMRegister(regop));
1169 data += PrintRightOperand(data); 1196 data += PrintRightOperand(data);
1170 } else { 1197 } else {
1171 const char* mnem = "?"; 1198 const char* mnem = "?";
1172 switch (b2) { 1199 switch (b2) {
1173 case 0x2A: mnem = "cvtsi2sd"; break; 1200 case 0x2A: mnem = "cvtsi2sd"; break;
1201 case 0x51: mnem = "sqrtsd"; break;
1174 case 0x58: mnem = "addsd"; break; 1202 case 0x58: mnem = "addsd"; break;
1175 case 0x59: mnem = "mulsd"; break; 1203 case 0x59: mnem = "mulsd"; break;
1176 case 0x5C: mnem = "subsd"; break; 1204 case 0x5C: mnem = "subsd"; break;
1177 case 0x5E: mnem = "divsd"; break; 1205 case 0x5E: mnem = "divsd"; break;
1178 } 1206 }
1179 data += 3; 1207 data += 3;
1180 int mod, regop, rm; 1208 int mod, regop, rm;
1181 get_modrm(*data, &mod, &regop, &rm); 1209 get_modrm(*data, &mod, &regop, &rm);
1182 if (b2 == 0x2A) { 1210 if (b2 == 0x2A) {
1183 AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); 1211 AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop));
1184 data += PrintRightOperand(data); 1212 data += PrintRightOperand(data);
1185 } else { 1213 } else {
1186 AppendToBuffer("%s %s,%s", 1214 AppendToBuffer("%s %s,%s",
1187 mnem, 1215 mnem,
1188 NameOfXMMRegister(regop), 1216 NameOfXMMRegister(regop),
1189 NameOfXMMRegister(rm)); 1217 NameOfXMMRegister(rm));
1190 data++; 1218 data++;
1191 } 1219 }
1192 } 1220 }
1193 } else { 1221 } else {
1194 UnimplementedInstruction(); 1222 UnimplementedInstruction();
1195 } 1223 }
1196 break; 1224 break;
1197 1225
1198 case 0xF3: 1226 case 0xF3:
1199 if (*(data+1) == 0x0F) { 1227 if (*(data+1) == 0x0F) {
1200 if (*(data+2) == 0x2C) { 1228 if (*(data+2) == 0x2C) {
1201 data += 3; 1229 data += 3;
1202 data += PrintOperands("cvttss2si", REG_OPER_OP_ORDER, data); 1230 data += PrintOperands("cvttss2si", REG_OPER_OP_ORDER, data);
1231 } else if (*(data+2) == 0x5A) {
1232 data += 3;
1233 int mod, regop, rm;
1234 get_modrm(*data, &mod, &regop, &rm);
1235 AppendToBuffer("cvtss2sd %s,%s",
1236 NameOfXMMRegister(regop),
1237 NameOfXMMRegister(rm));
1238 data++;
1203 } else if (*(data+2) == 0x6F) { 1239 } else if (*(data+2) == 0x6F) {
1204 data += 3; 1240 data += 3;
1205 int mod, regop, rm; 1241 int mod, regop, rm;
1206 get_modrm(*data, &mod, &regop, &rm); 1242 get_modrm(*data, &mod, &regop, &rm);
1207 AppendToBuffer("movdqu %s,", NameOfXMMRegister(regop)); 1243 AppendToBuffer("movdqu %s,", NameOfXMMRegister(regop));
1208 data += PrintRightOperand(data); 1244 data += PrintRightOperand(data);
1209 } else if (*(data+2) == 0x7F) { 1245 } else if (*(data+2) == 0x7F) {
1210 AppendToBuffer("movdqu "); 1246 AppendToBuffer("movdqu ");
1211 data += 3; 1247 data += 3;
1212 int mod, regop, rm; 1248 int mod, regop, rm;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 } 1392 }
1357 for (int i = 6 - (pc - prev_pc); i >= 0; i--) { 1393 for (int i = 6 - (pc - prev_pc); i >= 0; i--) {
1358 fprintf(f, " "); 1394 fprintf(f, " ");
1359 } 1395 }
1360 fprintf(f, " %s\n", buffer.start()); 1396 fprintf(f, " %s\n", buffer.start());
1361 } 1397 }
1362 } 1398 }
1363 1399
1364 1400
1365 } // namespace disasm 1401 } // namespace disasm
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698