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

Side by Side Diff: src/ia32/disasm-ia32.cc

Issue 181453002: Reset trunk to 3.24.35.4 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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 | « src/ia32/debug-ia32.cc ('k') | src/ia32/full-codegen-ia32.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 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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 case 0xA2: return "cpuid"; 874 case 0xA2: return "cpuid";
875 case 0xBE: return "movsx_b"; 875 case 0xBE: return "movsx_b";
876 case 0xBF: return "movsx_w"; 876 case 0xBF: return "movsx_w";
877 case 0xB6: return "movzx_b"; 877 case 0xB6: return "movzx_b";
878 case 0xB7: return "movzx_w"; 878 case 0xB7: return "movzx_w";
879 case 0xAF: return "imul"; 879 case 0xAF: return "imul";
880 case 0xA5: return "shld"; 880 case 0xA5: return "shld";
881 case 0xAD: return "shrd"; 881 case 0xAD: return "shrd";
882 case 0xAC: return "shrd"; // 3-operand version. 882 case 0xAC: return "shrd"; // 3-operand version.
883 case 0xAB: return "bts"; 883 case 0xAB: return "bts";
884 case 0xBD: return "bsr";
885 default: return NULL; 884 default: return NULL;
886 } 885 }
887 } 886 }
888 887
889 888
890 // Disassembled instruction '*instr' and writes it into 'out_buffer'. 889 // Disassembled instruction '*instr' and writes it into 'out_buffer'.
891 int DisassemblerIA32::InstructionDecode(v8::internal::Vector<char> out_buffer, 890 int DisassemblerIA32::InstructionDecode(v8::internal::Vector<char> out_buffer,
892 byte* instr) { 891 byte* instr) {
893 tmp_buffer_pos_ = 0; // starting to write as position 0 892 tmp_buffer_pos_ = 0; // starting to write as position 0
894 byte* data = instr; 893 byte* data = instr;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 } else if ((f0byte & 0xF0) == 0x80) { 1089 } else if ((f0byte & 0xF0) == 0x80) {
1091 data += JumpConditional(data, branch_hint); 1090 data += JumpConditional(data, branch_hint);
1092 } else if (f0byte == 0xBE || f0byte == 0xBF || f0byte == 0xB6 || 1091 } else if (f0byte == 0xBE || f0byte == 0xBF || f0byte == 0xB6 ||
1093 f0byte == 0xB7 || f0byte == 0xAF) { 1092 f0byte == 0xB7 || f0byte == 0xAF) {
1094 data += 2; 1093 data += 2;
1095 data += PrintOperands(f0mnem, REG_OPER_OP_ORDER, data); 1094 data += PrintOperands(f0mnem, REG_OPER_OP_ORDER, data);
1096 } else if ((f0byte & 0xF0) == 0x90) { 1095 } else if ((f0byte & 0xF0) == 0x90) {
1097 data += SetCC(data); 1096 data += SetCC(data);
1098 } else if ((f0byte & 0xF0) == 0x40) { 1097 } else if ((f0byte & 0xF0) == 0x40) {
1099 data += CMov(data); 1098 data += CMov(data);
1100 } else if (f0byte == 0xAB || f0byte == 0xA5 || f0byte == 0xAD) { 1099 } else {
1101 // shrd, shld, bts
1102 data += 2; 1100 data += 2;
1103 AppendToBuffer("%s ", f0mnem); 1101 if (f0byte == 0xAB || f0byte == 0xA5 || f0byte == 0xAD) {
1104 int mod, regop, rm; 1102 // shrd, shld, bts
1105 get_modrm(*data, &mod, &regop, &rm); 1103 AppendToBuffer("%s ", f0mnem);
1106 data += PrintRightOperand(data); 1104 int mod, regop, rm;
1107 if (f0byte == 0xAB) { 1105 get_modrm(*data, &mod, &regop, &rm);
1108 AppendToBuffer(",%s", NameOfCPURegister(regop)); 1106 data += PrintRightOperand(data);
1107 if (f0byte == 0xAB) {
1108 AppendToBuffer(",%s", NameOfCPURegister(regop));
1109 } else {
1110 AppendToBuffer(",%s,cl", NameOfCPURegister(regop));
1111 }
1109 } else { 1112 } else {
1110 AppendToBuffer(",%s,cl", NameOfCPURegister(regop)); 1113 UnimplementedInstruction();
1111 } 1114 }
1112 } else if (f0byte == 0xBD) {
1113 data += 2;
1114 int mod, regop, rm;
1115 get_modrm(*data, &mod, &regop, &rm);
1116 AppendToBuffer("%s %s,", f0mnem, NameOfCPURegister(regop));
1117 data += PrintRightOperand(data);
1118 } else {
1119 UnimplementedInstruction();
1120 } 1115 }
1121 } 1116 }
1122 break; 1117 break;
1123 1118
1124 case 0x8F: 1119 case 0x8F:
1125 { data++; 1120 { data++;
1126 int mod, regop, rm; 1121 int mod, regop, rm;
1127 get_modrm(*data, &mod, &regop, &rm); 1122 get_modrm(*data, &mod, &regop, &rm);
1128 if (regop == eax) { 1123 if (regop == eax) {
1129 AppendToBuffer("pop "); 1124 AppendToBuffer("pop ");
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 int mod, regop, rm; 1599 int mod, regop, rm;
1605 get_modrm(*data, &mod, &regop, &rm); 1600 get_modrm(*data, &mod, &regop, &rm);
1606 AppendToBuffer("cvttss2si %s,", NameOfCPURegister(regop)); 1601 AppendToBuffer("cvttss2si %s,", NameOfCPURegister(regop));
1607 data += PrintRightXMMOperand(data); 1602 data += PrintRightXMMOperand(data);
1608 } else if (b2 == 0x5A) { 1603 } else if (b2 == 0x5A) {
1609 data += 3; 1604 data += 3;
1610 int mod, regop, rm; 1605 int mod, regop, rm;
1611 get_modrm(*data, &mod, &regop, &rm); 1606 get_modrm(*data, &mod, &regop, &rm);
1612 AppendToBuffer("cvtss2sd %s,", NameOfXMMRegister(regop)); 1607 AppendToBuffer("cvtss2sd %s,", NameOfXMMRegister(regop));
1613 data += PrintRightXMMOperand(data); 1608 data += PrintRightXMMOperand(data);
1614 } else if (b2 == 0x6F) { 1609 } else if (b2 == 0x6F) {
1615 data += 3; 1610 data += 3;
1616 int mod, regop, rm; 1611 int mod, regop, rm;
1617 get_modrm(*data, &mod, &regop, &rm); 1612 get_modrm(*data, &mod, &regop, &rm);
1618 AppendToBuffer("movdqu %s,", NameOfXMMRegister(regop)); 1613 AppendToBuffer("movdqu %s,", NameOfXMMRegister(regop));
1619 data += PrintRightXMMOperand(data); 1614 data += PrintRightXMMOperand(data);
1620 } else if (b2 == 0x7F) { 1615 } else if (b2 == 0x7F) {
1621 AppendToBuffer("movdqu "); 1616 AppendToBuffer("movdqu ");
1622 data += 3; 1617 data += 3;
1623 int mod, regop, rm; 1618 int mod, regop, rm;
1624 get_modrm(*data, &mod, &regop, &rm); 1619 get_modrm(*data, &mod, &regop, &rm);
1625 data += PrintRightXMMOperand(data); 1620 data += PrintRightXMMOperand(data);
1626 AppendToBuffer(",%s", NameOfXMMRegister(regop)); 1621 AppendToBuffer(",%s", NameOfXMMRegister(regop));
1627 } else { 1622 } else {
1628 UnimplementedInstruction(); 1623 UnimplementedInstruction();
1629 } 1624 }
1630 } else if (*(data+1) == 0xA5) { 1625 } else if (*(data+1) == 0xA5) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 fprintf(f, " "); 1763 fprintf(f, " ");
1769 } 1764 }
1770 fprintf(f, " %s\n", buffer.start()); 1765 fprintf(f, " %s\n", buffer.start());
1771 } 1766 }
1772 } 1767 }
1773 1768
1774 1769
1775 } // namespace disasm 1770 } // namespace disasm
1776 1771
1777 #endif // V8_TARGET_ARCH_IA32 1772 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/debug-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698