Changeset 67029 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- May 23, 2017 9:42:53 AM (8 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
r67015 r67029 3682 3682 /** 3683 3683 * Wip = VEX.W ignored. 3684 * L0 = VEX.L must be zero. 3685 */ 3686 static unsigned BS3_NEAR_CODE 3687 Bs3Cg1EncodeNext_VEX_MODRM_WsomethingWO_Vsomething_Wip_L0_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding) 3688 { 3689 unsigned off; 3690 switch (iEncoding) 3691 { 3692 /* 128-bit wide stuff goes first, then we'll update the operand widths afterwards. */ 3693 case 0: 3694 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/); 3695 off = Bs3Cg1InsertOpcodes(pThis, off); 3696 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 1, 0); 3697 pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationReg; 3698 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 0; 3699 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 1; 3700 break; 3701 3702 case 1: 3703 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3704 off = Bs3Cg1InsertOpcodes(pThis, off); 3705 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 4, 5); 3706 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 5; 3707 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 4; 3708 break; 3709 case 2: 3710 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W - ignored*/); 3711 off = Bs3Cg1InsertOpcodes(pThis, off); 3712 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 5, 4); 3713 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 4; 3714 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 5; 3715 break; 3716 case 3: 3717 pThis->aOperands[pThis->iRmOp].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationMem; 3718 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/); 3719 off = Bs3Cg1InsertOpcodes(pThis, off); 3720 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2 /*iReg*/, 0); 3721 break; 3722 case 4: 3723 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3724 off = Bs3Cg1InsertOpcodes(pThis, off); 3725 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 3 /*iReg*/, 0); 3726 break; 3727 case 5: 3728 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W - ignored */); 3729 off = Bs3Cg1InsertOpcodes(pThis, off); 3730 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 3 /*iReg*/, 0); 3731 break; 3732 case 6: 3733 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/); 3734 off = Bs3Cg1InsertOpcodes(pThis, off); 3735 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 3 /*iReg*/, 1 /*cbMisalign*/); 3736 if (!Bs3Cg1XcptTypeIsVexUnaligned(pThis->enmXcptType)) 3737 pThis->bAlignmentXcpt = X86_XCPT_GP; 3738 break; 3739 case 7: 3740 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3741 off = Bs3Cg1InsertOpcodes(pThis, off); 3742 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 3 /*iReg*/, 1 /*cbMisalign*/); 3743 if (!Bs3Cg1XcptTypeIsVexUnaligned(pThis->enmXcptType)) 3744 pThis->bAlignmentXcpt = X86_XCPT_GP; 3745 break; 3746 /* 128-bit invalid encodings: */ 3747 case 8: 3748 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xe /*~V*/, 0 /*L*/, 1 /*~R*/); /* Bad V value */ 3749 off = Bs3Cg1InsertOpcodes(pThis, off); 3750 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 1, 0); 3751 pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationReg; 3752 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 0; 3753 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 1; 3754 pThis->fInvalidEncoding = true; 3755 break; 3756 case 9: 3757 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0 /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 3758 off = Bs3Cg1InsertOpcodes(pThis, off); 3759 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 4, 5); 3760 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 5; 3761 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 4; 3762 pThis->fInvalidEncoding = true; 3763 iEncoding = 20-1; 3764 break; 3765 3766 default: 3767 return 0; 3768 } 3769 3770 pThis->cbCurInstr = off; 3771 return iEncoding + 1; 3772 } 3773 3774 3775 /** 3776 * Wip = VEX.W ignored. 3684 3777 */ 3685 3778 static unsigned BS3_NEAR_CODE … … 4613 4706 pThis->aOperands[1].idxFieldBase = BS3CG1DST_XMM0_HI; 4614 4707 pThis->aOperands[2].idxFieldBase = BS3CG1DST_INVALID; 4708 break; 4709 4710 case BS3CG1ENC_VEX_MODRM_Vq_WO_Wq: 4711 pThis->pfnEncoder = Bs3Cg1EncodeNext_VEX_MODRM_WsomethingWO_Vsomething_Wip_L0_OR_ViceVersa; 4712 pThis->iRegOp = 0; 4713 pThis->iRmOp = 1; 4714 pThis->aOperands[0].cbOp = 8; 4715 pThis->aOperands[1].cbOp = 8; 4716 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_CTX_ZX_VLMAX; 4717 pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX; 4718 pThis->aOperands[1].enmLocationReg = BS3CG1OPLOC_CTX; 4719 pThis->aOperands[1].enmLocationMem = BS3CG1OPLOC_MEM; 4720 pThis->aOperands[0].idxFieldBase = BS3CG1DST_XMM0_LO; 4721 pThis->aOperands[1].idxFieldBase = BS3CG1DST_XMM0_LO; 4615 4722 break; 4616 4723 -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h
r67015 r67029 186 186 BS3CG1ENC_VEX_MODRM_Vq_WO_HqHi_UqHi, 187 187 BS3CG1ENC_VEX_MODRM_Vq_WO_HqHi_Mq, 188 BS3CG1ENC_VEX_MODRM_Vq_WO_Wq, 188 189 BS3CG1ENC_VEX_MODRM_VssZx_WO_Md, 189 190 BS3CG1ENC_VEX_MODRM_VsdZx_WO_Mq,
Note:
See TracChangeset
for help on using the changeset viewer.