VirtualBox

Ignore:
Timestamp:
Apr 6, 2017 7:22:01 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
114450
Message:

IEM: Implemented movss Vss,Wss (f3 0f 10).

Location:
trunk/src/VBox/ValidationKit/bootsectors
Files:
3 edited

Legend:

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

    r66463 r66464  
    513513    /* [BS3CG1DST_XMM14_DW0] = */   4,
    514514    /* [BS3CG1DST_XMM15_DW0] = */   4,
     515    /* [BS3CG1DST_XMM0_DW0_ZX] = */ 4,
     516    /* [BS3CG1DST_XMM1_DW0_ZX] = */ 4,
     517    /* [BS3CG1DST_XMM2_DW0_ZX] = */ 4,
     518    /* [BS3CG1DST_XMM3_DW0_ZX] = */ 4,
     519    /* [BS3CG1DST_XMM4_DW0_ZX] = */ 4,
     520    /* [BS3CG1DST_XMM5_DW0_ZX] = */ 4,
     521    /* [BS3CG1DST_XMM6_DW0_ZX] = */ 4,
     522    /* [BS3CG1DST_XMM7_DW0_ZX] = */ 4,
     523    /* [BS3CG1DST_XMM8_DW0_ZX] = */ 4,
     524    /* [BS3CG1DST_XMM9_DW0_ZX] = */ 4,
     525    /* [BS3CG1DST_XMM10_DW0_ZX] =*/ 4,
     526    /* [BS3CG1DST_XMM11_DW0_ZX] =*/ 4,
     527    /* [BS3CG1DST_XMM12_DW0_ZX] =*/ 4,
     528    /* [BS3CG1DST_XMM13_DW0_ZX] =*/ 4,
     529    /* [BS3CG1DST_XMM14_DW0_ZX] =*/ 4,
     530    /* [BS3CG1DST_XMM15_DW0_ZX] =*/ 4,
    515531    /* [BS3CG1DST_YMM0] = */        32,
    516532    /* [BS3CG1DST_YMM1] = */        32,
     
    745761    /* [BS3CG1DST_XMM14_DW0] = */   sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[14]),
    746762    /* [BS3CG1DST_XMM15_DW0] = */   sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[15]),
     763    /* [BS3CG1DST_XMM0_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[0]),
     764    /* [BS3CG1DST_XMM1_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[1]),
     765    /* [BS3CG1DST_XMM2_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[2]),
     766    /* [BS3CG1DST_XMM3_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[3]),
     767    /* [BS3CG1DST_XMM4_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[4]),
     768    /* [BS3CG1DST_XMM5_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[5]),
     769    /* [BS3CG1DST_XMM6_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[6]),
     770    /* [BS3CG1DST_XMM7_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[7]),
     771    /* [BS3CG1DST_XMM8_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[8]),
     772    /* [BS3CG1DST_XMM9_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[9]),
     773    /* [BS3CG1DST_XMM10_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[10]),
     774    /* [BS3CG1DST_XMM11_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[11]),
     775    /* [BS3CG1DST_XMM12_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[12]),
     776    /* [BS3CG1DST_XMM13_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[13]),
     777    /* [BS3CG1DST_XMM14_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[14]),
     778    /* [BS3CG1DST_XMM15_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[15]),
    747779
    748780    /* [BS3CG1DST_YMM0] = */        ~0U,
     
    9771009    { "XMM14_DW0" },
    9781010    { "XMM15_DW0" },
     1011    { "XMM0_DW0_ZX" },
     1012    { "XMM1_DW0_ZX" },
     1013    { "XMM2_DW0_ZX" },
     1014    { "XMM3_DW0_ZX" },
     1015    { "XMM4_DW0_ZX" },
     1016    { "XMM5_DW0_ZX" },
     1017    { "XMM6_DW0_ZX" },
     1018    { "XMM7_DW0_ZX" },
     1019    { "XMM8_DW0_ZX" },
     1020    { "XMM9_DW0_ZX" },
     1021    { "XMM10_DW0_ZX" },
     1022    { "XMM11_DW0_ZX" },
     1023    { "XMM12_DW0_ZX" },
     1024    { "XMM13_DW0_ZX" },
     1025    { "XMM14_DW0_ZX" },
     1026    { "XMM15_DW0_ZX" },
    9791027    { "YMM0" },
    9801028    { "YMM1" },
     
    16121660
    16131661
     1662static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_VssZxReg_Wss(PBS3CG1STATE pThis, unsigned iEncoding)
     1663{
     1664    unsigned off;
     1665    if (iEncoding == 0)
     1666    {
     1667        off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
     1668        pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 1, 0);
     1669        pThis->aOperands[pThis->iRmOp ].idxField = BS3CG1DST_XMM0_LO;
     1670        pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM1_DW0_ZX;
     1671    }
     1672    else if (iEncoding == 1)
     1673    {
     1674        pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM2_DW0_ZX;
     1675        off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
     1676        off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 2 /*iReg*/, 4, 0, BS3CG1OPLOC_MEM);
     1677    }
     1678    else if (iEncoding == 2)
     1679    {
     1680        pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM3_DW0_ZX;
     1681        off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
     1682        off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 3 /*iReg*/, 4, 1 /*cbMissalign*/, BS3CG1OPLOC_MEM);
     1683    }
     1684    else
     1685        return 0;
     1686    pThis->cbCurInstr = off;
     1687    return iEncoding + 1;
     1688}
     1689
     1690
    16141691static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_Gv_Ma(PBS3CG1STATE pThis, unsigned iEncoding)
    16151692{
     
    19922069        case BS3CG1ENC_MODRM_Vdq_Wdq:
    19932070            return Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_Vdq_Wdq(pThis, iEncoding);
     2071        case BS3CG1ENC_MODRM_VssZxReg_Wss:
     2072            return Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_VssZxReg_Wss(pThis, iEncoding);
    19942073
    19952074        case BS3CG1ENC_MODRM_Gv_Ma:
     
    21542233            pThis->aOperands[0].enmLocation = BS3CG1OPLOC_CTX;
    21552234            pThis->aOperands[1].enmLocation = BS3CG1OPLOC_MEM;
     2235            break;
     2236
     2237        case BS3CG1ENC_MODRM_VssZxReg_Wss:
     2238            pThis->iRmOp             = 1;
     2239            pThis->iRegOp            = 0;
     2240            pThis->aOperands[0].cbOp = 4;
     2241            pThis->aOperands[1].cbOp = 4;
     2242            pThis->aOperands[0].enmLocation = BS3CG1OPLOC_CTX;
     2243            pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX;
    21562244            break;
    21572245
     
    27872875
    27882876                case 4:
    2789                     if (offField <= RT_OFFSETOF(BS3REGCTX, r15)) /* Clear the top dword. */
     2877                    if ((unsigned)(idxField - BS3CG1DST_XMM0_DW0_ZX) <= (unsigned)(BS3CG1DST_XMM15_DW0_ZX - BS3CG1DST_XMM0_DW0_ZX))
     2878                    {
     2879                        PtrField.pu32[1] = 0;
     2880                        PtrField.pu64[1] = 0;
     2881                    }
     2882                    else if (offField <= RT_OFFSETOF(BS3REGCTX, r15)) /* Clear the top dword. */
    27902883                        PtrField.pu32[1] = 0;
    27912884                    switch (bOpcode & BS3CG1_CTXOP_OPERATOR_MASK)
     
    30853178                    if (   pResult->Ctx.x87.aXMM[i].au64[0] != pExpect->Ctx.x87.aXMM[i].au64[0]
    30863179                        || pResult->Ctx.x87.aXMM[i].au64[1] != pExpect->Ctx.x87.aXMM[i].au64[1])
    3087                         fOkay = Bs3TestFailedF("XMM%u: %#010RX64'%08RX64, expected %#010RX64'%08RX64", i,
     3180                        fOkay = Bs3TestFailedF("XMM%u: %#010RX64'%016RX64, expected %#010RX64'%08RX64", i,
     3181                                               pResult->Ctx.x87.aXMM[i].au64[1],
    30883182                                               pResult->Ctx.x87.aXMM[i].au64[0],
    3089                                                pResult->Ctx.x87.aXMM[i].au64[1],
    3090                                                pExpect->Ctx.x87.aXMM[i].au64[0],
    3091                                                pExpect->Ctx.x87.aXMM[i].au64[1]);
     3183                                               pExpect->Ctx.x87.aXMM[i].au64[1],
     3184                                               pExpect->Ctx.x87.aXMM[i].au64[0]);
    30923185            }
    30933186            else
     
    37133806#if 0
    37143807    /* (for debugging) */
    3715     if (bMode < BS3_MODE_LM16)
     3808    if (bMode != BS3_MODE_PP32)
    37163809        return BS3TESTDOMODE_SKIPPED;
    37173810#endif
     
    37263819#if 0
    37273820    /* (for debugging) */
    3728     if (bMode >= BS3_MODE_LM64)
     3821    //if (bMode == BS3_MODE_PP32)
    37293822    {
    37303823        Bs3TestTerm();
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h

    r66462 r66464  
    5656    BS3CG1OP_UqHi,
    5757    BS3CG1OP_Vss,
     58    BS3CG1OP_VssZxReg,
    5859    BS3CG1OP_Vsd,
    5960    BS3CG1OP_Vps,
     
    104105    BS3CG1ENC_MODRM_Vq_Mq,
    105106    BS3CG1ENC_MODRM_Vdq_Wdq,
     107    BS3CG1ENC_MODRM_VssZxReg_Wss,
    106108    BS3CG1ENC_MODRM_MbRO,
    107109    BS3CG1ENC_MODRM_MdRO,
     
    532534    BS3CG1DST_XMM14_DW0,
    533535    BS3CG1DST_XMM15_DW0,
     536    BS3CG1DST_XMM0_DW0_ZX,
     537    BS3CG1DST_XMM1_DW0_ZX,
     538    BS3CG1DST_XMM2_DW0_ZX,
     539    BS3CG1DST_XMM3_DW0_ZX,
     540    BS3CG1DST_XMM4_DW0_ZX,
     541    BS3CG1DST_XMM5_DW0_ZX,
     542    BS3CG1DST_XMM6_DW0_ZX,
     543    BS3CG1DST_XMM7_DW0_ZX,
     544    BS3CG1DST_XMM8_DW0_ZX,
     545    BS3CG1DST_XMM9_DW0_ZX,
     546    BS3CG1DST_XMM10_DW0_ZX,
     547    BS3CG1DST_XMM11_DW0_ZX,
     548    BS3CG1DST_XMM12_DW0_ZX,
     549    BS3CG1DST_XMM13_DW0_ZX,
     550    BS3CG1DST_XMM14_DW0_ZX,
     551    BS3CG1DST_XMM15_DW0_ZX,
    534552    /* AVX registers. */
    535553    BS3CG1DST_YMM0,
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrFormatV.c

    r62484 r66464  
    215215#if ARCH_BITS != 64
    216216    /* Avoid 64-bit division by formatting 64-bit numbers as hex if they're higher than _4G. */
    217     if (   pState->uBase == 10
    218         && !(uValue >> 32)) /* uValue <= UINT32_MAX does not work, trouble with 64-bit compile time math! */
    219         return bs3StrFormatU32(pState, uValue);
    220     pState->fFlags |= STR_F_SPECIAL;
    221     pState->uBase = 16;
     217    if (pState->uBase == 10)
     218    {
     219        if (!(uValue >> 32)) /* uValue <= UINT32_MAX does not work, trouble with 64-bit compile time math! */
     220            return bs3StrFormatU32(pState, uValue);
     221        pState->fFlags |= STR_F_SPECIAL;
     222        pState->uBase   = 16;
     223    }
    222224#endif
    223225
Note: See TracChangeset for help on using the changeset viewer.

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