VirtualBox

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


Ignore:
Timestamp:
May 15, 2017 10:41:07 PM (8 years ago)
Author:
vboxsync
Message:

IEM: Implemented vmovss Vss,Hss,Wss (VEX.F3.0F 10 mod=11) and vmovss Vss,Wss (VEX.F3.0F 10 mod!=33).

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

Legend:

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

    r66888 r66901  
    23862386
    23872387
     2388static unsigned Bs3Cg1EncodeNext_VEX_MODRM_Vss_WO_HdqCss_Wss(PBS3CG1STATE pThis, unsigned iEncoding)
     2389{
     2390    unsigned off;
     2391    switch (iEncoding)
     2392    {
     2393        case 0:
     2394            off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/);
     2395            off = Bs3Cg1InsertOpcodes(pThis, off);
     2396            pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 2, 1);
     2397            pThis->aOperands[0].idxField = BS3CG1DST_XMM2;
     2398            pThis->aOperands[1].idxField = BS3CG1DST_XMM0;
     2399            pThis->aOperands[2].idxField = BS3CG1DST_XMM1_DW0;
     2400            break;
     2401        case 1:
     2402            off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0x8 /*~V*/, 1 /*L-ignored*/, 1 /*~R*/);
     2403            off = Bs3Cg1InsertOpcodes(pThis, off);
     2404            pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 3, 1);
     2405            pThis->aOperands[0].idxField = BS3CG1DST_XMM3;
     2406            pThis->aOperands[1].idxField = BS3CG1DST_XMM7;
     2407            pThis->aOperands[2].idxField = BS3CG1DST_XMM1_DW0;
     2408            break;
     2409        case 2:
     2410#if ARCH_BITS == 64
     2411            if (BS3_MODE_IS_64BIT_CODE(pThis->bMode))
     2412            {
     2413                off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0 /*~V*/, 0 /*L*/, 0 /*~R*/);
     2414                off = Bs3Cg1InsertOpcodes(pThis, off);
     2415                pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 3, 2);
     2416                pThis->aOperands[0].idxField = BS3CG1DST_XMM11;
     2417                pThis->aOperands[1].idxField = BS3CG1DST_XMM15;
     2418                pThis->aOperands[2].idxField = BS3CG1DST_XMM2_DW0;
     2419                break;
     2420            }
     2421#endif
     2422            /* fall thru */
     2423        case 3:
     2424            off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/);
     2425            off = Bs3Cg1InsertOpcodes(pThis, off);
     2426            pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 2, 1);
     2427            pThis->aOperands[0].idxField = BS3CG1DST_XMM2;
     2428            pThis->aOperands[1].idxField = BS3CG1DST_XMM0;
     2429            pThis->aOperands[2].idxField = BS3CG1DST_XMM1_DW0;
     2430            break;
     2431        case 4:
     2432            off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L - ignored*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/);
     2433            off = Bs3Cg1InsertOpcodes(pThis, off);
     2434            pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 2, 1);
     2435            pThis->aOperands[0].idxField = BS3CG1DST_XMM2;
     2436            pThis->aOperands[1].idxField = BS3CG1DST_XMM0;
     2437            pThis->aOperands[2].idxField = BS3CG1DST_XMM1_DW0;
     2438            break;
     2439        case 5:
     2440            off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xc /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W-ignored*/);
     2441            off = Bs3Cg1InsertOpcodes(pThis, off);
     2442            pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 2, 1);
     2443            pThis->aOperands[0].idxField = BS3CG1DST_XMM2;
     2444            pThis->aOperands[1].idxField = BS3CG1DST_XMM3;
     2445            pThis->aOperands[2].idxField = BS3CG1DST_XMM1_DW0;
     2446            break;
     2447        case 6:
     2448            off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0 /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W-ignored*/);
     2449            off = Bs3Cg1InsertOpcodes(pThis, off);
     2450            pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 2, 1);
     2451            pThis->aOperands[0].idxField = BS3CG1DST_XMM2;
     2452            pThis->aOperands[1].idxField = BS3_MODE_IS_64BIT_CODE(pThis->bMode) ? BS3CG1DST_XMM15 : BS3CG1DST_XMM7;
     2453            pThis->aOperands[2].idxField = BS3CG1DST_XMM1_DW0;
     2454            break;
     2455        default:
     2456            return 0;
     2457    }
     2458    pThis->cbCurInstr = off;
     2459    return iEncoding + 1;
     2460}
     2461
     2462
     2463static unsigned Bs3Cg1EncodeNext_VEX_MODRM_VssZx_WO_Wss(PBS3CG1STATE pThis, unsigned iEncoding)
     2464{
     2465    unsigned off;
     2466    switch (iEncoding)
     2467    {
     2468        case 0:
     2469            off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/);
     2470            off = Bs3Cg1InsertOpcodes(pThis, off);
     2471            off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 0, 4, 0, BS3CG1OPLOC_MEM);
     2472            pThis->aOperands[0].idxField = BS3CG1DST_XMM0_DW0;
     2473            break;
     2474        case 1:
     2475            off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L - ignored*/, 1 /*~R*/);
     2476            off = Bs3Cg1InsertOpcodes(pThis, off);
     2477            off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 7, 4, 0, BS3CG1OPLOC_MEM);
     2478            pThis->aOperands[0].idxField = BS3CG1DST_XMM7_DW0;
     2479            break;
     2480        case 2:
     2481#if ARCH_BITS == 64
     2482            if (BS3_MODE_IS_64BIT_CODE(pThis->bMode))
     2483            {
     2484                off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L - ignored*/, 0 /*~R*/);
     2485                off = Bs3Cg1InsertOpcodes(pThis, off);
     2486                off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 7, 4, 0, BS3CG1OPLOC_MEM);
     2487                pThis->aOperands[0].idxField = BS3CG1DST_XMM15_DW0;
     2488                break;
     2489            }
     2490#endif
     2491            /* fall thru */
     2492        case 3:
     2493            iEncoding = 3;
     2494            off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xe /*~V*/, 0 /*L*/, 1 /*~R*/);
     2495            off = Bs3Cg1InsertOpcodes(pThis, off);
     2496            off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 0, 4, 0, BS3CG1OPLOC_MEM);
     2497            pThis->aOperands[0].idxField = BS3CG1DST_XMM0_DW0;
     2498            pThis->fInvalidEncoding = true;
     2499            break;
     2500        case 4:
     2501            off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/);
     2502            off = Bs3Cg1InsertOpcodes(pThis, off);
     2503            off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 1, 4, 0, BS3CG1OPLOC_MEM);
     2504            pThis->aOperands[0].idxField = BS3CG1DST_XMM1_DW0;
     2505            break;
     2506        case 5:
     2507            off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L-ignored*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/);
     2508            off = Bs3Cg1InsertOpcodes(pThis, off);
     2509            off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 1, 4, 0, BS3CG1OPLOC_MEM);
     2510            pThis->aOperands[0].idxField = BS3CG1DST_XMM1_DW0;
     2511            break;
     2512        case 6:
     2513            off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W-ignored*/);
     2514            off = Bs3Cg1InsertOpcodes(pThis, off);
     2515            off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 5, 4, 0, BS3CG1OPLOC_MEM);
     2516            pThis->aOperands[0].idxField = BS3CG1DST_XMM5_DW0;
     2517            break;
     2518        case 7:
     2519#if ARCH_BITS == 64
     2520            if (BS3_MODE_IS_64BIT_CODE(pThis->bMode))
     2521            {
     2522                off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/);
     2523                off = Bs3Cg1InsertOpcodes(pThis, off);
     2524                off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 5, 4, 0, BS3CG1OPLOC_MEM);
     2525                pThis->aOperands[0].idxField = BS3CG1DST_XMM13_DW0;
     2526                break;
     2527            }
     2528#endif
     2529            /* fall thru */
     2530        case 8:
     2531#if ARCH_BITS == 64
     2532            if (BS3_MODE_IS_64BIT_CODE(pThis->bMode))
     2533            {
     2534                off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 0 /*~B-ignored*/, 0 /*W*/);
     2535                off = Bs3Cg1InsertOpcodes(pThis, off);
     2536                off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 1, 4, 0, BS3CG1OPLOC_MEM);
     2537                pThis->aOperands[0].idxField = BS3CG1DST_XMM1_DW0;
     2538                break;
     2539            }
     2540#endif
     2541            /* fall thru */
     2542        case 9:
     2543#if ARCH_BITS == 64
     2544            if (BS3_MODE_IS_64BIT_CODE(pThis->bMode))
     2545            {
     2546                off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 0 /*~X-ignored*/, 1 /*~B*/, 0 /*W*/);
     2547                off = Bs3Cg1InsertOpcodes(pThis, off);
     2548                off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 2, 4, 0, BS3CG1OPLOC_MEM);
     2549                pThis->aOperands[0].idxField = BS3CG1DST_XMM2_DW0;
     2550                break;
     2551            }
     2552#endif
     2553            /* fall thru */
     2554        case 10:
     2555            iEncoding = 10;
     2556            off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0 /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/);
     2557            off = Bs3Cg1InsertOpcodes(pThis, off);
     2558            off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 5, 4, 0, BS3CG1OPLOC_MEM);
     2559            pThis->aOperands[0].idxField = BS3CG1DST_XMM5_DW0;
     2560            pThis->fInvalidEncoding = true;
     2561            break;
     2562        default:
     2563            return 0;
     2564    }
     2565    pThis->cbCurInstr = off;
     2566    return iEncoding + 1;
     2567}
     2568
     2569
    23882570static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_VEX_MODRM_Md_WO(PBS3CG1STATE pThis, unsigned iEncoding)
    23892571{
     
    25812763            return Bs3Cg1EncodeNext_VEX_MODRM_Vps_WO_Wps__OR__VEX_MODRM_Vpd_WO_Wpd(pThis, iEncoding);
    25822764
     2765        case BS3CG1ENC_VEX_MODRM_Vss_WO_HdqCss_Wss:
     2766            return Bs3Cg1EncodeNext_VEX_MODRM_Vss_WO_HdqCss_Wss(pThis, iEncoding);
     2767
     2768        case BS3CG1ENC_VEX_MODRM_VssZx_WO_Wss:
     2769            return Bs3Cg1EncodeNext_VEX_MODRM_VssZx_WO_Wss(pThis, iEncoding);
     2770
    25832771        case BS3CG1ENC_VEX_MODRM_Md_WO:
    25842772            return Bs3Cg1EncodeNext_VEX_MODRM_Md_WO(pThis, iEncoding);
     
    28253013            pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX;
    28263014            break;
     3015
     3016        case BS3CG1ENC_VEX_MODRM_VssZx_WO_Wss:
     3017            pThis->iRmOp             = 1;
     3018            pThis->iRegOp            = 0;
     3019            pThis->aOperands[0].cbOp = 4;
     3020            pThis->aOperands[1].cbOp = 4;
     3021            pThis->aOperands[0].enmLocation = BS3CG1OPLOC_CTX_ZX_VLMAX;
     3022            pThis->aOperands[1].enmLocation = BS3CG1OPLOC_MEM;
     3023            break;
     3024
     3025        case BS3CG1ENC_VEX_MODRM_Vss_WO_HdqCss_Wss:
     3026            pThis->iRegOp            = 0;
     3027            pThis->iRmOp             = 2;
     3028            pThis->aOperands[0].cbOp = 16;
     3029            pThis->aOperands[1].cbOp = 16;
     3030            pThis->aOperands[2].cbOp = 4;
     3031            pThis->aOperands[0].enmLocation = BS3CG1OPLOC_CTX_ZX_VLMAX;
     3032            pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX;
     3033            pThis->aOperands[2].enmLocation = BS3CG1OPLOC_CTX;
     3034            break;
     3035
    28273036
    28283037#endif /* BS3CG1_WITH_VEX */
     
    44454654#if 0
    44464655    /* (for debugging) */
    4447     if (bMode != BS3_MODE_PPV86)
     4656    if (bMode == BS3_MODE_RM)
    44484657        return BS3TESTDOMODE_SKIPPED;
    44494658#endif
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h

    r66888 r66901  
    6161    BS3CG1OP_Gv,
    6262    BS3CG1OP_Gv_RO,
     63    BS3CG1OP_HdqCss,
    6364    BS3CG1OP_Nq,
    6465    BS3CG1OP_Pq_WO,
     
    143144    BS3CG1ENC_VEX_MODRM_Vps_WO_Wps,
    144145    BS3CG1ENC_VEX_MODRM_Vpd_WO_Wpd,
     146    BS3CG1ENC_VEX_MODRM_Vss_WO_HdqCss_Wss,
     147    BS3CG1ENC_VEX_MODRM_VssZx_WO_Wss,
    145148    BS3CG1ENC_VEX_MODRM_Md_WO,
    146149
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