OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 // SHLD, SHRD (double-precision shift), BTS (bit set). | 1319 // SHLD, SHRD (double-precision shift), BTS (bit set). |
1320 AppendToBuffer("%s ", mnemonic); | 1320 AppendToBuffer("%s ", mnemonic); |
1321 int mod, regop, rm; | 1321 int mod, regop, rm; |
1322 get_modrm(*current, &mod, ®op, &rm); | 1322 get_modrm(*current, &mod, ®op, &rm); |
1323 current += PrintRightOperand(current); | 1323 current += PrintRightOperand(current); |
1324 if (opcode == 0xAB) { | 1324 if (opcode == 0xAB) { |
1325 AppendToBuffer(",%s", NameOfCPURegister(regop)); | 1325 AppendToBuffer(",%s", NameOfCPURegister(regop)); |
1326 } else { | 1326 } else { |
1327 AppendToBuffer(",%s,cl", NameOfCPURegister(regop)); | 1327 AppendToBuffer(",%s,cl", NameOfCPURegister(regop)); |
1328 } | 1328 } |
| 1329 } else if (opcode == 0xBD) { |
| 1330 AppendToBuffer("%s%c ", mnemonic, operand_size_code()); |
| 1331 int mod, regop, rm; |
| 1332 get_modrm(*current, &mod, ®op, &rm); |
| 1333 AppendToBuffer("%s,", NameOfCPURegister(regop)); |
| 1334 current += PrintRightOperand(current); |
1329 } else { | 1335 } else { |
1330 UnimplementedInstruction(); | 1336 UnimplementedInstruction(); |
1331 } | 1337 } |
1332 return static_cast<int>(current - data); | 1338 return static_cast<int>(current - data); |
1333 } | 1339 } |
1334 | 1340 |
1335 | 1341 |
1336 // Mnemonics for two-byte opcode instructions starting with 0x0F. | 1342 // Mnemonics for two-byte opcode instructions starting with 0x0F. |
1337 // The argument is the second byte of the two-byte opcode. | 1343 // The argument is the second byte of the two-byte opcode. |
1338 // Returns NULL if the instruction is not handled here. | 1344 // Returns NULL if the instruction is not handled here. |
(...skipping 22 matching lines...) Expand all Loading... |
1361 case 0xAB: | 1367 case 0xAB: |
1362 return "bts"; | 1368 return "bts"; |
1363 case 0xAD: | 1369 case 0xAD: |
1364 return "shrd"; | 1370 return "shrd"; |
1365 case 0xAF: | 1371 case 0xAF: |
1366 return "imul"; | 1372 return "imul"; |
1367 case 0xB6: | 1373 case 0xB6: |
1368 return "movzxb"; | 1374 return "movzxb"; |
1369 case 0xB7: | 1375 case 0xB7: |
1370 return "movzxw"; | 1376 return "movzxw"; |
| 1377 case 0xBD: |
| 1378 return "bsr"; |
1371 case 0xBE: | 1379 case 0xBE: |
1372 return "movsxb"; | 1380 return "movsxb"; |
1373 case 0xBF: | 1381 case 0xBF: |
1374 return "movsxw"; | 1382 return "movsxw"; |
1375 default: | 1383 default: |
1376 return NULL; | 1384 return NULL; |
1377 } | 1385 } |
1378 } | 1386 } |
1379 | 1387 |
1380 | 1388 |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1919 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { | 1927 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { |
1920 fprintf(f, " "); | 1928 fprintf(f, " "); |
1921 } | 1929 } |
1922 fprintf(f, " %s\n", buffer.start()); | 1930 fprintf(f, " %s\n", buffer.start()); |
1923 } | 1931 } |
1924 } | 1932 } |
1925 | 1933 |
1926 } // namespace disasm | 1934 } // namespace disasm |
1927 | 1935 |
1928 #endif // V8_TARGET_ARCH_X64 | 1936 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |