VirtualBox

Changeset 67084 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
May 25, 2017 11:11:53 AM (8 years ago)
Author:
vboxsync
Message:

bs3-cpu-generated-1: cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c

    r67083 r67084  
    21932193
    21942194
    2195 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_VssZx_WO_Wss(PBS3CG1STATE pThis, unsigned iEncoding)
    2196 {
    2197     unsigned off;
    2198     if (iEncoding == 0)
    2199     {
    2200         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    2201         pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 1, 0);
    2202         pThis->aOperands[pThis->iRmOp ].idxField = BS3CG1DST_XMM0_LO;
    2203         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM1_DW0_ZX;
    2204     }
    2205     else if (iEncoding == 1)
    2206     {
    2207         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM2_DW0_ZX;
    2208         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    2209         off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 2 /*iReg*/, 4, 0, BS3CG1OPLOC_MEM);
    2210     }
    2211     else if (iEncoding == 2)
    2212     {
    2213         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM3_DW0_ZX;
    2214         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    2215         off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 3 /*iReg*/, 4, 1 /*cbMisalign*/, BS3CG1OPLOC_MEM);
    2216     }
    2217     else
    2218         return 0;
    2219     pThis->cbCurInstr = off;
    2220     return iEncoding + 1;
    2221 }
    2222 
    2223 
    22242195static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Vsomething_Wsomething_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    22252196{
     
    22392210            off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    22402211            off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaultsMisaligned(pThis, off, 3 /*iReg*/, 1 /*cbMisalign*/);
     2212            if (!Bs3Cg1XcptTypeIsUnaligned(pThis->enmXcptType))
     2213                pThis->bAlignmentXcpt = X86_XCPT_GP;
    22412214            break;
    22422215        default:
     
    38663839        case BS3CG1ENC_MODRM_Vps_WO_Wps:
    38673840            return Bs3Cg1EncodeNext_MODRM_Vps_WO_Wps__OR__MODRM_Vpd_WO_Wpd(pThis, iEncoding);
    3868         case BS3CG1ENC_MODRM_VssZx_WO_Wss:
    3869             return Bs3Cg1EncodeNext_MODRM_VssZx_WO_Wss(pThis, iEncoding);
    38703841
    38713842        case BS3CG1ENC_FIXED:
     
    41954166
    41964167        case BS3CG1ENC_MODRM_VssZx_WO_Wss:
     4168            pThis->pfnEncoder        = Bs3Cg1EncodeNext_MODRM_Vsomething_Wsomething_OR_ViceVersa;
     4169            pThis->iRegOp            = 0;
    41974170            pThis->iRmOp             = 1;
    4198             pThis->iRegOp            = 0;
    41994171            pThis->aOperands[0].cbOp = 4;
    42004172            pThis->aOperands[1].cbOp = 4;
    4201             pThis->aOperands[0].enmLocation = BS3CG1OPLOC_CTX;
    4202             pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX;
     4173            pThis->aOperands[0].enmLocation    = BS3CG1OPLOC_CTX;
     4174            pThis->aOperands[1].enmLocationReg = BS3CG1OPLOC_CTX;
     4175            pThis->aOperands[1].enmLocationMem = BS3CG1OPLOC_MEM;
     4176            pThis->aOperands[0].idxFieldBase   = BS3CG1DST_XMM0_DW0_ZX;
     4177            pThis->aOperands[1].idxFieldBase   = BS3CG1DST_XMM0_LO;
    42034178            break;
    42044179
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette