VirtualBox

Changeset 67081 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 25, 2017 10:27:59 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

    r67079 r67081  
    22632263
    22642264
    2265 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_VqZx_WO_Nq(PBS3CG1STATE pThis, unsigned iEncoding)
     2265static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Vsomething_Nsomething(PBS3CG1STATE pThis, unsigned iEncoding)
    22662266{
    22672267    unsigned off;
    2268     if (iEncoding == 0)
    2269     {
    2270         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    2271         pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 1, 0);
    2272         pThis->aOperands[pThis->iRmOp ].idxField = BS3CG1DST_MM0;
    2273         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM1_LO_ZX;
    2274     }
    2275     else if (iEncoding == 1)
    2276     {
    2277         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    2278         pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 7);
    2279         pThis->aOperands[pThis->iRmOp ].idxField = BS3CG1DST_MM7;
    2280         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM6_LO_ZX;
    2281     }
    2282     else
    2283         return 0;
     2268    switch (iEncoding)
     2269    {
     2270        case 0:
     2271            off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
     2272            pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 1, 0);
     2273            pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 0;
     2274            pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 1;
     2275            break;
     2276        case 1:
     2277            off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
     2278            pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 7);
     2279            pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 7;
     2280            pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6;
     2281            break;
     2282        default:
     2283            return 0;
     2284    }
    22842285    pThis->cbCurInstr = off;
    22852286    return iEncoding + 1;
     
    22872288
    22882289
    2289 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Gv_RO_Ma(PBS3CG1STATE pThis, unsigned iEncoding)
     2290static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Gv_RO_Ma(PBS3CG1STATE pThis, unsigned iEncoding) /* bound instr */
    22902291{
    22912292    unsigned off;
     
    39583959        case BS3CG1ENC_MODRM_VqZx_WO_Wq:
    39593960            return Bs3Cg1EncodeNext_MODRM_VsdZx_WO_Wsd__OR__MODRM_VqZx_WO_Wq(pThis, iEncoding);
    3960         case BS3CG1ENC_MODRM_VqZx_WO_Nq:
    3961             return Bs3Cg1EncodeNext_MODRM_VqZx_WO_Nq(pThis, iEncoding);
    39623961
    39633962        case BS3CG1ENC_FIXED:
     
    41144113            break;
    41154114
    4116         case BS3CG1ENC_MODRM_Gv_RO_Ma:
     4115        case BS3CG1ENC_MODRM_Gv_RO_Ma: /* bound instr */
    41174116            pThis->pfnEncoder        = Bs3Cg1EncodeNext_MODRM_Gv_RO_Ma;
    41184117            pThis->iRmOp             = 1;
     
    42954294            break;
    42964295
     4296        case BS3CG1ENC_MODRM_VqZx_WO_Nq:
     4297            pThis->pfnEncoder        = Bs3Cg1EncodeNext_MODRM_Vsomething_Nsomething;
     4298            pThis->iRegOp            = 0;
     4299            pThis->iRmOp             = 1;
     4300            pThis->aOperands[0].cbOp = 8;
     4301            pThis->aOperands[1].cbOp = 8;
     4302            pThis->aOperands[0].enmLocation  = BS3CG1OPLOC_CTX;
     4303            pThis->aOperands[1].enmLocation  = BS3CG1OPLOC_CTX;
     4304            pThis->aOperands[0].idxFieldBase = BS3CG1DST_XMM0_LO_ZX;
     4305            pThis->aOperands[1].idxFieldBase = BS3CG1DST_MM0;
     4306            break;
     4307
    42974308        case BS3CG1ENC_MODRM_VsdZx_WO_Wsd:
    42984309        case BS3CG1ENC_MODRM_VqZx_WO_Wq:
    4299         case BS3CG1ENC_MODRM_VqZx_WO_Nq:
    43004310            pThis->iRmOp             = 1;
    43014311            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