Changeset 95987 in vbox
- Timestamp:
- Aug 2, 2022 1:24:34 PM (2 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-3-template.mac
r95577 r95987 947 947 EMIT_INSTR_PLUS_ICEBP vpackusdw, YMM8, YMM9, YMM10 948 948 EMIT_INSTR_PLUS_ICEBP vpackusdw, YMM8, YMM9, FSxBX 949 %endif 950 951 ; 952 ; [V]PMAXUB 953 ; 954 EMIT_INSTR_PLUS_ICEBP pmaxub, MM1, MM2 955 EMIT_INSTR_PLUS_ICEBP pmaxub, MM1, FSxBX 956 957 EMIT_INSTR_PLUS_ICEBP pmaxub, XMM1, XMM2 958 EMIT_INSTR_PLUS_ICEBP pmaxub, XMM1, FSxBX 959 %if TMPL_BITS == 64 960 EMIT_INSTR_PLUS_ICEBP pmaxub, XMM8, XMM9 961 EMIT_INSTR_PLUS_ICEBP pmaxub, XMM8, FSxBX 962 %endif 963 964 EMIT_INSTR_PLUS_ICEBP vpmaxub, XMM1, XMM2, XMM3 965 EMIT_INSTR_PLUS_ICEBP vpmaxub, XMM1, XMM2, FSxBX 966 %if TMPL_BITS == 64 967 EMIT_INSTR_PLUS_ICEBP vpmaxub, XMM8, XMM9, XMM10 968 EMIT_INSTR_PLUS_ICEBP vpmaxub, XMM8, XMM9, FSxBX 969 %endif 970 971 EMIT_INSTR_PLUS_ICEBP vpmaxub, YMM1, YMM2, YMM3 972 EMIT_INSTR_PLUS_ICEBP vpmaxub, YMM1, YMM2, FSxBX 973 %if TMPL_BITS == 64 974 EMIT_INSTR_PLUS_ICEBP vpmaxub, YMM8, YMM9, YMM10 975 EMIT_INSTR_PLUS_ICEBP vpmaxub, YMM8, YMM9, FSxBX 949 976 %endif 950 977 -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-3.c32
r95577 r95987 3346 3346 { bs3CpuInstr3_vpackusdw_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX2_256, 8, 9, 10, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3347 3347 { bs3CpuInstr3_vpackusdw_YMM8_YMM9_FSxBX_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX2_256, 8, 9, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3348 }; 3349 static BS3CPUINSTR3_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR3_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); 3350 unsigned const iTest = BS3CPUINSTR3_TEST_MODES_INDEX(bMode); 3351 return bs3CpuInstr3_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, 3352 g_aXcptConfig4, RT_ELEMENTS(g_aXcptConfig4)); 3353 } 3354 3355 3356 /* 3357 * [V]PMAXUB - Compare unsigned byte integers and returns maximum values. 3358 */ 3359 BS3_FNBS3FAR_PROTOTYPES_CMN(bs3CpuInstr3_pmaxub_MM1_MM2_icebp); 3360 BS3_FNBS3FAR_PROTOTYPES_CMN(bs3CpuInstr3_pmaxub_MM1_FSxBX_icebp); 3361 BS3_FNBS3FAR_PROTOTYPES_CMN(bs3CpuInstr3_pmaxub_XMM1_XMM2_icebp); 3362 BS3_FNBS3FAR_PROTOTYPES_CMN(bs3CpuInstr3_pmaxub_XMM1_FSxBX_icebp); 3363 extern FNBS3FAR bs3CpuInstr3_pmaxub_XMM8_XMM9_icebp_c64; 3364 extern FNBS3FAR bs3CpuInstr3_pmaxub_XMM8_FSxBX_icebp_c64; 3365 BS3_FNBS3FAR_PROTOTYPES_CMN(bs3CpuInstr3_vpmaxub_XMM1_XMM2_XMM3_icebp); 3366 BS3_FNBS3FAR_PROTOTYPES_CMN(bs3CpuInstr3_vpmaxub_XMM1_XMM2_FSxBX_icebp); 3367 extern FNBS3FAR bs3CpuInstr3_vpmaxub_XMM8_XMM9_XMM10_icebp_c64; 3368 extern FNBS3FAR bs3CpuInstr3_vpmaxub_XMM8_XMM9_FSxBX_icebp_c64; 3369 BS3_FNBS3FAR_PROTOTYPES_CMN(bs3CpuInstr3_vpmaxub_YMM1_YMM2_YMM3_icebp); 3370 BS3_FNBS3FAR_PROTOTYPES_CMN(bs3CpuInstr3_vpmaxub_YMM1_YMM2_FSxBX_icebp); 3371 extern FNBS3FAR bs3CpuInstr3_vpmaxub_YMM8_YMM9_YMM10_icebp_c64; 3372 extern FNBS3FAR bs3CpuInstr3_vpmaxub_YMM8_YMM9_FSxBX_icebp_c64; 3373 3374 BS3_DECL_FAR(uint8_t) bs3CpuInstr3_v_pmaxub(uint8_t bMode) 3375 { 3376 #define NO_PMAXUB_64 /** @todo Throws errors on Intel hardware in HM mode. */ 3377 #ifndef NO_PMAXUB_64 3378 static BS3CPUINSTR3_TEST1_VALUES_T const s_aValues64[] = 3379 { 3380 { /*src2*/ RTUINT256_INIT_C( 0, 0, 0, 0), 3381 /*src1*/ RTUINT256_INIT_C( 0, 0, 0, 0), 3382 /* => */ RTUINT256_INIT_C( 0, 0, 0, 0) }, 3383 { /*src2*/ RTUINT256_INIT_C( 1, 2, 3, 0xf1f2f3f4f5f6f7f8), 3384 /*src1*/ RTUINT256_INIT_C( 1, 2, 3, 0xe1e2e3e4e5e6e7e8), 3385 /* => */ RTUINT256_INIT_C( 1, 2, 3, 0xf1f2f3f4f5f6f7f8) }, 3386 { /*src2*/ RTUINT256_INIT_C( 4, 5, 7, 0x5555666677778888), 3387 /*src1*/ RTUINT256_INIT_C( 4, 6, 7, 0xddddeeeeffff0000), 3388 /* => */ RTUINT256_INIT_C( 4, 6, 7, 0xddddeeeeffff0000) }, 3389 { /*src2*/ RTUINT256_INIT_C( 8, 10, 11, 0x9c5ce073930996bb), 3390 /*src1*/ RTUINT256_INIT_C(12, 13, 14, 0x43d3cda0238499fd), 3391 /* => */ RTUINT256_INIT_C(12, 13, 14, 0x9cd3cda0938499fd) }, 3392 { /*src2*/ RTUINT256_INIT_C( 8, 10, 11, 0xff820064fffe0042), 3393 /*src1*/ RTUINT256_INIT_C(12, 13, 14, 0x0022fe00ff80ff81), 3394 /* => */ RTUINT256_INIT_C(12, 13, 14, 0xff82fe64fffeff81) }, 3395 }; 3396 #endif 3397 static BS3CPUINSTR3_TEST1_VALUES_T const s_aValuesOthers[] = 3398 { 3399 { /*src2*/ RTUINT256_INIT_C(0, 0, 0, 0), 3400 /*src1*/ RTUINT256_INIT_C(0, 0, 0, 0), 3401 /* => */ RTUINT256_INIT_C(0, 0, 0, 0) }, 3402 { /*src2*/ RTUINT256_INIT_C(0xf1f2f3f4f5f6f7f8, 0xe1e2e3e4e5e6e7e8, 0xd1d2d3d4d5d6d7d8, 0xc1c2c3c4c5c6c7c8), 3403 /*src1*/ RTUINT256_INIT_C(0xb1b2b3b4b5b6b7b8, 0xa1a2a3a4a5a6a7a8, 0x9192939495969798, 0x8182838485868788), 3404 /* => */ RTUINT256_INIT_C(0xf1f2f3f4f5f6f7f8, 0xe1e2e3e4e5e6e7e8, 0xd1d2d3d4d5d6d7d8, 0xc1c2c3c4c5c6c7c8) }, 3405 { /*src2*/ RTUINT256_INIT_C(0x4d09f02a6cdc73d5, 0x3ef417c8666b3fe6, 0xb4212fa8564c9ba2, 0x9c5ce073930996bb), 3406 /*src1*/ RTUINT256_INIT_C(0x1eddddac09633294, 0xf95c8eec40725633, 0x8800e95bbf9962c3, 0x43d3cda0238499fd), 3407 /* => */ RTUINT256_INIT_C(0x4dddf0ac6cdc73d5, 0xf9f48eec667256e6, 0xb421e9a8bf999bc3, 0x9cd3e0a0938499fd) }, 3408 }; 3409 3410 static BS3CPUINSTR3_TEST1_T const s_aTests16[] = 3411 { 3412 #ifndef NO_PMAXUB_64 3413 { bs3CpuInstr3_pmaxub_MM1_MM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, RT_ELEMENTS(s_aValues64), s_aValues64 }, 3414 { bs3CpuInstr3_pmaxub_MM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, RT_ELEMENTS(s_aValues64), s_aValues64 }, 3415 #endif 3416 { bs3CpuInstr3_pmaxub_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE2, 1, 1, 2, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3417 { bs3CpuInstr3_pmaxub_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE2, 1, 1, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3418 { bs3CpuInstr3_vpmaxub_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3419 { bs3CpuInstr3_vpmaxub_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_DB, RM_MEM, T_AVX_128, 1, 2, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3420 { bs3CpuInstr3_vpmaxub_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX2_256, 1, 2, 3, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3421 { bs3CpuInstr3_vpmaxub_YMM1_YMM2_FSxBX_icebp_c16, X86_XCPT_DB, RM_MEM, T_AVX2_256, 1, 2, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3422 }; 3423 static BS3CPUINSTR3_TEST1_T const s_aTests32[] = 3424 { 3425 #ifndef NO_PMAXUB_64 3426 { bs3CpuInstr3_pmaxub_MM1_MM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, RT_ELEMENTS(s_aValues64), s_aValues64 }, 3427 { bs3CpuInstr3_pmaxub_MM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, RT_ELEMENTS(s_aValues64), s_aValues64 }, 3428 #endif 3429 { bs3CpuInstr3_pmaxub_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE2, 1, 1, 2, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3430 { bs3CpuInstr3_pmaxub_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE2, 1, 1, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3431 { bs3CpuInstr3_vpmaxub_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3432 { bs3CpuInstr3_vpmaxub_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_DB, RM_MEM, T_AVX_128, 1, 2, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3433 { bs3CpuInstr3_vpmaxub_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX2_256, 1, 2, 3, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3434 { bs3CpuInstr3_vpmaxub_YMM1_YMM2_FSxBX_icebp_c32, X86_XCPT_DB, RM_MEM, T_AVX2_256, 1, 2, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3435 }; 3436 static BS3CPUINSTR3_TEST1_T const s_aTests64[] = 3437 { 3438 #ifndef NO_PMAXUB_64 3439 { bs3CpuInstr3_pmaxub_MM1_MM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, RT_ELEMENTS(s_aValues64), s_aValues64 }, 3440 { bs3CpuInstr3_pmaxub_MM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, RT_ELEMENTS(s_aValues64), s_aValues64 }, 3441 #endif 3442 { bs3CpuInstr3_pmaxub_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE2, 1, 1, 2, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3443 { bs3CpuInstr3_pmaxub_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 1, 1, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3444 { bs3CpuInstr3_pmaxub_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE2, 8, 8, 9, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3445 { bs3CpuInstr3_pmaxub_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 8, 8, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3446 { bs3CpuInstr3_vpmaxub_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3447 { bs3CpuInstr3_vpmaxub_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX_128, 1, 2, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3448 { bs3CpuInstr3_vpmaxub_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3449 { bs3CpuInstr3_vpmaxub_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX_128, 8, 9, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3450 { bs3CpuInstr3_vpmaxub_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX2_256, 1, 2, 3, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3451 { bs3CpuInstr3_vpmaxub_YMM1_YMM2_FSxBX_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX2_256, 1, 2, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3452 { bs3CpuInstr3_vpmaxub_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX2_256, 8, 9, 10, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3453 { bs3CpuInstr3_vpmaxub_YMM8_YMM9_FSxBX_icebp_c64, X86_XCPT_DB, RM_MEM, T_AVX2_256, 8, 9, 255, RT_ELEMENTS(s_aValuesOthers), s_aValuesOthers }, 3348 3454 }; 3349 3455 static BS3CPUINSTR3_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR3_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); … … 6263 6369 #endif 6264 6370 #if defined(ALL_TESTS) 6371 { "[v]pmaxub", bs3CpuInstr3_v_pmaxub, 0 }, 6372 #endif 6373 #if defined(ALL_TESTS) 6265 6374 { "[v]movntdqa", bs3CpuInstr3_v_movntdqa, 0 }, 6266 6375 { "[v]movntdq", bs3CpuInstr3_v_movntdq, 0 }, … … 6281 6390 { "[v]movdqa", bs3CpuInstr3_v_movdqa, 0 }, 6282 6391 #endif 6392 #if defined(ALL_TESTS) 6283 6393 { "[v]ptest", bs3CpuInstr3_v_ptest, 0 }, 6394 #endif 6284 6395 }; 6285 6396 Bs3TestInit("bs3-cpu-instr-3");
Note:
See TracChangeset
for help on using the changeset viewer.