VirtualBox

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


Ignore:
Timestamp:
May 25, 2017 10:32:52 PM (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

    r67100 r67101  
    19141914
    19151915
    1916 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Vq_WO_UqHi(PBS3CG1STATE pThis, unsigned iEncoding)
     1916static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Vsomething_Usomething_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    19171917{
    19181918    unsigned off;
    1919     if (iEncoding == 0)
    1920     {
    1921         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    1922         pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 1, 0);
    1923         pThis->aOperands[pThis->iRmOp ].idxField = BS3CG1DST_XMM0_HI;
    1924         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM1_LO;
    1925     }
    1926     else if (iEncoding == 1)
    1927     {
    1928         off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    1929         pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 2, 2);
    1930         pThis->aOperands[pThis->iRmOp ].idxField = BS3CG1DST_XMM2_HI;
    1931         pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM2_LO;
    1932     }
    1933     else
    1934         return 0;
     1919    switch (iEncoding)
     1920    {
     1921        case 0:
     1922            off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
     1923            off = Bs3Cg1InsertModRmWithRegFields(pThis, off, 1, 0);
     1924            break;
     1925        case 1:
     1926            off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
     1927            off = Bs3Cg1InsertModRmWithRegFields(pThis, off, 2, 2);
     1928            iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0;
     1929            break;
     1930        case 2:
     1931            off = Bs3Cg1InsertReqPrefix(pThis, 0);
     1932            pThis->abCurInstr[off++] = REX__RBX;
     1933            off = Bs3Cg1InsertOpcodes(pThis, off);
     1934            off = Bs3Cg1InsertModRmWithRegFields(pThis, off, 3+8, 7+8);
     1935            break;
     1936        default:
     1937            return 0;
     1938    }
    19351939    pThis->cbCurInstr = off;
    19361940    return iEncoding + 1;
     
    36013605    switch (pThis->enmEncoding)
    36023606    {
    3603         case BS3CG1ENC_MODRM_Vq_WO_UqHi:
    3604             return Bs3Cg1EncodeNext_MODRM_Vq_WO_UqHi(pThis, iEncoding);
    36053607        case BS3CG1ENC_MODRM_Vq_WO_Mq:
    36063608            return Bs3Cg1EncodeNext_MODRM_Vq_WO_Mq(pThis, iEncoding);
     
    39473949
    39483950        case BS3CG1ENC_MODRM_Vq_WO_UqHi:
     3951            pThis->pfnEncoder                  = Bs3Cg1EncodeNext_MODRM_Vsomething_Usomething_OR_ViceVersa;
     3952            pThis->iRegOp                      = 0;
     3953            pThis->iRmOp                       = 1;
     3954            pThis->aOperands[0].cbOp           = 8;
     3955            pThis->aOperands[1].cbOp           = 8;
     3956            pThis->aOperands[0].idxFieldBase   = BS3CG1DST_XMM0_LO;
     3957            pThis->aOperands[1].idxFieldBase   = BS3CG1DST_XMM0_HI;
     3958            pThis->aOperands[0].enmLocation    = BS3CG1OPLOC_CTX;
     3959            pThis->aOperands[1].enmLocation    = BS3CG1OPLOC_CTX;
     3960            break;
     3961
    39493962        case BS3CG1ENC_MODRM_VqHi_WO_Uq:
    39503963            pThis->iRmOp             = 1;
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