| 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 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 } else if (*data == 0x70) { | 1175 } else if (*data == 0x70) { |
| 1176 data++; | 1176 data++; |
| 1177 int mod, regop, rm; | 1177 int mod, regop, rm; |
| 1178 get_modrm(*data, &mod, ®op, &rm); | 1178 get_modrm(*data, &mod, ®op, &rm); |
| 1179 int8_t imm8 = static_cast<int8_t>(data[1]); | 1179 int8_t imm8 = static_cast<int8_t>(data[1]); |
| 1180 AppendToBuffer("pshufd %s,%s,%d", | 1180 AppendToBuffer("pshufd %s,%s,%d", |
| 1181 NameOfXMMRegister(regop), | 1181 NameOfXMMRegister(regop), |
| 1182 NameOfXMMRegister(rm), | 1182 NameOfXMMRegister(rm), |
| 1183 static_cast<int>(imm8)); | 1183 static_cast<int>(imm8)); |
| 1184 data += 2; | 1184 data += 2; |
| 1185 } else if (*data == 0xF3) { |
| 1186 data++; |
| 1187 int mod, regop, rm; |
| 1188 get_modrm(*data, &mod, ®op, &rm); |
| 1189 AppendToBuffer("psllq %s,%s", |
| 1190 NameOfXMMRegister(regop), |
| 1191 NameOfXMMRegister(rm)); |
| 1192 data++; |
| 1185 } else if (*data == 0x73) { | 1193 } else if (*data == 0x73) { |
| 1186 data++; | 1194 data++; |
| 1187 int mod, regop, rm; | 1195 int mod, regop, rm; |
| 1188 get_modrm(*data, &mod, ®op, &rm); | 1196 get_modrm(*data, &mod, ®op, &rm); |
| 1189 int8_t imm8 = static_cast<int8_t>(data[1]); | 1197 int8_t imm8 = static_cast<int8_t>(data[1]); |
| 1190 AppendToBuffer("psllq %s,%d", | 1198 ASSERT(regop == esi || regop == edx); |
| 1199 AppendToBuffer("%s %s,%d", |
| 1200 (regop == esi) ? "psllq" : "psrlq", |
| 1191 NameOfXMMRegister(rm), | 1201 NameOfXMMRegister(rm), |
| 1192 static_cast<int>(imm8)); | 1202 static_cast<int>(imm8)); |
| 1193 data += 2; | 1203 data += 2; |
| 1204 } else if (*data == 0xD3) { |
| 1205 data++; |
| 1206 int mod, regop, rm; |
| 1207 get_modrm(*data, &mod, ®op, &rm); |
| 1208 AppendToBuffer("psrlq %s,%s", |
| 1209 NameOfXMMRegister(regop), |
| 1210 NameOfXMMRegister(rm)); |
| 1211 data++; |
| 1194 } else if (*data == 0x7F) { | 1212 } else if (*data == 0x7F) { |
| 1195 AppendToBuffer("movdqa "); | 1213 AppendToBuffer("movdqa "); |
| 1196 data++; | 1214 data++; |
| 1197 int mod, regop, rm; | 1215 int mod, regop, rm; |
| 1198 get_modrm(*data, &mod, ®op, &rm); | 1216 get_modrm(*data, &mod, ®op, &rm); |
| 1199 data += PrintRightOperand(data); | 1217 data += PrintRightOperand(data); |
| 1200 AppendToBuffer(",%s", NameOfXMMRegister(regop)); | 1218 AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
| 1201 } else if (*data == 0x7E) { | 1219 } else if (*data == 0x7E) { |
| 1202 data++; | 1220 data++; |
| 1203 int mod, regop, rm; | 1221 int mod, regop, rm; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1221 data += PrintRightOperand(data); | 1239 data += PrintRightOperand(data); |
| 1222 AppendToBuffer(",%s", NameOfXMMRegister(regop)); | 1240 AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
| 1223 } else if (*data == 0xEF) { | 1241 } else if (*data == 0xEF) { |
| 1224 data++; | 1242 data++; |
| 1225 int mod, regop, rm; | 1243 int mod, regop, rm; |
| 1226 get_modrm(*data, &mod, ®op, &rm); | 1244 get_modrm(*data, &mod, ®op, &rm); |
| 1227 AppendToBuffer("pxor %s,%s", | 1245 AppendToBuffer("pxor %s,%s", |
| 1228 NameOfXMMRegister(regop), | 1246 NameOfXMMRegister(regop), |
| 1229 NameOfXMMRegister(rm)); | 1247 NameOfXMMRegister(rm)); |
| 1230 data++; | 1248 data++; |
| 1249 } else if (*data == 0xEB) { |
| 1250 data++; |
| 1251 int mod, regop, rm; |
| 1252 get_modrm(*data, &mod, ®op, &rm); |
| 1253 AppendToBuffer("por %s,%s", |
| 1254 NameOfXMMRegister(regop), |
| 1255 NameOfXMMRegister(rm)); |
| 1256 data++; |
| 1231 } else { | 1257 } else { |
| 1232 UnimplementedInstruction(); | 1258 UnimplementedInstruction(); |
| 1233 } | 1259 } |
| 1234 } else { | 1260 } else { |
| 1235 UnimplementedInstruction(); | 1261 UnimplementedInstruction(); |
| 1236 } | 1262 } |
| 1237 break; | 1263 break; |
| 1238 | 1264 |
| 1239 case 0xFE: | 1265 case 0xFE: |
| 1240 { data++; | 1266 { data++; |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1552 fprintf(f, " "); | 1578 fprintf(f, " "); |
| 1553 } | 1579 } |
| 1554 fprintf(f, " %s\n", buffer.start()); | 1580 fprintf(f, " %s\n", buffer.start()); |
| 1555 } | 1581 } |
| 1556 } | 1582 } |
| 1557 | 1583 |
| 1558 | 1584 |
| 1559 } // namespace disasm | 1585 } // namespace disasm |
| 1560 | 1586 |
| 1561 #endif // V8_TARGET_ARCH_IA32 | 1587 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |