| 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 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1465 data += 3; | 1465 data += 3; |
| 1466 int mod, regop, rm; | 1466 int mod, regop, rm; |
| 1467 get_modrm(*data, &mod, ®op, &rm); | 1467 get_modrm(*data, &mod, ®op, &rm); |
| 1468 AppendToBuffer("cvtsd2ss %s,", NameOfXMMRegister(regop)); | 1468 AppendToBuffer("cvtsd2ss %s,", NameOfXMMRegister(regop)); |
| 1469 data += PrintRightXMMOperand(data); | 1469 data += PrintRightXMMOperand(data); |
| 1470 } else { | 1470 } else { |
| 1471 const char* mnem = "?"; | 1471 const char* mnem = "?"; |
| 1472 switch (b2) { | 1472 switch (b2) { |
| 1473 case 0x2A: mnem = "cvtsi2sd"; break; | 1473 case 0x2A: mnem = "cvtsi2sd"; break; |
| 1474 case 0x2C: mnem = "cvttsd2si"; break; | 1474 case 0x2C: mnem = "cvttsd2si"; break; |
| 1475 case 0x2D: mnem = "cvtsd2si"; break; |
| 1475 case 0x51: mnem = "sqrtsd"; break; | 1476 case 0x51: mnem = "sqrtsd"; break; |
| 1476 case 0x58: mnem = "addsd"; break; | 1477 case 0x58: mnem = "addsd"; break; |
| 1477 case 0x59: mnem = "mulsd"; break; | 1478 case 0x59: mnem = "mulsd"; break; |
| 1478 case 0x5C: mnem = "subsd"; break; | 1479 case 0x5C: mnem = "subsd"; break; |
| 1479 case 0x5E: mnem = "divsd"; break; | 1480 case 0x5E: mnem = "divsd"; break; |
| 1480 } | 1481 } |
| 1481 data += 3; | 1482 data += 3; |
| 1482 int mod, regop, rm; | 1483 int mod, regop, rm; |
| 1483 get_modrm(*data, &mod, ®op, &rm); | 1484 get_modrm(*data, &mod, ®op, &rm); |
| 1484 if (b2 == 0x2A) { | 1485 if (b2 == 0x2A) { |
| 1485 AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); | 1486 AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); |
| 1486 data += PrintRightOperand(data); | 1487 data += PrintRightOperand(data); |
| 1487 } else if (b2 == 0x2C) { | 1488 } else if (b2 == 0x2C || b2 == 0x2D) { |
| 1488 AppendToBuffer("%s %s,", mnem, NameOfCPURegister(regop)); | 1489 AppendToBuffer("%s %s,", mnem, NameOfCPURegister(regop)); |
| 1489 data += PrintRightXMMOperand(data); | 1490 data += PrintRightXMMOperand(data); |
| 1490 } else if (b2 == 0xC2) { | 1491 } else if (b2 == 0xC2) { |
| 1491 // Intel manual 2A, Table 3-18. | 1492 // Intel manual 2A, Table 3-18. |
| 1492 const char* const pseudo_op[] = { | 1493 const char* const pseudo_op[] = { |
| 1493 "cmpeqsd", | 1494 "cmpeqsd", |
| 1494 "cmpltsd", | 1495 "cmpltsd", |
| 1495 "cmplesd", | 1496 "cmplesd", |
| 1496 "cmpunordsd", | 1497 "cmpunordsd", |
| 1497 "cmpneqsd", | 1498 "cmpneqsd", |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1699 fprintf(f, " "); | 1700 fprintf(f, " "); |
| 1700 } | 1701 } |
| 1701 fprintf(f, " %s\n", buffer.start()); | 1702 fprintf(f, " %s\n", buffer.start()); |
| 1702 } | 1703 } |
| 1703 } | 1704 } |
| 1704 | 1705 |
| 1705 | 1706 |
| 1706 } // namespace disasm | 1707 } // namespace disasm |
| 1707 | 1708 |
| 1708 #endif // V8_TARGET_ARCH_IA32 | 1709 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |