VirtualBox

Changeset 104060 in vbox


Ignore:
Timestamp:
Mar 26, 2024 1:43:51 PM (8 months ago)
Author:
vboxsync
Message:

ValidationKit/bs3-cpu-instr-3: Implement vextracti128/vextractf128 instruction testcases, bugref:9898

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-3-template.mac

    r103958 r104060  
    24172417EMIT_INSTR_PLUS_ICEBP_C64   vinsertf128, YMM8, YMM9, XMM10, 000h
    24182418EMIT_INSTR_PLUS_ICEBP_C64   vinsertf128, YMM8, YMM9, FSxBX, 000h
     2419
     2420;
     2421; VEXTRACTI128
     2422;
     2423EMIT_INSTR_PLUS_ICEBP   vextracti128, XMM1,  YMM2, 0FFh
     2424EMIT_INSTR_PLUS_ICEBP   vextracti128, FSxBX, YMM2, 0FFh
     2425EMIT_INSTR_PLUS_ICEBP   vextracti128, XMM1,  YMM2, 000h
     2426EMIT_INSTR_PLUS_ICEBP   vextracti128, FSxBX, YMM2, 000h
     2427
     2428EMIT_INSTR_PLUS_ICEBP_C64   vextracti128, XMM8,  YMM9, 0FFh
     2429EMIT_INSTR_PLUS_ICEBP_C64   vextracti128, FSxBX, YMM9, 0FFh
     2430EMIT_INSTR_PLUS_ICEBP_C64   vextracti128, XMM8,  YMM9, 000h
     2431EMIT_INSTR_PLUS_ICEBP_C64   vextracti128, FSxBX, YMM9, 000h
     2432
     2433;
     2434; VEXTRACTF128
     2435;
     2436EMIT_INSTR_PLUS_ICEBP   vextractf128, XMM1,  YMM2, 0FFh
     2437EMIT_INSTR_PLUS_ICEBP   vextractf128, FSxBX, YMM2, 0FFh
     2438EMIT_INSTR_PLUS_ICEBP   vextractf128, XMM1,  YMM2, 000h
     2439EMIT_INSTR_PLUS_ICEBP   vextractf128, FSxBX, YMM2, 000h
     2440
     2441EMIT_INSTR_PLUS_ICEBP_C64   vextractf128, XMM8,  YMM9, 0FFh
     2442EMIT_INSTR_PLUS_ICEBP_C64   vextractf128, FSxBX, YMM9, 0FFh
     2443EMIT_INSTR_PLUS_ICEBP_C64   vextractf128, XMM8,  YMM9, 000h
     2444EMIT_INSTR_PLUS_ICEBP_C64   vextractf128, FSxBX, YMM9, 000h
    24192445
    24202446;
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-3.c32

    r103980 r104060  
    1224012240    return bs3CpuInstr3_WorkerTestType3(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests,
    1224112241                                        g_aXcptConfig4, RT_ELEMENTS(g_aXcptConfig4), X86_EFL_STATUS_BITS);
     12242}
     12243
     12244
     12245/*
     12246 * VEXTRACTI128/VEXTRACTF128
     12247 */
     12248BS3_DECL_FAR(uint8_t) bs3CpuInstr3_vextracti128_vextractf128(uint8_t bMode)
     12249{
     12250    static BS3CPUINSTR3_TEST3_VALUES_T const s_aValuesFF[] =
     12251    {
     12252        {            RTUINT256_INIT_C(0, 0, 0, 0),
     12253            /* => */ RTUINT256_INIT_C(0, 0, 0, 0) },
     12254        {            RTUINT256_INIT_C(0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff),
     12255            /* => */ RTUINT256_INIT_C(0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff) },
     12256        {            RTUINT256_INIT_C(0x5555666677778888, 0x1111222233334444, 0x1111222233334444, 0x5555666677778888),
     12257            /* => */ RTUINT256_INIT_C(                 0,                  1, 0x5555666677778888, 0x1111222233334444) },
     12258        {            RTUINT256_INIT_C(0x4d09f02a6cdc73d5, 0x3ef417c8666b3fe6, 0xb4212fa8564c9ba2, 0x9c5ce073930996bb),
     12259            /* => */ RTUINT256_INIT_C(                 2,                  3, 0x4d09f02a6cdc73d5, 0x3ef417c8666b3fe6) },
     12260    };
     12261
     12262    static BS3CPUINSTR3_TEST3_VALUES_T const s_aValues00[] =
     12263    {
     12264        {            RTUINT256_INIT_C(0, 0, 0, 0),
     12265            /* => */ RTUINT256_INIT_C(0, 0, 0, 0) },
     12266        {            RTUINT256_INIT_C(0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff),
     12267            /* => */ RTUINT256_INIT_C(0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff) },
     12268        {            RTUINT256_INIT_C(0x5555666677778888, 0x1111222233334444, 0x1111222233334444, 0x5555666677778888),
     12269            /* => */ RTUINT256_INIT_C(                 4,                  5, 0x1111222233334444, 0x5555666677778888) },
     12270        {            RTUINT256_INIT_C(0x4d09f02a6cdc73d5, 0x3ef417c8666b3fe6, 0xb4212fa8564c9ba2, 0x9c5ce073930996bb),
     12271            /* => */ RTUINT256_INIT_C(                 6,                  7, 0xb4212fa8564c9ba2, 0x9c5ce073930996bb) },
     12272    };
     12273
     12274    static BS3CPUINSTR3_TEST3_T const s_aTests16[] =
     12275    {
     12276        {  bs3CpuInstr3_vextracti128_XMM1_YMM2_0FFh_icebp_c16,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12277        {  bs3CpuInstr3_vextracti128_FSxBX_YMM2_0FFh_icebp_c16, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12278        {  bs3CpuInstr3_vextracti128_XMM1_YMM2_000h_icebp_c16,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12279        {  bs3CpuInstr3_vextracti128_FSxBX_YMM2_000h_icebp_c16, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12280
     12281        {  bs3CpuInstr3_vextractf128_XMM1_YMM2_0FFh_icebp_c16,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12282        {  bs3CpuInstr3_vextractf128_FSxBX_YMM2_0FFh_icebp_c16, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12283        {  bs3CpuInstr3_vextractf128_XMM1_YMM2_000h_icebp_c16,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12284        {  bs3CpuInstr3_vextractf128_FSxBX_YMM2_000h_icebp_c16, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12285    };
     12286    static BS3CPUINSTR3_TEST3_T const s_aTests32[] =
     12287    {
     12288        {  bs3CpuInstr3_vextracti128_XMM1_YMM2_0FFh_icebp_c32,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12289        {  bs3CpuInstr3_vextracti128_FSxBX_YMM2_0FFh_icebp_c32, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12290        {  bs3CpuInstr3_vextracti128_XMM1_YMM2_000h_icebp_c32,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12291        {  bs3CpuInstr3_vextracti128_FSxBX_YMM2_000h_icebp_c32, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12292
     12293        {  bs3CpuInstr3_vextractf128_XMM1_YMM2_0FFh_icebp_c32,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12294        {  bs3CpuInstr3_vextractf128_FSxBX_YMM2_0FFh_icebp_c32, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12295        {  bs3CpuInstr3_vextractf128_XMM1_YMM2_000h_icebp_c32,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12296        {  bs3CpuInstr3_vextractf128_FSxBX_YMM2_000h_icebp_c32, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12297    };
     12298    static BS3CPUINSTR3_TEST3_T const s_aTests64[] =
     12299    {
     12300        {  bs3CpuInstr3_vextracti128_XMM1_YMM2_0FFh_icebp_c64,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12301        {  bs3CpuInstr3_vextracti128_FSxBX_YMM2_0FFh_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12302        {  bs3CpuInstr3_vextracti128_XMM1_YMM2_000h_icebp_c64,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12303        {  bs3CpuInstr3_vextracti128_FSxBX_YMM2_000h_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12304
     12305        {  bs3CpuInstr3_vextracti128_XMM8_YMM9_0FFh_icebp_c64,  255,         RM_REG, T_AVX2_128, 8,   9, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12306        {  bs3CpuInstr3_vextracti128_FSxBX_YMM9_0FFh_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 9, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12307        {  bs3CpuInstr3_vextracti128_XMM8_YMM9_000h_icebp_c64,  255,         RM_REG, T_AVX2_128, 8,   9, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12308        {  bs3CpuInstr3_vextracti128_FSxBX_YMM9_000h_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 9, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12309
     12310        {  bs3CpuInstr3_vextractf128_XMM1_YMM2_0FFh_icebp_c64,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12311        {  bs3CpuInstr3_vextractf128_FSxBX_YMM2_0FFh_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12312        {  bs3CpuInstr3_vextractf128_XMM1_YMM2_000h_icebp_c64,  255,         RM_REG, T_AVX2_128, 1,   2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12313        {  bs3CpuInstr3_vextractf128_FSxBX_YMM2_000h_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 2, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12314
     12315        {  bs3CpuInstr3_vextractf128_XMM8_YMM9_0FFh_icebp_c64,  255,         RM_REG, T_AVX2_128, 8,   9, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12316        {  bs3CpuInstr3_vextractf128_FSxBX_YMM9_0FFh_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 9, RT_ELEMENTS(s_aValuesFF), s_aValuesFF },
     12317        {  bs3CpuInstr3_vextractf128_XMM8_YMM9_000h_icebp_c64,  255,         RM_REG, T_AVX2_128, 8,   9, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12318        {  bs3CpuInstr3_vextractf128_FSxBX_YMM9_000h_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX2_128, 255, 9, RT_ELEMENTS(s_aValues00), s_aValues00 },
     12319    };
     12320    static BS3CPUINSTR3_TEST3_MODE_T const s_aTests[3] = BS3CPUINSTR3_TEST3_MODES_INIT(s_aTests16, s_aTests32, s_aTests64);
     12321    unsigned const                         iTest       = BS3CPUINSTR3_TEST_MODES_INDEX(bMode);
     12322    return bs3CpuInstr3_WorkerTestType3(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests,
     12323                                        g_aXcptConfig6, RT_ELEMENTS(g_aXcptConfig6), 0 /*cbMaxAlign*/);
    1224212324}
    1224312325
     
    1376713849#endif
    1376813850#if defined(ALL_TESTS)
    13769         { "vinserti128/vinsertf128",                        bs3CpuInstr3_vinserti128_vinsertf128, 0 },
     13851        { "vinserti128/vinsertf128",                        bs3CpuInstr3_vinserti128_vinsertf128,   0 },
     13852        { "vextracti128/vextractf128",                      bs3CpuInstr3_vextracti128_vextractf128, 0 },
     13853
    1377013854#endif
    1377113855#if defined(ALL_TESTS)
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