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 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 get_modrm(*current, &mod, ®op, &rm); | 1146 get_modrm(*current, &mod, ®op, &rm); |
1147 AppendToBuffer("cvtsd2si%c %s,", | 1147 AppendToBuffer("cvtsd2si%c %s,", |
1148 operand_size_code(), NameOfCPURegister(regop)); | 1148 operand_size_code(), NameOfCPURegister(regop)); |
1149 current += PrintRightXMMOperand(current); | 1149 current += PrintRightXMMOperand(current); |
1150 } else if ((opcode & 0xF8) == 0x58 || opcode == 0x51) { | 1150 } else if ((opcode & 0xF8) == 0x58 || opcode == 0x51) { |
1151 // XMM arithmetic. Mnemonic was retrieved at the start of this function. | 1151 // XMM arithmetic. Mnemonic was retrieved at the start of this function. |
1152 int mod, regop, rm; | 1152 int mod, regop, rm; |
1153 get_modrm(*current, &mod, ®op, &rm); | 1153 get_modrm(*current, &mod, ®op, &rm); |
1154 AppendToBuffer("%s %s,", mnemonic, NameOfXMMRegister(regop)); | 1154 AppendToBuffer("%s %s,", mnemonic, NameOfXMMRegister(regop)); |
1155 current += PrintRightXMMOperand(current); | 1155 current += PrintRightXMMOperand(current); |
| 1156 } else if (opcode == 0xC2) { |
| 1157 // Intel manual 2A, Table 3-18. |
| 1158 int mod, regop, rm; |
| 1159 get_modrm(*current, &mod, ®op, &rm); |
| 1160 const char* const pseudo_op[] = { |
| 1161 "cmpeqsd", |
| 1162 "cmpltsd", |
| 1163 "cmplesd", |
| 1164 "cmpunordsd", |
| 1165 "cmpneqsd", |
| 1166 "cmpnltsd", |
| 1167 "cmpnlesd", |
| 1168 "cmpordsd" |
| 1169 }; |
| 1170 AppendToBuffer("%s %s,%s", |
| 1171 pseudo_op[current[1]], |
| 1172 NameOfXMMRegister(regop), |
| 1173 NameOfXMMRegister(rm)); |
| 1174 current += 2; |
1156 } else { | 1175 } else { |
1157 UnimplementedInstruction(); | 1176 UnimplementedInstruction(); |
1158 } | 1177 } |
1159 } else if (group_1_prefix_ == 0xF3) { | 1178 } else if (group_1_prefix_ == 0xF3) { |
1160 // Instructions with prefix 0xF3. | 1179 // Instructions with prefix 0xF3. |
1161 if (opcode == 0x11 || opcode == 0x10) { | 1180 if (opcode == 0x11 || opcode == 0x10) { |
1162 // MOVSS: Move scalar double-precision fp to/from/between XMM registers. | 1181 // MOVSS: Move scalar double-precision fp to/from/between XMM registers. |
1163 AppendToBuffer("movss "); | 1182 AppendToBuffer("movss "); |
1164 int mod, regop, rm; | 1183 int mod, regop, rm; |
1165 get_modrm(*current, &mod, ®op, &rm); | 1184 get_modrm(*current, &mod, ®op, &rm); |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1865 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { | 1884 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { |
1866 fprintf(f, " "); | 1885 fprintf(f, " "); |
1867 } | 1886 } |
1868 fprintf(f, " %s\n", buffer.start()); | 1887 fprintf(f, " %s\n", buffer.start()); |
1869 } | 1888 } |
1870 } | 1889 } |
1871 | 1890 |
1872 } // namespace disasm | 1891 } // namespace disasm |
1873 | 1892 |
1874 #endif // V8_TARGET_ARCH_X64 | 1893 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |