| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 UnimplementedInstruction(); | 1108 UnimplementedInstruction(); |
| 1109 } | 1109 } |
| 1110 } else if (*data == 0x3A) { | 1110 } else if (*data == 0x3A) { |
| 1111 data++; | 1111 data++; |
| 1112 if (*data == 0x16) { | 1112 if (*data == 0x16) { |
| 1113 data++; | 1113 data++; |
| 1114 int mod, regop, rm; | 1114 int mod, regop, rm; |
| 1115 get_modrm(*data, &mod, ®op, &rm); | 1115 get_modrm(*data, &mod, ®op, &rm); |
| 1116 int8_t imm8 = static_cast<int8_t>(data[1]); | 1116 int8_t imm8 = static_cast<int8_t>(data[1]); |
| 1117 AppendToBuffer("pextrd %s,%s,%d", | 1117 AppendToBuffer("pextrd %s,%s,%d", |
| 1118 NameOfCPURegister(regop), |
| 1119 NameOfXMMRegister(rm), |
| 1120 static_cast<int>(imm8)); |
| 1121 data += 2; |
| 1122 } else if (*data == 0x22) { |
| 1123 data++; |
| 1124 int mod, regop, rm; |
| 1125 get_modrm(*data, &mod, ®op, &rm); |
| 1126 int8_t imm8 = static_cast<int8_t>(data[1]); |
| 1127 AppendToBuffer("pinsrd %s,%s,%d", |
| 1118 NameOfXMMRegister(regop), | 1128 NameOfXMMRegister(regop), |
| 1119 NameOfXMMRegister(rm), | 1129 NameOfCPURegister(rm), |
| 1120 static_cast<int>(imm8)); | 1130 static_cast<int>(imm8)); |
| 1121 data += 2; | 1131 data += 2; |
| 1122 } else { | 1132 } else { |
| 1123 UnimplementedInstruction(); | 1133 UnimplementedInstruction(); |
| 1124 } | 1134 } |
| 1125 } else if (*data == 0x2E || *data == 0x2F) { | 1135 } else if (*data == 0x2E || *data == 0x2F) { |
| 1126 const char* mnem = (*data == 0x2E) ? "ucomisd" : "comisd"; | 1136 const char* mnem = (*data == 0x2E) ? "ucomisd" : "comisd"; |
| 1127 data++; | 1137 data++; |
| 1128 int mod, regop, rm; | 1138 int mod, regop, rm; |
| 1129 get_modrm(*data, &mod, ®op, &rm); | 1139 get_modrm(*data, &mod, ®op, &rm); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 } else if (*data == 0x70) { | 1185 } else if (*data == 0x70) { |
| 1176 data++; | 1186 data++; |
| 1177 int mod, regop, rm; | 1187 int mod, regop, rm; |
| 1178 get_modrm(*data, &mod, ®op, &rm); | 1188 get_modrm(*data, &mod, ®op, &rm); |
| 1179 int8_t imm8 = static_cast<int8_t>(data[1]); | 1189 int8_t imm8 = static_cast<int8_t>(data[1]); |
| 1180 AppendToBuffer("pshufd %s,%s,%d", | 1190 AppendToBuffer("pshufd %s,%s,%d", |
| 1181 NameOfXMMRegister(regop), | 1191 NameOfXMMRegister(regop), |
| 1182 NameOfXMMRegister(rm), | 1192 NameOfXMMRegister(rm), |
| 1183 static_cast<int>(imm8)); | 1193 static_cast<int>(imm8)); |
| 1184 data += 2; | 1194 data += 2; |
| 1195 } else if (*data == 0xF3) { |
| 1196 data++; |
| 1197 int mod, regop, rm; |
| 1198 get_modrm(*data, &mod, ®op, &rm); |
| 1199 AppendToBuffer("psllq %s,%s", |
| 1200 NameOfXMMRegister(regop), |
| 1201 NameOfXMMRegister(rm)); |
| 1202 data++; |
| 1185 } else if (*data == 0x73) { | 1203 } else if (*data == 0x73) { |
| 1186 data++; | 1204 data++; |
| 1187 int mod, regop, rm; | 1205 int mod, regop, rm; |
| 1188 get_modrm(*data, &mod, ®op, &rm); | 1206 get_modrm(*data, &mod, ®op, &rm); |
| 1189 int8_t imm8 = static_cast<int8_t>(data[1]); | 1207 int8_t imm8 = static_cast<int8_t>(data[1]); |
| 1190 AppendToBuffer("psllq %s,%d", | 1208 ASSERT(regop == esi || regop == edx); |
| 1209 AppendToBuffer("%s %s,%d", |
| 1210 (regop == esi) ? "psllq" : "psrlq", |
| 1191 NameOfXMMRegister(rm), | 1211 NameOfXMMRegister(rm), |
| 1192 static_cast<int>(imm8)); | 1212 static_cast<int>(imm8)); |
| 1193 data += 2; | 1213 data += 2; |
| 1214 } else if (*data == 0xD3) { |
| 1215 data++; |
| 1216 int mod, regop, rm; |
| 1217 get_modrm(*data, &mod, ®op, &rm); |
| 1218 AppendToBuffer("psrlq %s,%s", |
| 1219 NameOfXMMRegister(regop), |
| 1220 NameOfXMMRegister(rm)); |
| 1221 data++; |
| 1194 } else if (*data == 0x7F) { | 1222 } else if (*data == 0x7F) { |
| 1195 AppendToBuffer("movdqa "); | 1223 AppendToBuffer("movdqa "); |
| 1196 data++; | 1224 data++; |
| 1197 int mod, regop, rm; | 1225 int mod, regop, rm; |
| 1198 get_modrm(*data, &mod, ®op, &rm); | 1226 get_modrm(*data, &mod, ®op, &rm); |
| 1199 data += PrintRightOperand(data); | 1227 data += PrintRightOperand(data); |
| 1200 AppendToBuffer(",%s", NameOfXMMRegister(regop)); | 1228 AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
| 1201 } else if (*data == 0x7E) { | 1229 } else if (*data == 0x7E) { |
| 1202 data++; | 1230 data++; |
| 1203 int mod, regop, rm; | 1231 int mod, regop, rm; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1221 data += PrintRightOperand(data); | 1249 data += PrintRightOperand(data); |
| 1222 AppendToBuffer(",%s", NameOfXMMRegister(regop)); | 1250 AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
| 1223 } else if (*data == 0xEF) { | 1251 } else if (*data == 0xEF) { |
| 1224 data++; | 1252 data++; |
| 1225 int mod, regop, rm; | 1253 int mod, regop, rm; |
| 1226 get_modrm(*data, &mod, ®op, &rm); | 1254 get_modrm(*data, &mod, ®op, &rm); |
| 1227 AppendToBuffer("pxor %s,%s", | 1255 AppendToBuffer("pxor %s,%s", |
| 1228 NameOfXMMRegister(regop), | 1256 NameOfXMMRegister(regop), |
| 1229 NameOfXMMRegister(rm)); | 1257 NameOfXMMRegister(rm)); |
| 1230 data++; | 1258 data++; |
| 1259 } else if (*data == 0xEB) { |
| 1260 data++; |
| 1261 int mod, regop, rm; |
| 1262 get_modrm(*data, &mod, ®op, &rm); |
| 1263 AppendToBuffer("por %s,%s", |
| 1264 NameOfXMMRegister(regop), |
| 1265 NameOfXMMRegister(rm)); |
| 1266 data++; |
| 1231 } else { | 1267 } else { |
| 1232 UnimplementedInstruction(); | 1268 UnimplementedInstruction(); |
| 1233 } | 1269 } |
| 1234 } else { | 1270 } else { |
| 1235 UnimplementedInstruction(); | 1271 UnimplementedInstruction(); |
| 1236 } | 1272 } |
| 1237 break; | 1273 break; |
| 1238 | 1274 |
| 1239 case 0xFE: | 1275 case 0xFE: |
| 1240 { data++; | 1276 { data++; |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1552 fprintf(f, " "); | 1588 fprintf(f, " "); |
| 1553 } | 1589 } |
| 1554 fprintf(f, " %s\n", buffer.start()); | 1590 fprintf(f, " %s\n", buffer.start()); |
| 1555 } | 1591 } |
| 1556 } | 1592 } |
| 1557 | 1593 |
| 1558 | 1594 |
| 1559 } // namespace disasm | 1595 } // namespace disasm |
| 1560 | 1596 |
| 1561 #endif // V8_TARGET_ARCH_IA32 | 1597 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |