Changeset 66313 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Mar 28, 2017 7:28:08 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 114242
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsPython.py
r66309 r66313 257 257 '11 mr/reg': [], 258 258 '!11 mr/reg': [], 259 }; 260 261 ## Special \@opcodesub tag values. 262 g_kdSubOpcodes = { 263 'none': [ None, ], 264 '11 mr/reg': [ '11 mr/reg', ], 265 '11': [ '11 mr/reg', ], ##< alias 266 '!11 mr/reg': [ '!11 mr/reg', ], 267 '!11': [ '!11 mr/reg', ], ##< alias 259 268 }; 260 269 … … 997 1006 self.sPrefix = None; ##< Single prefix: None, 'none', 0x66, 0xf3, 0xf2 998 1007 self.sOpcode = None; # type: str 1008 self.sSubOpcode = None; # type: str 999 1009 self.sEncoding = None; 1000 1010 self.asFlTest = None; … … 1273 1283 '@opmaps': self.parseTagOpMaps, 1274 1284 '@opcode': self.parseTagOpcode, 1285 '@opcodesub': self.parseTagOpcodeSub, 1275 1286 '@openc': self.parseTagOpEnc, 1276 1287 '@opfltest': self.parseTagOpEFlags, … … 1433 1444 if oInstr.sEncoding is None: 1434 1445 if not oInstr.aoOperands: 1435 oInstr.sEncoding = 'fixed'; 1446 if oInstr.fUnused and oInstr.sSubOpcode: 1447 oInstr.sEncoding = 'ModR/M'; 1448 else: 1449 oInstr.sEncoding = 'fixed'; 1436 1450 elif oInstr.aoOperands[0].usesModRM(): 1437 1451 if len(oInstr.aoOperands) >= 2 and oInstr.aoOperands[1].sWhere == 'vvvv': … … 1781 1795 return self.errorComment(iTagLine, '%s: attempting to overwrite "%s" with "%s"' % ( sTag, oInstr.sOpcode, sOpcode,)); 1782 1796 oInstr.sOpcode = sOpcode; 1797 1798 _ = iEndLine; 1799 return True; 1800 1801 def parseTagOpcodeSub(self, sTag, aasSections, iTagLine, iEndLine): 1802 """ 1803 Tag: \@opcodesub 1804 Value: none | 11 mr/reg | !11 mr/reg 1805 1806 This is a simple way of dealing with encodings where the mod=3 and mod!=3 1807 represents exactly two different instructions. The more proper way would 1808 be to go via maps with two members, but this is faster. 1809 """ 1810 oInstr = self.ensureInstructionForOpTag(iTagLine); 1811 1812 # Flatten and validate the value. 1813 sSubOpcode = self.flattenAllSections(aasSections); 1814 if sSubOpcode not in g_kdSubOpcodes: 1815 return self.errorComment(iTagLine, '%s: invalid sub opcode: %s (valid: 11, !11, none)' % (sTag, sSubOpcode,)); 1816 sSubOpcode = g_kdSubOpcodes[sSubOpcode][0]; 1817 1818 # Set it. 1819 if oInstr.sSubOpcode is not None: 1820 return self.errorComment(iTagLine, '%s: attempting to overwrite "%s" with "%s"' 1821 % ( sTag, oInstr.sSubOpcode, sSubOpcode,)); 1822 oInstr.sSubOpcode = sSubOpcode; 1783 1823 1784 1824 _ = iEndLine; -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h
r66311 r66313 1293 1293 /** 1294 1294 * @opcode 0x12 1295 * @opcodesub 11 mr/reg 1295 1296 * @oppfx none 1296 1297 * @opcpuid sse … … 1299 1300 * @optest op1=1 op2=2 -> op1=2 1300 1301 * @optest op1=0 op2=-42 -> op1=-42 1301 * @oponlytest1302 1302 */ 1303 1303 IEMOP_MNEMONIC2(RM_REG, MOVHLPS, movhlps, Vq, UqHi, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZE); … … 1320 1320 * @opdone 1321 1321 * @opcode 0x12 1322 * @opcodesub !11 mr/reg 1322 1323 * @oppfx none 1323 1324 * @opcpuid sse … … 1327 1328 * @optest op1=0 op2=-42 -> op1=-42 1328 1329 * @opfunction iemOp_vmovlps_Vq_Hq_Mq__vmovhlps 1329 * @oponlytest1330 1330 */ 1331 1331 IEMOP_MNEMONIC2(RM_MEM, MOVLPS, movlps, Vq, Mq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZE); … … 1350 1350 1351 1351 1352 /** 1353 * @opcode 0x12 1354 * @opcodesub !11 mr/reg 1355 * @oppfx 0x66 1356 * @opcpuid sse2 1357 * @opgroup og_sse2_pcksclr_datamove 1358 * @opxcpttype 5 1359 * @optest op1=1 op2=2 -> op1=2 1360 * @optest op1=0 op2=-42 -> op1=-42 1361 */ 1352 1362 FNIEMOP_DEF(iemOp_vmovlpd_Vq_Hq_Mq) 1353 1363 { 1354 1364 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 1355 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 1356 { 1357 /** 1358 * @todo figure this out! 1359 * opcode 0x12 1360 * todo 11 /reg 1361 * oppfx 0x66 1362 * openc ModR/M 1363 * opcpuid sse2 1364 * opgroup og_sse_simdfp_datamove 1365 * opunused immediate 1366 * optest op1=1 op2=2 -> op1=2 1367 * oponlytest 1368 */ 1369 return IEMOP_RAISE_INVALID_OPCODE(); 1370 } 1371 else 1372 { 1373 /** 1374 * @opdone 1375 * @opcode 0x12 1376 * @oppfx 0x66 1377 * @opcpuid sse2 1378 * @opgroup og_sse2_pcksclr_datamove 1379 * @opxcpttype 5 1380 * @optest op1=1 op2=2 -> op1=2 1381 * @optest op1=0 op2=-42 -> op1=-42 1382 * @opfunction iemOp_vmovlpd_Vq_Hq_Mq 1383 * @oponlytest 1384 */ 1365 if ((bRm & X86_MODRM_MOD_MASK) != (3 << X86_MODRM_MOD_SHIFT)) 1366 { 1385 1367 IEMOP_MNEMONIC2(RM_MEM, MOVLPD, movlpd, Vq, Mq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZE); 1386 1368 … … 1399 1381 IEM_MC_ADVANCE_RIP(); 1400 1382 IEM_MC_END(); 1401 } 1402 return VINF_SUCCESS; 1383 return VINF_SUCCESS; 1384 } 1385 1386 /** 1387 * @opdone 1388 * @opmnemonic ud660f12m3 1389 * @opcode 0x12 1390 * @opcodesub 11 mr/reg 1391 * @oppfx 0x66 1392 * @opunused immediate 1393 * @opcpuid sse 1394 * @optest -> 1395 */ 1396 return IEMOP_RAISE_INVALID_OPCODE(); 1403 1397 } 1404 1398
Note:
See TracChangeset
for help on using the changeset viewer.