| 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_IA32) | 8 #if defined(TARGET_ARCH_IA32) |
| 9 #include "platform/utils.h" | 9 #include "platform/utils.h" |
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
| (...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1588 int mod, regop, rm; | 1588 int mod, regop, rm; |
| 1589 GetModRm(*data, &mod, ®op, &rm); | 1589 GetModRm(*data, &mod, ®op, &rm); |
| 1590 Print("movsd "); | 1590 Print("movsd "); |
| 1591 PrintXmmRegister(regop); | 1591 PrintXmmRegister(regop); |
| 1592 Print(","); | 1592 Print(","); |
| 1593 data += PrintRightOperand(data); | 1593 data += PrintRightOperand(data); |
| 1594 } else { | 1594 } else { |
| 1595 const char* mnem = "? 0xF2"; | 1595 const char* mnem = "? 0xF2"; |
| 1596 switch (b2) { | 1596 switch (b2) { |
| 1597 case 0x2A: mnem = "cvtsi2sd"; break; | 1597 case 0x2A: mnem = "cvtsi2sd"; break; |
| 1598 case 0x2C: mnem = "cvttsd2si"; break; |
| 1598 case 0x2D: mnem = "cvtsd2i"; break; | 1599 case 0x2D: mnem = "cvtsd2i"; break; |
| 1599 case 0x51: mnem = "sqrtsd"; break; | 1600 case 0x51: mnem = "sqrtsd"; break; |
| 1600 case 0x58: mnem = "addsd"; break; | 1601 case 0x58: mnem = "addsd"; break; |
| 1601 case 0x59: mnem = "mulsd"; break; | 1602 case 0x59: mnem = "mulsd"; break; |
| 1602 case 0x5A: mnem = "cvtsd2ss"; break; | 1603 case 0x5A: mnem = "cvtsd2ss"; break; |
| 1603 case 0x5C: mnem = "subsd"; break; | 1604 case 0x5C: mnem = "subsd"; break; |
| 1604 case 0x5E: mnem = "divsd"; break; | 1605 case 0x5E: mnem = "divsd"; break; |
| 1606 default: UNIMPLEMENTED(); |
| 1605 } | 1607 } |
| 1606 data += 3; | 1608 data += 3; |
| 1607 int mod, regop, rm; | 1609 int mod, regop, rm; |
| 1608 GetModRm(*data, &mod, ®op, &rm); | 1610 GetModRm(*data, &mod, ®op, &rm); |
| 1609 if (b2 == 0x2A) { | 1611 if (b2 == 0x2A) { |
| 1610 Print(mnem); | 1612 Print(mnem); |
| 1611 Print(" "); | 1613 Print(" "); |
| 1612 PrintXmmRegister(regop); | 1614 PrintXmmRegister(regop); |
| 1613 Print(","); | 1615 Print(","); |
| 1614 data += PrintRightOperand(data); | 1616 data += PrintRightOperand(data); |
| 1615 } else if (b2 == 0x2D) { | 1617 } else if ((b2 == 0x2D) || (b2 == 0x2C)) { |
| 1616 Print(mnem); | 1618 Print(mnem); |
| 1617 Print(" "); | 1619 Print(" "); |
| 1618 PrintCPURegister(regop); | 1620 PrintCPURegister(regop); |
| 1619 Print(","); | 1621 Print(","); |
| 1620 PrintXmmRegister(rm); | 1622 PrintXmmRegister(rm); |
| 1621 data++; | 1623 data++; |
| 1622 } else { | 1624 } else { |
| 1623 Print(mnem); | 1625 Print(mnem); |
| 1624 Print(" "); | 1626 Print(" "); |
| 1625 PrintXmmRegister(regop); | 1627 PrintXmmRegister(regop); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 human_buffer, | 1702 human_buffer, |
| 1701 sizeof(human_buffer), | 1703 sizeof(human_buffer), |
| 1702 pc); | 1704 pc); |
| 1703 pc += instruction_length; | 1705 pc += instruction_length; |
| 1704 } | 1706 } |
| 1705 } | 1707 } |
| 1706 | 1708 |
| 1707 } // namespace dart | 1709 } // namespace dart |
| 1708 | 1710 |
| 1709 #endif // defined TARGET_ARCH_IA32 | 1711 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |