VirtualBox

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


Ignore:
Timestamp:
May 25, 2017 11:18:08 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

    r67085 r67086  
    21082108
    21092109
    2110 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_VqHi_WO_Mq(PBS3CG1STATE pThis, unsigned iEncoding)
    2111 {
    2112     unsigned off;
    2113     if (iEncoding == 0)
    2114     {
    2115         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM2_HI;
    2116         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    2117         off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 2 /*iReg*/, 8, 0, BS3CG1OPLOC_MEM);
    2118     }
    2119     else if (iEncoding == 1)
    2120     {
    2121         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM3_HI;
    2122         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    2123         off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 3 /*iReg*/, 8, 1 /*cbMisalign*/, BS3CG1OPLOC_MEM);
    2124     }
    2125     else
    2126         return 0;
    2127     pThis->cbCurInstr = off;
    2128     return iEncoding + 1;
    2129 }
    2130 
    2131 
    2132 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Vdq_WO_Wdq(PBS3CG1STATE pThis, unsigned iEncoding)
    2133 {
    2134     unsigned off;
    2135     if (iEncoding == 0)
    2136     {
    2137         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    2138         pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 1, 0);
    2139         pThis->aOperands[pThis->iRmOp ].idxField = BS3CG1DST_XMM0;
    2140         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM1;
    2141     }
    2142     else if (iEncoding == 1)
    2143     {
    2144         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM2;
    2145         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    2146         off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 2 /*iReg*/, 16, 0, BS3CG1OPLOC_MEM);
    2147     }
    2148     else if (iEncoding == 2)
    2149     {
    2150         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM3;
    2151         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    2152         off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 3 /*iReg*/, 16, 1 /*cbMisalign*/, BS3CG1OPLOC_MEM);
    2153         if (!Bs3Cg1XcptTypeIsUnaligned(pThis->enmXcptType))
    2154             pThis->bAlignmentXcpt = X86_XCPT_GP;
    2155     }
    2156     else
    2157         return 0;
    2158     pThis->cbCurInstr = off;
    2159     return iEncoding + 1;
    2160 }
    2161 
    2162 
    21632110static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Vsomething_Wsomething_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    21642111{
     
    38023749        case BS3CG1ENC_MODRM_VqHi_WO_Uq:
    38033750            return Bs3Cg1EncodeNext_MODRM_VqHi_WO_Uq(pThis, iEncoding);
    3804         case BS3CG1ENC_MODRM_VqHi_WO_Mq:
    3805             return Bs3Cg1EncodeNext_MODRM_VqHi_WO_Mq(pThis, iEncoding);
    38063751
    38073752        case BS3CG1ENC_FIXED:
     
    40113956
    40123957        case BS3CG1ENC_MODRM_Vdq_WO_Wdq:
    4013             pThis->pfnEncoder        = Bs3Cg1EncodeNext_MODRM_Vdq_WO_Wdq;
    4014             pThis->iRmOp             = 1;
    4015             pThis->iRegOp            = 0;
    4016             pThis->aOperands[0].cbOp = 16;
    4017             pThis->aOperands[1].cbOp = 16;
    4018             pThis->aOperands[0].enmLocation = BS3CG1OPLOC_CTX;
    4019             pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX;
    4020             break;
    4021 
    40223958        case BS3CG1ENC_MODRM_Vpd_WO_Wpd:
    40233959        case BS3CG1ENC_MODRM_Vps_WO_Wps:
     
    41244060            break;
    41254061
     4062        case BS3CG1ENC_MODRM_VqHi_WO_Mq:
     4063            pThis->pfnEncoder                   = Bs3Cg1EncodeNext_MODRM_Msomething_WO_Vsomething;
     4064            pThis->iRegOp                       = 0;
     4065            pThis->iRmOp                        = 1;
     4066            pThis->aOperands[0].cbOp            = 8;
     4067            pThis->aOperands[1].cbOp            = 8;
     4068            pThis->aOperands[0].idxFieldBase    = BS3CG1DST_XMM0_HI;
     4069            pThis->aOperands[0].enmLocation     = BS3CG1OPLOC_CTX;
     4070            pThis->aOperands[1].enmLocation     = BS3CG1OPLOC_MEM;
     4071            break;
     4072
    41264073        case BS3CG1ENC_MODRM_Vq_WO_Mq:
    4127         case BS3CG1ENC_MODRM_VqHi_WO_Mq:
    41284074            pThis->iRmOp             = 1;
    41294075            pThis->iRegOp            = 0;
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