Changeset 66313 in vbox for trunk/src/VBox/ValidationKit/bootsectors
- Timestamp:
- Mar 28, 2017 7:28:08 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 114242
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-data.py
r66286 r66313 304 304 for oOp in oInstr.aoOperands: 305 305 self.sEncoding += '_' + oOp.sType; 306 if oInstr.fUnused: 307 if oInstr.sInvalidStyle == 'immediate' and oInstr.sSubOpcode: 308 self.sEncoding += '_MOD_EQ_3' if oInstr.sSubOpcode == '11 mr/reg' else '_MOD_NE_3'; 306 309 307 310 self.asFlags = []; 308 311 if 'invalid_64' in oInstr.dHints: 309 self.asFlags.append('BS3CG1INSTR_F_INVALID_64BIT') 312 self.asFlags.append('BS3CG1INSTR_F_INVALID_64BIT'); 313 if oInstr.fUnused: 314 self.asFlags.append('BS3CG1INSTR_F_UNUSED'); 310 315 311 316 self.fAdvanceMnemonic = True; ##< Set by the caller. -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
r66309 r66313 1524 1524 break; 1525 1525 1526 case BS3CG1ENC_MODRM_MOD_EQ_3: 1527 if (iEncoding < 8) 1528 { 1529 off = Bs3Cg1InsertReqPrefix(pThis, 0); 1530 off = Bs3Cg1InsertOpcodes(pThis, off); 1531 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, iEncoding, 1); 1532 } 1533 else if (iEncoding < 16) 1534 { 1535 off = Bs3Cg1InsertReqPrefix(pThis, 0); 1536 off = Bs3Cg1InsertOpcodes(pThis, off); 1537 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 0, iEncoding); 1538 } 1539 else 1540 break; 1541 pThis->cbCurInstr = off; 1542 iEncoding++; 1543 break; 1544 1545 case BS3CG1ENC_MODRM_MOD_NE_3: 1546 if (iEncoding < 3) 1547 { 1548 off = Bs3Cg1InsertReqPrefix(pThis, 0); 1549 off = Bs3Cg1InsertOpcodes(pThis, off); 1550 pThis->abCurInstr[off++] = X86_MODRM_MAKE(iEncoding, 0, 1); 1551 if (iEncoding >= 1) 1552 pThis->abCurInstr[off++] = 0x7f; 1553 if (iEncoding == 2) 1554 { 1555 pThis->abCurInstr[off++] = 0x5f; 1556 if (!BS3_MODE_IS_16BIT_CODE(pThis->bMode)) 1557 { 1558 pThis->abCurInstr[off++] = 0x3f; 1559 pThis->abCurInstr[off++] = 0x1f; 1560 } 1561 } 1562 } 1563 else 1564 break; 1565 pThis->cbCurInstr = off; 1566 iEncoding++; 1567 break; 1568 1526 1569 default: 1527 1570 Bs3TestFailedF("Internal error! BS3CG1ENC_XXX = %u not implemented", pThis->enmEncoding); … … 1672 1715 pThis->aOperands[0].idxField = BS3CG1DST_OZ_RAX; 1673 1716 pThis->aOperands[1].idxField = BS3CG1DST_INVALID; 1717 break; 1718 1719 case BS3CG1ENC_MODRM_MOD_EQ_3: 1720 case BS3CG1ENC_MODRM_MOD_NE_3: 1721 /* Unused or invalid instructions mostly. */ 1674 1722 break; 1675 1723 … … 2925 2973 * Check if the CPU supports the instruction. 2926 2974 */ 2927 if (!Bs3Cg1CpuSetupFirst(pThis)) 2975 if ( !Bs3Cg1CpuSetupFirst(pThis) 2976 || (pThis->fFlags & BS3CG1INSTR_F_UNUSED)) 2928 2977 { 2929 2978 fInvalidInstr = true; … … 3045 3094 if (!Bs3Cg1CpuSetupNext(pThis, iCpuSetup, &fInvalidInstr)) 3046 3095 break; 3096 if (pThis->fFlags & BS3CG1INSTR_F_UNUSED) 3097 fInvalidInstr = true; 3098 if (fInvalidInstr) 3099 bTestXcptExpected = X86_XCPT_UD; 3047 3100 } 3048 3101 } -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h
r66309 r66313 100 100 BS3CG1ENC_FIXED_AL_Ib, 101 101 BS3CG1ENC_FIXED_rAX_Iz, 102 103 BS3CG1ENC_MODRM_MOD_EQ_3, /**< Unused or invalid instruction. */ 104 BS3CG1ENC_MODRM_MOD_NE_3, /**< Unused or invalid instruction. */ 102 105 103 106 BS3CG1ENC_END … … 198 201 uint32_t cOperands : 2; 199 202 /** The length of the mnemonic. */ 200 uint32_t cchMnemonic : 3;203 uint32_t cchMnemonic : 4; 201 204 /** Whether to advance the mnemonic array pointer. */ 202 205 uint32_t fAdvanceMnemonic : 1; … … 212 215 uint32_t enmXcptType : 5; 213 216 /** Currently unused bits. */ 214 uint32_t uUnused : 7;217 uint32_t uUnused : 6; 215 218 /** BS3CG1INSTR_F_XXX. */ 216 219 uint32_t fFlags; … … 227 230 /** Invalid instruction in 64-bit mode. */ 228 231 #define BS3CG1INSTR_F_INVALID_64BIT UINT32_C(0x00000002) 232 /** Unused instruction. */ 233 #define BS3CG1INSTR_F_UNUSED UINT32_C(0x00000004) 229 234 /** @} */ 230 235
Note:
See TracChangeset
for help on using the changeset viewer.