Changeset 66463 in vbox for trunk/src/VBox/ValidationKit/bootsectors
- Timestamp:
- Apr 6, 2017 5:58:25 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 114448
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
r66462 r66463 121 121 /** The encoding. */ 122 122 BS3CG1ENC enmEncoding; 123 /** The non-invalid encoding. This differs from enmEncoding when 124 * Bs3Cg1CalcNoneIntelInvalidEncoding has been called. */ 125 BS3CG1ENC enmEncodingNonInvalid; 123 126 /** The CPU test / CPU ID. */ 124 127 BS3CG1CPU enmCpuTest; … … 2219 2222 { 2220 2223 case BS3CG1ENC_MODRM_Gb_Eb: 2224 case BS3CG1ENC_MODRM_Gv_Ma: 2221 2225 case BS3CG1ENC_FIXED: 2222 2226 return BS3CG1ENC_FIXED; … … 2703 2707 2704 2708 default: 2709 if (pThis->enmEncoding != pThis->enmEncodingNonInvalid) 2710 goto l_advance_to_next; 2705 2711 return Bs3TestFailedF("Internal error: cbDst=%u idxField=%d (%d) offField=%#x: enmLocation=%u off=%#x idxField=%u", 2706 2712 cbDst, idxField, idxOp, offField, pThis->aOperands[idxOp].enmLocation, … … 2917 2923 * Advance to the next instruction. 2918 2924 */ 2925 l_advance_to_next: 2919 2926 pbCode += cbValue; 2920 2927 cbLeft -= cbValue; … … 3497 3504 */ 3498 3505 PCBS3CG1INSTR pInstr = &g_aBs3Cg1Instructions[iInstr]; 3499 pThis->iInstr = iInstr; 3500 pThis->pTestHdr = (PCBS3CG1TESTHDR)&g_abBs3Cg1Tests[pInstr->offTests]; 3501 pThis->fFlags = pInstr->fFlags; 3502 pThis->enmEncoding = (BS3CG1ENC)pInstr->enmEncoding; 3503 pThis->enmCpuTest = (BS3CG1CPU)pInstr->enmCpuTest; 3504 pThis->enmPrefixKind = (BS3CG1PFXKIND)pInstr->enmPrefixKind; 3505 pThis->enmXcptType = (BS3CG1XCPTTYPE)pInstr->enmXcptType; 3506 pThis->cchMnemonic = pInstr->cchMnemonic; 3506 pThis->iInstr = iInstr; 3507 pThis->pTestHdr = (PCBS3CG1TESTHDR)&g_abBs3Cg1Tests[pInstr->offTests]; 3508 pThis->fFlags = pInstr->fFlags; 3509 pThis->enmEncoding = (BS3CG1ENC)pInstr->enmEncoding; 3510 pThis->enmEncodingNonInvalid = (BS3CG1ENC)pInstr->enmEncoding; 3511 pThis->enmCpuTest = (BS3CG1CPU)pInstr->enmCpuTest; 3512 pThis->enmPrefixKind = (BS3CG1PFXKIND)pInstr->enmPrefixKind; 3513 pThis->enmXcptType = (BS3CG1XCPTTYPE)pInstr->enmXcptType; 3514 pThis->cchMnemonic = pInstr->cchMnemonic; 3507 3515 if (pThis->fAdvanceMnemonic) 3508 3516 Bs3TestSubF("%s / %.*s", pThis->pszModeShort, pThis->cchMnemonic, pThis->pchMnemonic); 3509 pThis->fAdvanceMnemonic = pInstr->fAdvanceMnemonic;3510 pThis->cOperands = pInstr->cOperands;3511 pThis->cbOpcodes = pInstr->cbOpcodes;3517 pThis->fAdvanceMnemonic = pInstr->fAdvanceMnemonic; 3518 pThis->cOperands = pInstr->cOperands; 3519 pThis->cbOpcodes = pInstr->cbOpcodes; 3512 3520 switch (pThis->cOperands) 3513 3521 { … … 3517 3525 case 1: pThis->aenmOperands[0] = (BS3CG1OP)pThis->pabOperands[0]; 3518 3526 } 3519 3520 3527 switch (pThis->cbOpcodes) 3521 3528 { … … 3526 3533 } 3527 3534 3528 /* Switch the encoder for some of the invalid instructions on non-intel CPUs. */3529 if ( (pThis->fFlags & BS3CG1INSTR_F_INTEL_DECODES_INVALID)3530 && pThis->bCpuVendor != BS3CPUVENDOR_INTEL3531 && ( (pThis->fFlags & (BS3CG1INSTR_F_UNUSED | BS3CG1INSTR_F_INVALID))3532 || (BS3_MODE_IS_64BIT_CODE(pThis->bMode) && (pThis->fFlags & BS3CG1INSTR_F_INVALID_64BIT)) ) )3533 pThis->enmEncoding = Bs3Cg1CalcNoneIntelInvalidEncoding(pThis->enmEncoding);3534 3535 3535 /* 3536 3536 * Check if the CPU supports the instruction. … … 3539 3539 || (pThis->fFlags & (BS3CG1INSTR_F_UNUSED | BS3CG1INSTR_F_INVALID))) 3540 3540 fOuterInvalidInstr = true; 3541 3542 /* Switch the encoder for some of the invalid instructions on non-intel CPUs. */ 3543 if ( (pThis->fFlags & BS3CG1INSTR_F_INTEL_DECODES_INVALID) 3544 && pThis->bCpuVendor != BS3CPUVENDOR_INTEL 3545 && ( (pThis->fFlags & (BS3CG1INSTR_F_UNUSED | BS3CG1INSTR_F_INVALID)) 3546 || (BS3_MODE_IS_64BIT_CODE(pThis->bMode) && (pThis->fFlags & BS3CG1INSTR_F_INVALID_64BIT)) 3547 || fOuterInvalidInstr ) ) 3548 pThis->enmEncoding = Bs3Cg1CalcNoneIntelInvalidEncoding(pThis->enmEncoding); 3541 3549 3542 3550 for (iCpuSetup = 0;; iCpuSetup++) … … 3705 3713 #if 0 3706 3714 /* (for debugging) */ 3707 if (bMode != BS3_MODE_PPV86)3715 if (bMode < BS3_MODE_LM16) 3708 3716 return BS3TESTDOMODE_SKIPPED; 3709 3717 #endif
Note:
See TracChangeset
for help on using the changeset viewer.