| OLD | NEW |
| 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/disassembler.h" | 5 #include "vm/disassembler.h" |
| 6 | 6 |
| 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 8 #if defined(TARGET_ARCH_X64) | 8 #if defined(TARGET_ARCH_X64) |
| 9 #include "platform/utils.h" | 9 #include "platform/utils.h" |
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
| (...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 AppendToBuffer(", %s", NameOfXMMRegister(regop)); | 1261 AppendToBuffer(", %s", NameOfXMMRegister(regop)); |
| 1262 } else if (opcode == 0xD6) { | 1262 } else if (opcode == 0xD6) { |
| 1263 AppendToBuffer("movq "); | 1263 AppendToBuffer("movq "); |
| 1264 current += PrintRightXMMOperand(current); | 1264 current += PrintRightXMMOperand(current); |
| 1265 AppendToBuffer(", %s", NameOfXMMRegister(regop)); | 1265 AppendToBuffer(", %s", NameOfXMMRegister(regop)); |
| 1266 } else if (opcode == 0x50) { | 1266 } else if (opcode == 0x50) { |
| 1267 AppendToBuffer("movmskpd %s,", NameOfCPURegister(regop)); | 1267 AppendToBuffer("movmskpd %s,", NameOfCPURegister(regop)); |
| 1268 current += PrintRightXMMOperand(current); | 1268 current += PrintRightXMMOperand(current); |
| 1269 } else { | 1269 } else { |
| 1270 const char* mnemonic = "?"; | 1270 const char* mnemonic = "?"; |
| 1271 if (opcode == 0x54) { | 1271 if (opcode == 0x14) { |
| 1272 mnemonic = "unpcklpd"; |
| 1273 } else if (opcode == 0x15) { |
| 1274 mnemonic = "unpckhpd"; |
| 1275 } else if (opcode == 0x54) { |
| 1272 mnemonic = "andpd"; | 1276 mnemonic = "andpd"; |
| 1273 } else if (opcode == 0x56) { | 1277 } else if (opcode == 0x56) { |
| 1274 mnemonic = "orpd"; | 1278 mnemonic = "orpd"; |
| 1275 } else if (opcode == 0x57) { | 1279 } else if (opcode == 0x57) { |
| 1276 mnemonic = "xorpd"; | 1280 mnemonic = "xorpd"; |
| 1277 } else if (opcode == 0x2E) { | 1281 } else if (opcode == 0x2E) { |
| 1278 mnemonic = "ucomisd"; | 1282 mnemonic = "ucomisd"; |
| 1279 } else if (opcode == 0x2F) { | 1283 } else if (opcode == 0x2F) { |
| 1280 mnemonic = "comisd"; | 1284 mnemonic = "comisd"; |
| 1281 } else { | 1285 } else { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1418 // RDTSC or CPUID | 1422 // RDTSC or CPUID |
| 1419 AppendToBuffer("%s", mnemonic); | 1423 AppendToBuffer("%s", mnemonic); |
| 1420 | 1424 |
| 1421 } else if ((opcode & 0xF0) == 0x40) { | 1425 } else if ((opcode & 0xF0) == 0x40) { |
| 1422 // CMOVcc: conditional move. | 1426 // CMOVcc: conditional move. |
| 1423 int condition = opcode & 0x0F; | 1427 int condition = opcode & 0x0F; |
| 1424 const InstructionDesc& idesc = cmov_instructions[condition]; | 1428 const InstructionDesc& idesc = cmov_instructions[condition]; |
| 1425 byte_size_operand_ = idesc.byte_size_operation; | 1429 byte_size_operand_ = idesc.byte_size_operation; |
| 1426 current += PrintOperands(idesc.mnem, idesc.op_order_, current); | 1430 current += PrintOperands(idesc.mnem, idesc.op_order_, current); |
| 1427 | 1431 |
| 1428 } else if (opcode == 0x51 || opcode == 0x52 || opcode == 0x53 || | 1432 } else if (opcode == 0x12 || opcode == 0x14 || opcode == 0x15 || |
| 1429 opcode == 0x54 || opcode == 0x56 || opcode == 0x57 || | 1433 opcode == 0x16 || opcode == 0x51 || opcode == 0x52 || |
| 1430 opcode == 0x58 || opcode == 0x59 || opcode == 0x5C || | 1434 opcode == 0x53 || opcode == 0x54 || opcode == 0x56 || |
| 1431 opcode == 0x5D || opcode == 0x5E || opcode == 0x5F) { | 1435 opcode == 0x57 || opcode == 0x58 || opcode == 0x59 || |
| 1436 opcode == 0x5C || opcode == 0x5D || opcode == 0x5E || |
| 1437 opcode == 0x5F) { |
| 1432 const char* mnemonic = NULL; | 1438 const char* mnemonic = NULL; |
| 1433 switch (opcode) { | 1439 switch (opcode) { |
| 1440 case 0x12: mnemonic = "movhlps"; break; |
| 1441 case 0x14: mnemonic = "unpcklps"; break; |
| 1442 case 0x15: mnemonic = "unpckhps"; break; |
| 1443 case 0x16: mnemonic = "movlhps"; break; |
| 1434 case 0x51: mnemonic = "sqrtps"; break; | 1444 case 0x51: mnemonic = "sqrtps"; break; |
| 1435 case 0x52: mnemonic = "rsqrtps"; break; | 1445 case 0x52: mnemonic = "rsqrtps"; break; |
| 1436 case 0x53: mnemonic = "rcpps"; break; | 1446 case 0x53: mnemonic = "rcpps"; break; |
| 1437 case 0x54: mnemonic = "andps"; break; | 1447 case 0x54: mnemonic = "andps"; break; |
| 1438 case 0x56: mnemonic = "orps"; break; | 1448 case 0x56: mnemonic = "orps"; break; |
| 1439 case 0x57: mnemonic = "xorps"; break; | 1449 case 0x57: mnemonic = "xorps"; break; |
| 1440 case 0x58: mnemonic = "addps"; break; | 1450 case 0x58: mnemonic = "addps"; break; |
| 1441 case 0x59: mnemonic = "mulps"; break; | 1451 case 0x59: mnemonic = "mulps"; break; |
| 1442 case 0x5C: mnemonic = "subps"; break; | 1452 case 0x5C: mnemonic = "subps"; break; |
| 1443 case 0x5D: mnemonic = "minps"; break; | 1453 case 0x5D: mnemonic = "minps"; break; |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1918 pc); | 1928 pc); |
| 1919 pc += instruction_length; | 1929 pc += instruction_length; |
| 1920 } | 1930 } |
| 1921 | 1931 |
| 1922 return; | 1932 return; |
| 1923 } | 1933 } |
| 1924 | 1934 |
| 1925 } // namespace dart | 1935 } // namespace dart |
| 1926 | 1936 |
| 1927 #endif // defined TARGET_ARCH_X64 | 1937 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |