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

Side by Side Diff: runtime/vm/disassembler_ia32.cc

Issue 23129014: Add packed add and subtract to IA32 and X64 assemblers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/disassembler_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 } else if (*data == 0x89) { 1498 } else if (*data == 0x89) {
1499 data++; 1499 data++;
1500 int mod, regop, rm; 1500 int mod, regop, rm;
1501 GetModRm(*data, &mod, &regop, &rm); 1501 GetModRm(*data, &mod, &regop, &rm);
1502 Print("mov_w "); 1502 Print("mov_w ");
1503 data += PrintRightOperand(data); 1503 data += PrintRightOperand(data);
1504 Print(","); 1504 Print(",");
1505 PrintCPURegister(regop); 1505 PrintCPURegister(regop);
1506 } else if (*data == 0x0F) { 1506 } else if (*data == 0x0F) {
1507 data++; 1507 data++;
1508 if (*data == 0x2F) { 1508 if (*data == 0X6E) {
1509 data++; 1509 data++;
1510 int mod, regop, rm; 1510 int mod, regop, rm;
1511 GetModRm(*data, &mod, &regop, &rm); 1511 GetModRm(*data, &mod, &regop, &rm);
1512 Print("comisd ");
1513 PrintXmmRegister(regop);
1514 Print(",");
1515 PrintXmmRegister(rm);
1516 data++;
1517 } else if (*data == 0X6E) {
1518 data++;
1519 int mod, regop, rm;
1520 GetModRm(*data, &mod, &regop, &rm);
1521 Print("movd "); 1512 Print("movd ");
1522 PrintXmmRegister(regop); 1513 PrintXmmRegister(regop);
1523 Print(","); 1514 Print(",");
1524 PrintCPURegister(rm); 1515 PrintCPURegister(rm);
1525 data++; 1516 data++;
1526 } else if (*data == 0X7E) { 1517 } else if (*data == 0X7E) {
1527 data++; 1518 data++;
1528 int mod, regop, rm; 1519 int mod, regop, rm;
1529 GetModRm(*data, &mod, &regop, &rm); 1520 GetModRm(*data, &mod, &regop, &rm);
1530 Print("movd "); 1521 Print("movd ");
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 PrintXmmRegister(rm); 1593 PrintXmmRegister(rm);
1603 data += 2; 1594 data += 2;
1604 } else if (*data == 0x15) { 1595 } else if (*data == 0x15) {
1605 int mod, regop, rm; 1596 int mod, regop, rm;
1606 GetModRm(*(data+1), &mod, &regop, &rm); 1597 GetModRm(*(data+1), &mod, &regop, &rm);
1607 Print("unpckhpd "); 1598 Print("unpckhpd ");
1608 PrintXmmRegister(regop); 1599 PrintXmmRegister(regop);
1609 Print(","); 1600 Print(",");
1610 PrintXmmRegister(rm); 1601 PrintXmmRegister(rm);
1611 data += 2; 1602 data += 2;
1603 } else if ((*data == 0xFE) || (*data == 0xFA) || (*data == 0x2F)) {
1604 const char* mnemonic = NULL;
1605 if (*data == 0xFE) mnemonic = "paddd ";
1606 if (*data == 0xFA) mnemonic = "psubd ";
1607 if (*data == 0x2F) mnemonic = "comisd ";
1608 int mod, regop, rm;
1609 GetModRm(*(data+1), &mod, &regop, &rm);
1610 Print(mnemonic);
1611 PrintXmmRegister(regop);
1612 Print(",");
1613 PrintXmmRegister(rm);
1614 data += 2;
1612 } else { 1615 } else {
1613 UNIMPLEMENTED(); 1616 UNIMPLEMENTED();
1614 } 1617 }
1615 } else if (*data == 0x90) { 1618 } else if (*data == 0x90) {
1616 data++; 1619 data++;
1617 Print("nop"); 1620 Print("nop");
1618 } else { 1621 } else {
1619 UNIMPLEMENTED(); 1622 UNIMPLEMENTED();
1620 } 1623 }
1621 break; 1624 break;
1622 1625
1623 case 0xFE: 1626 case 0xFE:
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 pc); 1821 pc);
1819 pc += instruction_length; 1822 pc += instruction_length;
1820 } 1823 }
1821 1824
1822 return; 1825 return;
1823 } 1826 }
1824 1827
1825 } // namespace dart 1828 } // namespace dart
1826 1829
1827 #endif // defined TARGET_ARCH_IA32 1830 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/disassembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698