Changeset 106815 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Nov 1, 2024 8:11:27 AM (3 months ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-4-template.mac
r106733 r106815 1028 1028 EMIT_INSTR_PLUS_ICEBP vcvtsi2sd, XMM1, XMM2, EAX 1029 1029 EMIT_INSTR_PLUS_ICEBP vcvtsi2sd, XMM1, XMM2, FSxBX_D 1030 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM9, EAX1030 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM9, R8D 1031 1031 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM9, FSxBX_D 1032 1032 ; AVX-128, fp64 <- int64 (single) 1033 1033 EMIT_INSTR_PLUS_ICEBP vcvtsi2sd, XMM1, XMM2, RAX 1034 1034 EMIT_INSTR_PLUS_ICEBP vcvtsi2sd, XMM1, XMM2, FSxBX_Q 1035 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM9, R AX1035 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM9, R8 1036 1036 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM9, FSxBX_Q 1037 1037 ; AVX-128, fp64 <- int32, same-reg (single) 1038 1038 EMIT_INSTR_PLUS_ICEBP vcvtsi2sd, XMM1, XMM1, EAX 1039 1039 EMIT_INSTR_PLUS_ICEBP vcvtsi2sd, XMM1, XMM1, FSxBX_D 1040 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM8, EAX1040 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM8, R8D 1041 1041 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM8, FSxBX_D 1042 1042 ; AVX-128, fp64 <- int64, same-reg (single) 1043 1043 EMIT_INSTR_PLUS_ICEBP vcvtsi2sd, XMM1, XMM1, RAX 1044 1044 EMIT_INSTR_PLUS_ICEBP vcvtsi2sd, XMM1, XMM1, FSxBX_Q 1045 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM8, R AX1045 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM8, R8 1046 1046 EMIT_INSTR_PLUS_ICEBP_C64 vcvtsi2sd, XMM8, XMM8, FSxBX_Q 1047 1047 ; @todo test with VEX.W=1 in 16/32-bit modes; SDM says behaves as if W=0 -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-4.c32
r106814 r106815 16743 16743 * CVTSI2SS. 16744 16744 */ 16745 BS3_DECL_FAR(uint8_t) bs3CpuInstr4_ cvtsi2ss(uint8_t bMode)16745 BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_cvtsi2ss(uint8_t bMode) 16746 16746 { 16747 static BS3CPUINSTR4_TEST1_VALUES_ PS_T const s_aValues32[] =16747 static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues32[] = 16748 16748 { 16749 16749 /* … … 16845 16845 }; 16846 16846 16847 static BS3CPUINSTR4_TEST1_VALUES_ PS_T const s_aValues64[] =16847 static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues64[] = 16848 16848 { 16849 16849 /* … … 16862 16862 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16863 16863 { /* => xmm */ { FP32_V(0,0x6b79a3,0x99), FP32_RAND_x7_V3 } }, 16864 /*123456792.0*/16864 /*123456792.0*/ 16865 16865 /*mxcsr:in */ 0, 16866 16866 /*128:out */ X86_MXCSR_PE, 16867 16867 /*256:out */ -1 }, 16868 { { /* src r64 */ { FP32_INT64_C(8526495043095935640), FP32_RAND_x6_V4 } }, 16869 /*0x76543210FEDCBA98*/ 16870 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16871 { /* => xmm */ { FP32_V(0,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16872 /* 8526494970100580352.0 = 0x7654320000000000 */ 16868 { { /* src r64 */ { FP32_INT64_C(8526495043095935640)/*0x76543210FEDCBA98*/, FP32_RAND_x6_V4 } }, 16869 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16870 { /* => xmm */ { FP32_V(0,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16871 /*8526494970100580352.0=0x7654320000000000*/ 16873 16872 /*mxcsr:in */ 0, 16874 16873 /*128:out */ X86_MXCSR_PE, 16875 16874 /*256:out */ -1 }, 16876 { { /* src r64 */ { FP32_INT64_C(-8526495043095935640), FP32_RAND_x6_V4 } }, 16877 /*-0x76543210FEDCBA98*/ 16878 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16879 { /* => xmm */ { FP32_V(1,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16880 /* -8526494970100580352.0 = -0x7654320000000000 */ 16875 { { /* src r64 */ { FP32_INT64_C(-8526495043095935640)/*-0x76543210FEDCBA98*/, FP32_RAND_x6_V4 } }, 16876 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16877 { /* => xmm */ { FP32_V(1,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16878 /*-8526494970100580352.0=-0x7654320000000000*/ 16881 16879 /*mxcsr:in */ 0, 16882 16880 /*128:out */ X86_MXCSR_PE, … … 16891 16889 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16892 16890 { /* => xmm */ { FP32_V(0,0x0,0xbe), FP32_RAND_x7_V3 } }, 16893 /* 9223372036854775808.0; exactly INT64_MAX, so why PE (i7-10700)??*/16891 /*9223372036854775808.0 = INT64_MAX+1*/ 16894 16892 /*mxcsr:in */ X86_MXCSR_XCPT_MASK, 16895 16893 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE, … … 16898 16896 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16899 16897 { /* => xmm */ { FP32_V(1,0x0,0xbe), FP32_RAND_x7_V3 } }, 16900 /* -9223372036854775808.0; exactly -INT64_MAX, so why PE (i7-10700)??*/16898 /*-9223372036854775808.0 = -INT64_MAX-1*/ 16901 16899 /*mxcsr:in */ X86_MXCSR_XCPT_MASK, 16902 16900 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE, 16903 16901 /*256:out */ -1 }, 16904 { { /* src r64 */ { FP32_INT64_C(8526495043095935640), FP32_RAND_x6_V4 } }, 16905 /*0x76543210FEDCBA98*/ 16906 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16907 { /* => xmm */ { FP32_V(0,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16908 /* 8526494970100580352.0 = 0x7654320000000000 */ 16902 { { /* src r64 */ { FP32_INT64_C(8526495043095935640)/*0x76543210FEDCBA98*/, FP32_RAND_x6_V4 } }, 16903 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16904 { /* => xmm */ { FP32_V(0,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16905 /*8526494970100580352.0=0x7654320000000000*/ 16909 16906 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ, 16910 16907 /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_PE, 16911 16908 /*256:out */ -1 }, 16912 { { /* src r64 */ { FP32_INT64_C(8526495043095935640), FP32_RAND_x6_V4 } }, 16913 /*0x76543210FEDCBA98*/ 16914 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16915 { /* => xmm */ { FP32_V(0,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16916 /* 8526494970100580352.0 = 0x7654320000000000 */ 16909 { { /* src r64 */ { FP32_INT64_C(8526495043095935640)/*0x76543210FEDCBA98*/, FP32_RAND_x6_V4 } }, 16910 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16911 { /* => xmm */ { FP32_V(0,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16912 /*8526494970100580352.0=0x7654320000000000*/ 16917 16913 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 16918 16914 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 16919 16915 /*256:out */ -1 }, 16920 { { /* src r64 */ { FP32_INT64_C(-8526495043095935640), FP32_RAND_x6_V4 } }, 16921 /*-0x76543210FEDCBA98*/ 16922 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16923 { /* => xmm */ { FP32_V(1,0x6ca865,0xbd), FP32_RAND_x7_V3 } }, 16924 /* -8526495519856394240.0 = -0x7654328000000000 */ 16916 { { /* src r64 */ { FP32_INT64_C(-8526495043095935640)/*-0x76543210FEDCBA98*/, FP32_RAND_x6_V4 } }, 16917 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16918 { /* => xmm */ { FP32_V(1,0x6ca865,0xbd), FP32_RAND_x7_V3 } }, 16919 /*-8526495519856394240.0=-0x7654328000000000*/ 16925 16920 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 16926 16921 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 16927 16922 /*256:out */ -1 }, 16928 { { /* src r64 */ { FP32_INT64_C(8526495043095935640), FP32_RAND_x6_V4 } }, 16929 /*0x76543210FEDCBA98*/ 16930 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16931 { /* => xmm */ { FP32_V(0,0x6ca865,0xbd), FP32_RAND_x7_V3 } }, 16932 /* 8526495519856394240.0 = 0x7654328000000000 */ 16923 { { /* src r64 */ { FP32_INT64_C(8526495043095935640)/*0x76543210FEDCBA98*/, FP32_RAND_x6_V4 } }, 16924 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16925 { /* => xmm */ { FP32_V(0,0x6ca865,0xbd), FP32_RAND_x7_V3 } }, 16926 /*8526495519856394240.0=0x7654328000000000*/ 16933 16927 /*mxcsr:in */ X86_MXCSR_RC_UP, 16934 16928 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 16935 16929 /*256:out */ -1 }, 16936 { { /* src r64 */ { FP32_INT64_C(-8526495043095935640), FP32_RAND_x6_V4 } }, 16937 /*-0x76543210FEDCBA98*/ 16938 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16939 { /* => xmm */ { FP32_V(1,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16940 /* -8526494970100580352.0 = -0x7654320000000000 */ 16930 { { /* src r64 */ { FP32_INT64_C(-8526495043095935640)/*-0x76543210FEDCBA98*/, FP32_RAND_x6_V4 } }, 16931 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16932 { /* => xmm */ { FP32_V(1,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16933 /*-8526494970100580352.0=-0x7654320000000000*/ 16941 16934 /*mxcsr:in */ X86_MXCSR_RC_UP, 16942 16935 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 16943 16936 /*256:out */ -1 }, 16944 { { /* src r64 */ { FP32_INT64_C(8526495043095935640), FP32_RAND_x6_V4 } }, 16945 /*0x76543210FEDCBA98*/ 16946 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16947 { /* => xmm */ { FP32_V(0,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16948 /* 8526494970100580352.0 = 0x7654320000000000 */ 16937 { { /* src r64 */ { FP32_INT64_C(8526495043095935640)/*0x76543210FEDCBA98*/, FP32_RAND_x6_V4 } }, 16938 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16939 { /* => xmm */ { FP32_V(0,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16940 /*8526494970100580352.0=0x7654320000000000*/ 16949 16941 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 16950 16942 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 16951 16943 /*256:out */ -1 }, 16952 { { /* src r64 */ { FP32_INT64_C(-8526495043095935640), FP32_RAND_x6_V4 } }, 16953 /*-0x76543210FEDCBA98*/ 16954 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16955 { /* => xmm */ { FP32_V(1,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16956 /* -8526494970100580352.0 = -0x7654320000000000 */ 16944 { { /* src r64 */ { FP32_INT64_C(-8526495043095935640)/*-0x76543210FEDCBA98*/, FP32_RAND_x6_V4 } }, 16945 { /* src xmm */ { FP32_NORM_V0(0), FP32_RAND_x7_V3 } }, 16946 { /* => xmm */ { FP32_V(1,0x6ca864,0xbd), FP32_RAND_x7_V3 } }, 16947 /*-8526494970100580352.0=-0x7654320000000000*/ 16957 16948 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 16958 16949 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, … … 17039 17030 * CVTSS2SI. 17040 17031 */ 17041 BS3_DECL_FAR(uint8_t) bs3CpuInstr4_ cvtss2si(uint8_t bMode)17032 BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_cvtss2si(uint8_t bMode) 17042 17033 { 17043 static BS3CPUINSTR4_TEST1_VALUES_ PS_T const s_aValues32[] =17034 static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues32[] = 17044 17035 { 17045 17036 /* … … 17218 17209 /*256:out */ -1 }, 17219 17210 }; 17220 static BS3CPUINSTR4_TEST1_VALUES_ PS_T const s_aValues64[] =17211 static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues64[] = 17221 17212 { 17222 17213 /* … … 17480 17471 * CVTTSS2SI. 17481 17472 */ 17482 BS3_DECL_FAR(uint8_t) bs3CpuInstr4_ cvttss2si(uint8_t bMode)17473 BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_cvttss2si(uint8_t bMode) 17483 17474 { 17484 static BS3CPUINSTR4_TEST1_VALUES_ PS_T const s_aValues32[] =17475 static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues32[] = 17485 17476 { 17486 17477 /* … … 17659 17650 /*256:out */ -1 }, 17660 17651 }; 17661 static BS3CPUINSTR4_TEST1_VALUES_ PS_T const s_aValues64[] =17652 static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues64[] = 17662 17653 { 17663 17654 /* … … 18295 18286 return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, 18296 18287 g_aXcptConfig23_4, RT_ELEMENTS(g_aXcptConfig23_4)); 18288 } 18289 18290 18291 /* 18292 * CVTSI2SD. 18293 */ 18294 BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_cvtsi2sd(uint8_t bMode) 18295 { 18296 static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues32[] = 18297 { 18298 /* 0*/{ { /* src r32 */ { FP64_INT32_C(0, 12345) } }, 18299 { /* src xmm */ { FP64_RAND_V0(0), FP64_RAND_x3_V2 } }, 18300 { /* => xmm */ { FP64_0(0), FP64_RAND_x3_V2 } }, 18301 /*mxcsr:in */ 0, 18302 /*128:out */ 0, 18303 /*256:out */ -1 }, 18304 /* 18305 * Normals & Precision. 18306 */ 18307 /* 1*/{ { /* src r32 */ { FP64_INT32_C(123456789, 12345) } }, 18308 { /* src xmm */ { FP64_RAND_V1(0), FP64_RAND_x3_V2 } }, 18309 { /* => xmm */ { FP64_V(0,0xd6f3454000000,0x419), FP64_RAND_x3_V2 } }, 18310 /*123456789.0*/ 18311 /*mxcsr:in */ 0, 18312 /*128:out */ 0, 18313 /*256:out */ -1 }, 18314 { { /* src r32 */ { FP64_INT32_C(-123456789, 12345) } }, 18315 { /* src xmm */ { FP64_RAND_V2(0), FP64_RAND_x3_V2 } }, 18316 { /* => xmm */ { FP64_V(1,0xd6f3454000000,0x419), FP64_RAND_x3_V2 } }, 18317 /*-123456789.0*/ 18318 /*mxcsr:in */ 0, 18319 /*128:out */ 0, 18320 /*256:out */ -1 }, 18321 { { /* src r32 */ { FP64_INT32_C(-47, 12345) } }, 18322 { /* src xmm */ { FP64_RAND_V3(0), FP64_RAND_x3_V2 } }, 18323 { /* => xmm */ { FP64_V(1,0x7800000000000,0x404), FP64_RAND_x3_V2 } }, 18324 /*-47.0*/ 18325 /*mxcsr:in */ 0, 18326 /*128:out */ 0, 18327 /*256:out */ -1 }, 18328 { { /* src r32 */ { FP64_INT32(INT32_MAX, 12345) } }, 18329 { /* src xmm */ { FP64_RAND_V3(1), FP64_RAND_x3_V2 } }, 18330 { /* => xmm */ { FP64_V(0,0xfffffffc00000,0x41d), FP64_RAND_x3_V2 } }, 18331 /*2147483647.0*/ 18332 /*mxcsr:in */ 0, 18333 /*128:out */ 0, 18334 /*256:out */ -1 }, 18335 { { /* src r32 */ { FP64_INT32(-INT32_MAX, 12345) } }, 18336 { /* src xmm */ { FP64_RAND_V2(1), FP64_RAND_x3_V2 } }, 18337 { /* => xmm */ { FP64_V(1,0xfffffffc00000,0x41d), FP64_RAND_x3_V2 } }, 18338 /*-2147483647.0*/ 18339 /*mxcsr:in */ 0, 18340 /*128:out */ 0, 18341 /*256:out */ -1 }, 18342 { { /* src r32 */ { FP64_INT32_C(123456789, 12345) } }, 18343 { /* src xmm */ { FP64_RAND_V1(1), FP64_RAND_x3_V2 } }, 18344 { /* => xmm */ { FP64_V(0,0xd6f3454000000,0x419), FP64_RAND_x3_V2 } }, 18345 /*123456789.0*/ 18346 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ, 18347 /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ, 18348 /*256:out */ -1 }, 18349 { { /* src r32 */ { FP64_INT32_C(123456789, 12345) } }, 18350 { /* src xmm */ { FP64_RAND_V0(1), FP64_RAND_x3_V2 } }, 18351 { /* => xmm */ { FP64_V(0,0xd6f3454000000,0x419), FP64_RAND_x3_V2 } }, 18352 /*123456789.0*/ 18353 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 18354 /*128:out */ X86_MXCSR_RC_DOWN, 18355 /*256:out */ -1 }, 18356 { { /* src r32 */ { FP64_INT32_C(-123456789, 12345) } }, 18357 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18358 { /* => xmm */ { FP64_V(1,0xd6f3454000000,0x419), FP64_RAND_x3_V2 } }, 18359 /*-123456789.0*/ 18360 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 18361 /*128:out */ X86_MXCSR_RC_DOWN, 18362 /*256:out */ -1 }, 18363 { { /* src r32 */ { FP64_INT32_C(123456789, 12345) } }, 18364 { /* src xmm */ { FP64_QNAN(1), FP64_RAND_x3_V2 } }, 18365 { /* => xmm */ { FP64_V(0,0xd6f3454000000,0x419), FP64_RAND_x3_V2 } }, 18366 /*123456789.0*/ 18367 /*mxcsr:in */ X86_MXCSR_RC_UP, 18368 /*128:out */ X86_MXCSR_RC_UP, 18369 /*256:out */ -1 }, 18370 { { /* src r32 */ { FP64_INT32_C(-123456789, 12345) } }, 18371 { /* src xmm */ { FP64_SNAN(0), FP64_RAND_x3_V2 } }, 18372 { /* => xmm */ { FP64_V(1,0xd6f3454000000,0x419), FP64_RAND_x3_V2 } }, 18373 /*-123456789.0*/ 18374 /*mxcsr:in */ X86_MXCSR_RC_UP, 18375 /*128:out */ X86_MXCSR_RC_UP, 18376 /*256:out */ -1 }, 18377 { { /* src r32 */ { FP64_INT32_C(123456789, 12345) } }, 18378 { /* src xmm */ { FP64_SNAN(1), FP64_RAND_x3_V2 } }, 18379 { /* => xmm */ { FP64_V(0,0xd6f3454000000,0x419), FP64_RAND_x3_V2 } }, 18380 /*123456789.0*/ 18381 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 18382 /*128:out */ X86_MXCSR_RC_ZERO, 18383 /*256:out */ -1 }, 18384 { { /* src r32 */ { FP64_INT32_C(-123456789, 12345) } }, 18385 { /* src xmm */ { FP64_INF(0), FP64_RAND_x3_V2 } }, 18386 { /* => xmm */ { FP64_V(1,0xd6f3454000000,0x419), FP64_RAND_x3_V2 } }, 18387 /*-123456789.0*/ 18388 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 18389 /*128:out */ X86_MXCSR_RC_ZERO, 18390 /*256:out */ -1 }, 18391 }; 18392 18393 static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues64[] = 18394 { 18395 /* 18396 * Zero. 18397 */ 18398 /* 0*/{ { /* src r64 */ { FP64_INT_C(0) } }, 18399 { /* src xmm */ { FP64_NORM_V2(1), FP64_RAND_x3_V3 } }, 18400 { /* => xmm */ { FP64_0(0), FP64_RAND_x3_V3 } }, 18401 /*mxcsr:in */ 0, 18402 /*128:out */ 0, 18403 /*256:out */ -1 }, 18404 /* 18405 * Normals & Precision. 18406 */ 18407 /* 1*/{ { /* src r64 */ { FP64_INT_C(123456789) } }, 18408 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18409 { /* => xmm */ { FP64_V(0,0xd6f3454000000,0x419), FP64_RAND_x3_V2 } }, 18410 /*123456789.0*/ 18411 /*mxcsr:in */ 0, 18412 /*128:out */ 0, 18413 /*256:out */ -1 }, 18414 { { /* src r64 */ { FP64_INT_C(8526495043095935640)/*0x76543210FEDCBA98*/ } }, 18415 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18416 { /* => xmm */ { FP64_V(0,0xd950c843fb72f,0x43d), FP64_RAND_x3_V2 } }, 18417 /*8526495043095936000.0=0x76543210FEDCBC00*/ 18418 /*mxcsr:in */ 0, 18419 /*128:out */ X86_MXCSR_PE, 18420 /*256:out */ -1 }, 18421 { { /* src r64 */ { FP64_INT_C(-8526495043095935640)/*-0x76543210FEDCBA98*/ } }, 18422 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18423 { /* => xmm */ { FP64_V(1,0xd950c843fb72f,0x43d), FP64_RAND_x3_V2 } }, 18424 /*-8526495043095936000.0=-0x76543210FEDCBC00*/ 18425 /*mxcsr:in */ 0, 18426 /*128:out */ X86_MXCSR_PE, 18427 /*256:out */ -1 }, 18428 { { /* src r64 */ { FP64_INT_C(-2) } }, 18429 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18430 { /* => xmm */ { FP64_V(1,0,0x400), FP64_RAND_x3_V2 } }, 18431 /*mxcsr:in */ 0, 18432 /*128:out */ 0, 18433 /*256:out */ -1 }, 18434 { { /* src r64 */ { FP64_INT(INT64_MAX) } }, 18435 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18436 { /* => xmm */ { FP64_V(0,0x0,0x43e), FP64_RAND_x3_V2 } }, 18437 /*9223372036854775808.0 = INT64_MAX+1*/ 18438 /*mxcsr:in */ X86_MXCSR_XCPT_MASK, 18439 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE, 18440 /*256:out */ -1 }, 18441 { { /* src r64 */ { FP64_INT(-INT64_MAX) } }, 18442 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18443 { /* => xmm */ { FP64_V(1,0x0,0x43e), FP64_RAND_x3_V2 } }, 18444 /*-9223372036854775808.0 = -INT64_MAX-1*/ 18445 /*mxcsr:in */ X86_MXCSR_XCPT_MASK, 18446 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE, 18447 /*256:out */ -1 }, 18448 18449 { { /* src r64 */ { FP64_INT_C(8526495043095935640)/*0x76543210FEDCBA98*/ } }, 18450 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18451 { /* => xmm */ { FP64_V(0,0xd950c843fb72f,0x43d), FP64_RAND_x3_V2 } }, 18452 /*8526495043095936000.0=0x76543210FEDCBC00*/ 18453 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ, 18454 /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_PE, 18455 /*256:out */ -1 }, 18456 { { /* src r64 */ { FP64_INT_C(8526495043095935640)/*0x76543210FEDCBA98*/ } }, 18457 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18458 { /* => xmm */ { FP64_V(0,0xd950c843fb72e,0x43d), FP64_RAND_x3_V2 } }, 18459 /*8526495043095934976.0=0x76543210FEDCB800*/ 18460 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 18461 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 18462 /*256:out */ -1 }, 18463 { { /* src r64 */ { FP64_INT_C(-8526495043095935640)/*-0x76543210FEDCBA98*/ } }, 18464 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18465 { /* => xmm */ { FP64_V(1,0xd950c843fb72f,0x43d), FP64_RAND_x3_V2 } }, 18466 /*-8526495043095936000.0=-0x76543210FEDCBC00*/ 18467 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 18468 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 18469 /*256:out */ -1 }, 18470 { { /* src r64 */ { FP64_INT_C(8526495043095935640)/*0x76543210FEDCBA98*/ } }, 18471 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18472 { /* => xmm */ { FP64_V(0,0xd950c843fb72f,0x43d), FP64_RAND_x3_V2 } }, 18473 /*8526495043095936000.0=0x76543210FEDCBC00*/ 18474 /*mxcsr:in */ X86_MXCSR_RC_UP, 18475 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 18476 /*256:out */ -1 }, 18477 { { /* src r64 */ { FP64_INT_C(-8526495043095935640)/*-0x76543210FEDCBA98*/ } }, 18478 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18479 { /* => xmm */ { FP64_V(1,0xd950c843fb72e,0x43d), FP64_RAND_x3_V2 } }, 18480 /*-8526495043095934976.0=-0x76543210FEDCB800*/ 18481 /*mxcsr:in */ X86_MXCSR_RC_UP, 18482 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 18483 /*256:out */ -1 }, 18484 { { /* src r64 */ { FP64_INT_C(8526495043095935640)/*0x76543210FEDCBA98*/ } }, 18485 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18486 { /* => xmm */ { FP64_V(0,0xd950c843fb72e,0x43d), FP64_RAND_x3_V2 } }, 18487 /*8526495043095934976.0=0x76543210FEDCB800*/ 18488 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 18489 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 18490 /*256:out */ -1 }, 18491 { { /* src r64 */ { FP64_INT_C(-8526495043095935640)/*-0x76543210FEDCBA98*/ } }, 18492 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18493 { /* => xmm */ { FP64_V(1,0xd950c843fb72e,0x43d), FP64_RAND_x3_V2 } }, 18494 /*-8526495043095934976.0=-0x76543210FEDCB800*/ 18495 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 18496 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 18497 /*256:out */ -1 }, 18498 }; 18499 /* 18500 * Infinity, Overflow, Underflow, Denormal, Invalid not possible. 18501 */ 18502 18503 static BS3CPUINSTR4_TEST1_T const s_aTests16[] = 18504 { 18505 { bs3CpuInstr4_cvtsi2sd_XMM1_EAX_icebp_c16, 255, RM_REG, T_SSE, XMM1, XMM1, EAX, PASS_s_aValues32 }, 18506 { bs3CpuInstr4_cvtsi2sd_XMM1_FSxBX_D_icebp_c16, 255, RM_MEM, T_SSE, XMM1, XMM1, FSxBX, PASS_s_aValues32 }, 18507 18508 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_EAX_icebp_c16, 255, RM_REG, T_AVX_128, XMM1, XMM2, EAX, PASS_s_aValues32 }, 18509 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_FSxBX_D_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM1, XMM2, FSxBX, PASS_s_aValues32 }, 18510 18511 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_RAX_icebp_c16, BS3_XCPT_UD, RM_REG, T_AVX_128, XMM1, XMM1, RAX, PASS_s_aValues64 }, 18512 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_FSxBX_Q_icebp_c16, BS3_XCPT_UD, RM_MEM, T_AVX_128, XMM1, XMM1, FSxBX, PASS_s_aValues64 }, 18513 18514 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_EAX_icebp_c16, 255, RM_REG, T_AVX_128, XMM1, XMM1, EAX, PASS_s_aValues32 }, 18515 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_FSxBX_D_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM1, XMM1, FSxBX, PASS_s_aValues32 }, 18516 18517 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_RAX_icebp_c16, BS3_XCPT_UD, RM_REG, T_AVX_128, XMM1, XMM1, RAX, PASS_s_aValues64 }, 18518 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_FSxBX_Q_icebp_c16, BS3_XCPT_UD, RM_MEM, T_AVX_128, XMM1, XMM1, FSxBX, PASS_s_aValues64 }, 18519 }; 18520 static BS3CPUINSTR4_TEST1_T const s_aTests32[] = 18521 { 18522 { bs3CpuInstr4_cvtsi2sd_XMM1_EAX_icebp_c32, 255, RM_REG, T_SSE, XMM1, XMM1, EAX, PASS_s_aValues32 }, 18523 { bs3CpuInstr4_cvtsi2sd_XMM1_FSxBX_D_icebp_c32, 255, RM_MEM, T_SSE, XMM1, XMM1, FSxBX, PASS_s_aValues32 }, 18524 18525 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_EAX_icebp_c32, 255, RM_REG, T_AVX_128, XMM1, XMM2, EAX, PASS_s_aValues32 }, 18526 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_FSxBX_D_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM1, XMM2, FSxBX, PASS_s_aValues32 }, 18527 18528 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_RAX_icebp_c32, BS3_XCPT_UD, RM_REG, T_AVX_128, XMM1, XMM1, RAX, PASS_s_aValues64 }, 18529 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_FSxBX_Q_icebp_c32, BS3_XCPT_UD, RM_MEM, T_AVX_128, XMM1, XMM1, FSxBX, PASS_s_aValues64 }, 18530 18531 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_EAX_icebp_c32, 255, RM_REG, T_AVX_128, XMM1, XMM1, EAX, PASS_s_aValues32 }, 18532 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_FSxBX_D_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM1, XMM1, FSxBX, PASS_s_aValues32 }, 18533 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_RAX_icebp_c32, BS3_XCPT_UD, RM_REG, T_AVX_128, XMM1, XMM1, RAX, PASS_s_aValues64 }, 18534 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_FSxBX_Q_icebp_c32, BS3_XCPT_UD, RM_MEM, T_AVX_128, XMM1, XMM1, FSxBX, PASS_s_aValues64 }, 18535 }; 18536 static BS3CPUINSTR4_TEST1_T const s_aTests64[] = 18537 { 18538 { bs3CpuInstr4_cvtsi2sd_XMM1_EAX_icebp_c64, 255, RM_REG, T_SSE, XMM1, XMM1, EAX, PASS_s_aValues32 }, 18539 { bs3CpuInstr4_cvtsi2sd_XMM1_FSxBX_D_icebp_c64, 255, RM_MEM, T_SSE, XMM1, XMM1, FSxBX, PASS_s_aValues32 }, 18540 { bs3CpuInstr4_cvtsi2sd_XMM8_R8D_icebp_c64, 255, RM_REG, T_SSE, XMM8, XMM8, R8D, PASS_s_aValues32 }, 18541 { bs3CpuInstr4_cvtsi2sd_XMM8_FSxBX_D_icebp_c64, 255, RM_MEM, T_SSE, XMM8, XMM8, FSxBX, PASS_s_aValues32 }, 18542 18543 { bs3CpuInstr4_cvtsi2sd_XMM1_RAX_icebp_c64, 255, RM_REG, T_SSE, XMM1, XMM1, RAX, PASS_s_aValues64 }, 18544 { bs3CpuInstr4_cvtsi2sd_XMM1_FSxBX_Q_icebp_c64, 255, RM_MEM, T_SSE, XMM1, XMM1, FSxBX, PASS_s_aValues64 }, 18545 { bs3CpuInstr4_cvtsi2sd_XMM8_R8_icebp_c64, 255, RM_REG, T_SSE, XMM8, XMM8, R8, PASS_s_aValues64 }, 18546 { bs3CpuInstr4_cvtsi2sd_XMM8_FSxBX_Q_icebp_c64, 255, RM_MEM, T_SSE, XMM8, XMM8, FSxBX, PASS_s_aValues64 }, 18547 18548 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_EAX_icebp_c64, 255, RM_REG, T_AVX_128, XMM1, XMM2, EAX, PASS_s_aValues32 }, 18549 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_FSxBX_D_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM1, XMM2, FSxBX, PASS_s_aValues32 }, 18550 { bs3CpuInstr4_vcvtsi2sd_XMM8_XMM9_R8D_icebp_c64, 255, RM_REG, T_AVX_128, XMM8, XMM9, R8D, PASS_s_aValues32 }, 18551 { bs3CpuInstr4_vcvtsi2sd_XMM8_XMM9_FSxBX_D_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM8, XMM9, FSxBX, PASS_s_aValues32 }, 18552 18553 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_RAX_icebp_c64, 255, RM_REG, T_AVX_128, XMM1, XMM2, RAX, PASS_s_aValues64 }, 18554 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM2_FSxBX_Q_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM1, XMM2, FSxBX, PASS_s_aValues64 }, 18555 { bs3CpuInstr4_vcvtsi2sd_XMM8_XMM9_R8_icebp_c64, 255, RM_REG, T_AVX_128, XMM8, XMM9, R8, PASS_s_aValues64 }, 18556 { bs3CpuInstr4_vcvtsi2sd_XMM8_XMM9_FSxBX_Q_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM8, XMM9, FSxBX, PASS_s_aValues64 }, 18557 18558 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_EAX_icebp_c64, 255, RM_REG, T_AVX_128, XMM1, XMM1, EAX, PASS_s_aValues32 }, 18559 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_FSxBX_D_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM1, XMM1, FSxBX, PASS_s_aValues32 }, 18560 { bs3CpuInstr4_vcvtsi2sd_XMM8_XMM8_R8D_icebp_c64, 255, RM_REG, T_AVX_128, XMM8, XMM8, R8D, PASS_s_aValues32 }, 18561 { bs3CpuInstr4_vcvtsi2sd_XMM8_XMM8_FSxBX_D_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM8, XMM8, FSxBX, PASS_s_aValues32 }, 18562 18563 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_RAX_icebp_c64, 255, RM_REG, T_AVX_128, XMM1, XMM1, RAX, PASS_s_aValues64 }, 18564 { bs3CpuInstr4_vcvtsi2sd_XMM1_XMM1_FSxBX_Q_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM1, XMM1, FSxBX, PASS_s_aValues64 }, 18565 { bs3CpuInstr4_vcvtsi2sd_XMM8_XMM8_R8_icebp_c64, 255, RM_REG, T_AVX_128, XMM8, XMM8, R8, PASS_s_aValues64 }, 18566 { bs3CpuInstr4_vcvtsi2sd_XMM8_XMM8_FSxBX_Q_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, XMM8, XMM8, FSxBX, PASS_s_aValues64 }, 18567 }; 18568 18569 static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); 18570 unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); 18571 return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, 18572 g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); 18573 } 18574 18575 18576 /* 18577 * CVTSD2SI. 18578 */ 18579 BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_cvtsd2si(uint8_t bMode) 18580 { 18581 static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues32[] = 18582 { 18583 /* 18584 * Zero. 18585 */ 18586 /* 0*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 18587 { /* src xmm */ { FP64_0(0), FP64_RAND_x3_V1 } }, 18588 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 18589 /*mxcsr:in */ 0, 18590 /*128:out */ 0, 18591 /*256:out */ -1 }, 18592 { { /* clr r64 */ { FP64_INT_C(0) } }, 18593 { /* src xmm */ { FP64_0(1), FP64_RAND_x3_V1 } }, 18594 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 18595 /*mxcsr:in */ 0, 18596 /*128:out */ 0, 18597 /*256:out */ -1 }, 18598 /* 18599 * Infinity. 18600 */ 18601 /* 2*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 18602 { /* src xmm */ { FP64_INF(1), FP64_RAND_x3_V1 } }, 18603 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 18604 /*mxcsr:in */ 0, 18605 /*128:out */ X86_MXCSR_IE, 18606 /*256:out */ -1 }, 18607 { { /* clr r64 */ { FP64_INT_C(0) } }, 18608 { /* src xmm */ { FP64_INF(0), FP64_RAND_x3_V1 } }, 18609 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 18610 /*mxcsr:in */ 0, 18611 /*128:out */ X86_MXCSR_IE, 18612 /*256:out */ -1 }, 18613 /* 18614 * Normals & Precision. 18615 */ 18616 /* 4*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 18617 { /* src xmm */ { FP64_V(0,0xe240000000000,0x40f)/*123456.0*/ } }, 18618 { /* => r32 */ { FP64_INT32_C(123456, 0) } }, 18619 /*mxcsr:in */ 0, 18620 /*128:out */ 0, 18621 /*256:out */ -1 }, 18622 { { /* clr r64 */ { FP64_INT_C(0) } }, 18623 { /* src xmm */ { FP64_V(1,0xe240000000000,0x40f)/*-123456.0*/ } }, 18624 { /* => r32 */ { FP64_INT32_C(-123456, 0) } }, 18625 /*mxcsr:in */ 0, 18626 /*128:out */ 0, 18627 /*256:out */ -1 }, 18628 { { /* clr r64 */ { FP64_INT_C(0) } }, 18629 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 18630 { /* => r32 */ { FP64_INT32_C(123457, 0) } }, 18631 /*mxcsr:in */ 0, 18632 /*128:out */ X86_MXCSR_PE, 18633 /*256:out */ -1 }, 18634 { { /* clr r64 */ { FP64_INT_C(0) } }, 18635 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 18636 { /* => r32 */ { FP64_INT32_C(-123457, 0) } }, 18637 /*mxcsr:in */ 0, 18638 /*128:out */ X86_MXCSR_PE, 18639 /*256:out */ -1 }, 18640 { { /* clr r64 */ { FP64_INT_C(0) } }, 18641 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 18642 { /* => r32 */ { FP64_INT32_C(123456, 0) } }, 18643 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 18644 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 18645 /*256:out */ -1 }, 18646 { { /* clr r64 */ { FP64_INT_C(0) } }, 18647 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 18648 { /* => r32 */ { FP64_INT32_C(-123457, 0) } }, 18649 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 18650 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 18651 /*256:out */ -1 }, 18652 { { /* clr r64 */ { FP64_INT_C(0) } }, 18653 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 18654 { /* => r32 */ { FP64_INT32_C(123457, 0) } }, 18655 /*mxcsr:in */ X86_MXCSR_RC_UP, 18656 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 18657 /*256:out */ -1 }, 18658 { { /* clr r64 */ { FP64_INT_C(0) } }, 18659 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 18660 { /* => r32 */ { FP64_INT32_C(-123456, 0) } }, 18661 /*mxcsr:in */ X86_MXCSR_RC_UP, 18662 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 18663 /*256:out */ -1 }, 18664 { { /* clr r64 */ { FP64_INT_C(0) } }, 18665 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 18666 { /* => r32 */ { FP64_INT32_C(123456, 0) } }, 18667 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 18668 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 18669 /*256:out */ -1 }, 18670 { { /* clr r64 */ { FP64_INT_C(0) } }, 18671 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 18672 { /* => r32 */ { FP64_INT32_C(-123456, 0) } }, 18673 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 18674 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 18675 /*256:out */ -1 }, 18676 { { /* clr r64 */ { FP64_INT_C(0) } }, 18677 { /* src xmm */ { FP64_V(1,0xccccccccccccd,0x3fe)/*-0.9*/ } }, 18678 { /* => r32 */ { FP64_INT32_C(-1, 0) } }, 18679 /*mxcsr:in */ X86_MXCSR_FZ, 18680 /*128:out */ X86_MXCSR_PE | X86_MXCSR_FZ, 18681 /*256:out */ -1 }, 18682 { { /* clr r64 */ { FP64_INT_C(0) } }, 18683 { /* src xmm */ { FP64_V(0,0xccccccccccccd,0x3fe)/*0.9*/ } }, 18684 { /* => r32 */ { FP64_INT32_C(1, 0) } }, 18685 /*mxcsr:in */ X86_MXCSR_FZ, 18686 /*128:out */ X86_MXCSR_PE | X86_MXCSR_FZ, 18687 /*256:out */ -1 }, 18688 { { /* clr r64 */ { FP64_INT_C(0) } }, 18689 { /* src xmm */ { FP64_V(1,0xccccccccccccd,0x3fe)/*-0.9*/ } }, 18690 { /* => r32 */ { FP64_INT32_C(-1, 0) } }, 18691 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 18692 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_DOWN, 18693 /*256:out */ -1 }, 18694 { { /* clr r64 */ { FP64_INT_C(0) } }, 18695 { /* src xmm */ { FP64_V(0,0xccccccccccccd,0x3fe)/*0.9*/ } }, 18696 { /* => r32 */ { FP64_INT32_C(1, 0) } }, 18697 /*mxcsr:in */ X86_MXCSR_RC_UP, 18698 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_UP, 18699 /*256:out */ -1 }, 18700 /* 18701 * Denormals. 18702 */ 18703 /*18*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 18704 { /* src xmm */ { FP64_DENORM_MAX(0), FP64_RAND_x3_V2 } }, 18705 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 18706 /*mxcsr:in */ 0, 18707 /*128:out */ X86_MXCSR_PE, 18708 /*256:out */ -1 }, 18709 { { /* clr r64 */ { FP64_INT_C(0) } }, 18710 { /* src xmm */ { FP64_DENORM_MIN(1), FP64_RAND_x3_V2 } }, 18711 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 18712 /*mxcsr:in */ X86_MXCSR_DAZ, 18713 /*128:out */ X86_MXCSR_DAZ, 18714 /*256:out */ -1 }, 18715 /* 18716 * Overflow (Underflow not possible). 18717 */ 18718 /*20*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 18719 { /* src xmm */ { FP64_NORM_SAFE_INT_MAX(1), FP64_RAND_x3_V2 } }, 18720 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 18721 /*mxcsr:in */ 0, 18722 /*128:out */ X86_MXCSR_IE, 18723 /*256:out */ -1 }, 18724 { { /* clr r64 */ { FP64_INT_C(0) } }, 18725 { /* src xmm */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_x3_V2 } }, 18726 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 18727 /*mxcsr:in */ 0, 18728 /*128:out */ X86_MXCSR_IE, 18729 /*256:out */ -1 }, 18730 { { /* clr r64 */ { FP64_INT_C(0) } }, 18731 { /* src xmm */ { FP64_NORM_MAX(0), FP64_RAND_x3_V2 } }, 18732 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 18733 /*mxcsr:in */ 0, 18734 /*128:out */ X86_MXCSR_IE, 18735 /*256:out */ -1 }, 18736 { { /* clr r64 */ { FP64_INT_C(0) } }, 18737 { /* src xmm */ { FP64_NORM_MAX(1), FP64_RAND_x3_V2 } }, 18738 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 18739 /*mxcsr:in */ 0, 18740 /*128:out */ X86_MXCSR_IE, 18741 /*256:out */ -1 }, 18742 /* 18743 * Invalids. 18744 */ 18745 /*24*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 18746 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 18747 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 18748 /*mxcsr:in */ 0, 18749 /*128:out */ X86_MXCSR_IE, 18750 /*256:out */ -1 }, 18751 { { /* clr r64 */ { FP64_INT_C(0) } }, 18752 { /* src xmm */ { FP64_SNAN(1), FP64_RAND_x3_V2 } }, 18753 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 18754 /*mxcsr:in */ 0, 18755 /*128:out */ X86_MXCSR_IE, 18756 /*256:out */ -1 }, 18757 }; 18758 static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues64[] = 18759 { 18760 /* 18761 * Zero. 18762 */ 18763 /* 0*/{ { /* unused */ { FP64_ROW_UNUSED } }, 18764 { /* src xmm */ { FP64_0(0) } }, 18765 { /* => r64 */ { FP64_INT_C(0) } }, 18766 /*mxcsr:in */ 0, 18767 /*128:out */ 0, 18768 /*256:out */ -1 }, 18769 { { /* unused */ { FP64_ROW_UNUSED } }, 18770 { /* src xmm */ { FP64_0(1) } }, 18771 { /* => r64 */ { FP64_INT_C(0) } }, 18772 /*mxcsr:in */ 0, 18773 /*128:out */ 0, 18774 /*256:out */ -1 }, 18775 /* 18776 * Infinity. 18777 */ 18778 /* 2*/{ { /* unused */ { FP64_ROW_UNUSED } }, 18779 { /* src xmm */ { FP64_INF(1) } }, 18780 { /* => r64 */ { FP64_INT_INDEFINITE } }, 18781 /*mxcsr:in */ 0, 18782 /*128:out */ X86_MXCSR_IE, 18783 /*256:out */ -1 }, 18784 { { /* unused */ { FP64_ROW_UNUSED } }, 18785 { /* src xmm */ { FP64_INF(0) } }, 18786 { /* => r64 */ { FP64_INT_INDEFINITE } }, 18787 /*mxcsr:in */ 0, 18788 /*128:out */ X86_MXCSR_IE, 18789 /*256:out */ -1 }, 18790 /* 18791 * Normals & Precision. 18792 */ 18793 /* 4*/{ { /* unused */ { FP64_ROW_UNUSED } }, 18794 { /* src xmm */ { FP64_V(0,0xe240000000000,0x40f)/*123456.0*/ } }, 18795 { /* => r64 */ { FP64_INT_C(123456) } }, 18796 /*mxcsr:in */ 0, 18797 /*128:out */ 0, 18798 /*256:out */ -1 }, 18799 { { /* unused */ { FP64_ROW_UNUSED } }, 18800 { /* src xmm */ { FP64_V(1,0xe240000000000,0x40f)/*-123456.0*/ } }, 18801 { /* => r64 */ { FP64_INT_C(-123456) } }, 18802 /*mxcsr:in */ 0, 18803 /*128:out */ 0, 18804 /*256:out */ -1 }, 18805 { { /* unused */ { FP64_ROW_UNUSED } }, 18806 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 18807 { /* => r64 */ { FP64_INT_C(123457) } }, 18808 /*mxcsr:in */ 0, 18809 /*128:out */ X86_MXCSR_PE, 18810 /*256:out */ -1 }, 18811 { { /* unused */ { FP64_ROW_UNUSED } }, 18812 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 18813 { /* => r64 */ { FP64_INT_C(-123457) } }, 18814 /*mxcsr:in */ 0, 18815 /*128:out */ X86_MXCSR_PE, 18816 /*256:out */ -1 }, 18817 { { /* unused */ { FP64_ROW_UNUSED } }, 18818 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 18819 { /* => r64 */ { FP64_INT_C(123456) } }, 18820 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 18821 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 18822 /*256:out */ -1 }, 18823 { { /* unused */ { FP64_ROW_UNUSED } }, 18824 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 18825 { /* => r64 */ { FP64_INT_C(-123457) } }, 18826 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 18827 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 18828 /*256:out */ -1 }, 18829 { { /* unused */ { FP64_ROW_UNUSED } }, 18830 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 18831 { /* => r64 */ { FP64_INT_C(123457) } }, 18832 /*mxcsr:in */ X86_MXCSR_RC_UP, 18833 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 18834 /*256:out */ -1 }, 18835 { { /* unused */ { FP64_ROW_UNUSED } }, 18836 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 18837 { /* => r64 */ { FP64_INT_C(-123456) } }, 18838 /*mxcsr:in */ X86_MXCSR_RC_UP, 18839 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 18840 /*256:out */ -1 }, 18841 { { /* unused */ { FP64_ROW_UNUSED } }, 18842 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 18843 { /* => r64 */ { FP64_INT_C(123456) } }, 18844 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 18845 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 18846 /*256:out */ -1 }, 18847 { { /* unused */ { FP64_ROW_UNUSED } }, 18848 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 18849 { /* => r64 */ { FP64_INT_C(-123456) } }, 18850 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 18851 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 18852 /*256:out */ -1 }, 18853 { { /* unused */ { FP64_ROW_UNUSED } }, 18854 { /* src xmm */ { FP64_V(1,0xccccccccccccd,0x3fe)/*-0.9*/ } }, 18855 { /* => r64 */ { FP64_INT_C(-1) } }, 18856 /*mxcsr:in */ X86_MXCSR_FZ, 18857 /*128:out */ X86_MXCSR_PE | X86_MXCSR_FZ, 18858 /*256:out */ -1 }, 18859 { { /* unused */ { FP64_ROW_UNUSED } }, 18860 { /* src xmm */ { FP64_V(0,0xccccccccccccd,0x3fe)/*0.9*/ } }, 18861 { /* => r64 */ { FP64_INT_C(1) } }, 18862 /*mxcsr:in */ X86_MXCSR_FZ, 18863 /*128:out */ X86_MXCSR_PE | X86_MXCSR_FZ, 18864 /*256:out */ -1 }, 18865 { { /* unused */ { FP64_ROW_UNUSED } }, 18866 { /* src xmm */ { FP64_V(1,0xccccccccccccd,0x3fe)/*-0.9*/ } }, 18867 { /* => r64 */ { FP64_INT_C(-1) } }, 18868 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 18869 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_DOWN, 18870 /*256:out */ -1 }, 18871 { { /* unused */ { FP64_ROW_UNUSED } }, 18872 { /* src xmm */ { FP64_V(0,0xccccccccccccd,0x3fe)/*0.9*/ } }, 18873 { /* => r64 */ { FP64_INT_C(1) } }, 18874 /*mxcsr:in */ X86_MXCSR_RC_UP, 18875 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_UP, 18876 /*256:out */ -1 }, 18877 { { /* unused */ { FP64_ROW_UNUSED } }, 18878 { /* src xmm */ { FP64_NORM_SAFE_INT_MAX(1) } }, 18879 { /* => r64 */ { FP64_INT_C(-9007199254740991) } }, 18880 /*mxcsr:in */ 0, 18881 /*128:out */ 0, 18882 /*256:out */ -1 }, 18883 { { /* unused */ { FP64_ROW_UNUSED } }, 18884 { /* src xmm */ { FP64_NORM_SAFE_INT_MAX(0) } }, 18885 { /* => r64 */ { FP64_INT_C(9007199254740991) } }, 18886 /*mxcsr:in */ 0, 18887 /*128:out */ 0, 18888 /*256:out */ -1 }, 18889 { { /* unused */ { FP64_ROW_UNUSED } }, 18890 { /* src xmm */ { FP64_V(0,0xf399b00000000,0x43d)/*8999999652602314752.0*/ } }, 18891 { /* => r64 */ { FP64_INT_C(8999999652602314752) } }, 18892 /*mxcsr:in */ 0, 18893 /*128:out */ 0, 18894 /*256:out */ -1 }, 18895 { { /* unused */ { FP64_ROW_UNUSED } }, 18896 { /* src xmm */ { FP64_V(1,0xf399b00000000,0x43d)/*-8999999652602314752.0*/ } }, 18897 { /* => r64 */ { FP64_INT_C(-8999999652602314752) } }, 18898 /*mxcsr:in */ 0, 18899 /*128:out */ 0, 18900 /*256:out */ -1 }, 18901 { { /* unused */ { FP64_ROW_UNUSED } }, 18902 { /* src xmm */ { FP64_V(0,0xf399b00000001,0x43d)/*8999999652602315776.0*/ } }, 18903 { /* => r64 */ { FP64_INT_C(8999999652602315776) } }, 18904 /*mxcsr:in */ 0, 18905 /*128:out */ 0, 18906 /*256:out */ -1 }, 18907 { { /* unused */ { FP64_ROW_UNUSED } }, 18908 { /* src xmm */ { FP64_V(1,0xf399b00000001,0x43d)/*-8999999652602315776.0*/ } }, 18909 { /* => r64 */ { FP64_INT_C(-8999999652602315776) } }, 18910 /*mxcsr:in */ 0, 18911 /*128:out */ 0, 18912 /*256:out */ -1 }, 18913 /* 18914 * Denormals. 18915 */ 18916 /*24*/{ { /* unused */ { FP64_ROW_UNUSED } }, 18917 { /* src xmm */ { FP64_DENORM_MAX(0) } }, 18918 { /* => r64 */ { FP64_INT_C(0) } }, 18919 /*mxcsr:in */ 0, 18920 /*128:out */ X86_MXCSR_PE, 18921 /*256:out */ -1 }, 18922 { { /* unused */ { FP64_ROW_UNUSED } }, 18923 { /* src xmm */ { FP64_DENORM_MIN(1) } }, 18924 { /* => r64 */ { FP64_INT_C(0) } }, 18925 /*mxcsr:in */ X86_MXCSR_DAZ, 18926 /*128:out */ X86_MXCSR_DAZ, 18927 /*256:out */ -1 }, 18928 /* 18929 * Overflow (Underflow not possible). 18930 */ 18931 /*26*/{ { /* unused */ { FP64_ROW_UNUSED } }, 18932 { /* src xmm */ { FP64_NORM_MAX(0) } }, 18933 { /* => r64 */ { FP64_INT_INDEFINITE } }, 18934 /*mxcsr:in */ 0, 18935 /*128:out */ X86_MXCSR_IE, 18936 /*256:out */ -1 }, 18937 { { /* unused */ { FP64_ROW_UNUSED } }, 18938 { /* src xmm */ { FP64_NORM_MAX(1) } }, 18939 { /* => r64 */ { FP64_INT_INDEFINITE } }, 18940 /*mxcsr:in */ 0, 18941 /*128:out */ X86_MXCSR_IE, 18942 /*256:out */ -1 }, 18943 /* 18944 * Invalids. 18945 */ 18946 /*28*/{ { /* unused */ { FP64_ROW_UNUSED } }, 18947 { /* src xmm */ { FP64_QNAN(0) } }, 18948 { /* => r64 */ { FP64_INT_INDEFINITE } }, 18949 /*mxcsr:in */ 0, 18950 /*128:out */ X86_MXCSR_IE, 18951 /*256:out */ -1 }, 18952 { { /* unused */ { FP64_ROW_UNUSED } }, 18953 { /* src xmm */ { FP64_SNAN(1) } }, 18954 { /* => r64 */ { FP64_INT_INDEFINITE } }, 18955 /*mxcsr:in */ 0, 18956 /*128:out */ X86_MXCSR_IE, 18957 /*256:out */ -1 }, 18958 }; 18959 18960 static BS3CPUINSTR4_TEST1_T const s_aTests16[] = 18961 { 18962 { bs3CpuInstr4_cvtsd2si_EAX_XMM1_icebp_c16, 255, RM_REG, T_SSE, EAX, XMM1, NOREG, PASS_s_aValues32 }, 18963 { bs3CpuInstr4_cvtsd2si_EAX_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, EAX, FSxBX, NOREG, PASS_s_aValues32 }, 18964 18965 { bs3CpuInstr4_vcvtsd2si_EAX_XMM1_icebp_c16, 255, RM_REG, T_AVX_128, EAX, XMM1, NOREG, PASS_s_aValues32 }, 18966 { bs3CpuInstr4_vcvtsd2si_EAX_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, EAX, FSxBX, NOREG, PASS_s_aValues32 }, 18967 18968 { bs3CpuInstr4_vcvtsd2si_RAX_XMM1_icebp_c16, BS3_XCPT_UD, RM_REG, T_AVX_128, RAX, XMM1, NOREG, PASS_s_aValues64 }, 18969 { bs3CpuInstr4_vcvtsd2si_RAX_FSxBX_icebp_c16, BS3_XCPT_UD, RM_MEM, T_AVX_128, RAX, FSxBX, NOREG, PASS_s_aValues64 }, 18970 }; 18971 18972 static BS3CPUINSTR4_TEST1_T const s_aTests32[] = 18973 { 18974 { bs3CpuInstr4_cvtsd2si_EAX_XMM1_icebp_c32, 255, RM_REG, T_SSE, EAX, XMM1, NOREG, PASS_s_aValues32 }, 18975 { bs3CpuInstr4_cvtsd2si_EAX_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, EAX, FSxBX, NOREG, PASS_s_aValues32 }, 18976 18977 { bs3CpuInstr4_vcvtsd2si_EAX_XMM1_icebp_c32, 255, RM_REG, T_AVX_128, EAX, XMM1, NOREG, PASS_s_aValues32 }, 18978 { bs3CpuInstr4_vcvtsd2si_EAX_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, EAX, FSxBX, NOREG, PASS_s_aValues32 }, 18979 18980 { bs3CpuInstr4_vcvtsd2si_RAX_XMM1_icebp_c32, BS3_XCPT_UD, RM_REG, T_AVX_128, RAX, XMM1, NOREG, PASS_s_aValues64 }, 18981 { bs3CpuInstr4_vcvtsd2si_RAX_FSxBX_icebp_c32, BS3_XCPT_UD, RM_MEM, T_AVX_128, RAX, FSxBX, NOREG, PASS_s_aValues64 }, 18982 }; 18983 static BS3CPUINSTR4_TEST1_T const s_aTests64[] = 18984 { 18985 { bs3CpuInstr4_cvtsd2si_EAX_XMM1_icebp_c64, 255, RM_REG, T_SSE, EAX, XMM1, RAX, PASS_s_aValues32 }, 18986 { bs3CpuInstr4_cvtsd2si_EAX_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, EAX, FSxBX, RAX, PASS_s_aValues32 }, 18987 18988 { bs3CpuInstr4_cvtsd2si_R8D_XMM8_icebp_c64, 255, RM_REG, T_SSE, R8D, XMM8, R8, PASS_s_aValues32 }, 18989 { bs3CpuInstr4_cvtsd2si_R8D_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, R8D, FSxBX, R8, PASS_s_aValues32 }, 18990 18991 { bs3CpuInstr4_vcvtsd2si_EAX_XMM1_icebp_c64, 255, RM_REG, T_AVX_128, EAX, XMM1, RAX, PASS_s_aValues32 }, 18992 { bs3CpuInstr4_vcvtsd2si_EAX_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, EAX, FSxBX, RAX, PASS_s_aValues32 }, 18993 18994 { bs3CpuInstr4_vcvtsd2si_R8D_XMM8_icebp_c64, 255, RM_REG, T_AVX_128, R8D, XMM8, R8, PASS_s_aValues32 }, 18995 { bs3CpuInstr4_vcvtsd2si_R8D_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, R8D, FSxBX, R8, PASS_s_aValues32 }, 18996 18997 { bs3CpuInstr4_cvtsd2si_RAX_XMM1_icebp_c64, 255, RM_REG, T_SSE, RAX, XMM1, NOREG, PASS_s_aValues64 }, 18998 { bs3CpuInstr4_cvtsd2si_RAX_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, RAX, FSxBX, NOREG, PASS_s_aValues64 }, 18999 19000 { bs3CpuInstr4_cvtsd2si_R8_XMM8_icebp_c64, 255, RM_REG, T_SSE, R8, XMM8, NOREG, PASS_s_aValues64 }, 19001 { bs3CpuInstr4_cvtsd2si_R8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, R8, FSxBX, NOREG, PASS_s_aValues64 }, 19002 19003 { bs3CpuInstr4_vcvtsd2si_RAX_XMM1_icebp_c64, 255, RM_REG, T_AVX_128, RAX, XMM1, NOREG, PASS_s_aValues64 }, 19004 { bs3CpuInstr4_vcvtsd2si_RAX_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, RAX, FSxBX, NOREG, PASS_s_aValues64 }, 19005 19006 { bs3CpuInstr4_vcvtsd2si_R8_XMM8_icebp_c64, 255, RM_REG, T_AVX_128, R8, XMM8, NOREG, PASS_s_aValues64 }, 19007 { bs3CpuInstr4_vcvtsd2si_R8_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, R8, FSxBX, NOREG, PASS_s_aValues64 }, 19008 }; 19009 19010 static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); 19011 unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); 19012 return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, 19013 g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); 19014 } 19015 19016 19017 /* 19018 * CVTTSD2SI. 19019 */ 19020 BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_cvttsd2si(uint8_t bMode) 19021 { 19022 static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues32[] = 19023 { 19024 /* 19025 * Zero. 19026 */ 19027 /* 0*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 19028 { /* src xmm */ { FP64_0(0), FP64_RAND_x3_V1 } }, 19029 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 19030 /*mxcsr:in */ 0, 19031 /*128:out */ 0, 19032 /*256:out */ -1 }, 19033 { { /* clr r64 */ { FP64_INT_C(0) } }, 19034 { /* src xmm */ { FP64_0(1), FP64_RAND_x3_V1 } }, 19035 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 19036 /*mxcsr:in */ 0, 19037 /*128:out */ 0, 19038 /*256:out */ -1 }, 19039 /* 19040 * Infinity. 19041 */ 19042 /* 2*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 19043 { /* src xmm */ { FP64_INF(1), FP64_RAND_x3_V1 } }, 19044 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 19045 /*mxcsr:in */ 0, 19046 /*128:out */ X86_MXCSR_IE, 19047 /*256:out */ -1 }, 19048 { { /* clr r64 */ { FP64_INT_C(0) } }, 19049 { /* src xmm */ { FP64_INF(0), FP64_RAND_x3_V1 } }, 19050 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 19051 /*mxcsr:in */ 0, 19052 /*128:out */ X86_MXCSR_IE, 19053 /*256:out */ -1 }, 19054 /* 19055 * Normals & Precision. 19056 */ 19057 /* 4*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 19058 { /* src xmm */ { FP64_V(0,0xe240000000000,0x40f)/*123456.0*/ } }, 19059 { /* => r32 */ { FP64_INT32_C(123456, 0) } }, 19060 /*mxcsr:in */ 0, 19061 /*128:out */ 0, 19062 /*256:out */ -1 }, 19063 { { /* clr r64 */ { FP64_INT_C(0) } }, 19064 { /* src xmm */ { FP64_V(1,0xe240000000000,0x40f)/*-123456.0*/ } }, 19065 { /* => r32 */ { FP64_INT32_C(-123456, 0) } }, 19066 /*mxcsr:in */ 0, 19067 /*128:out */ 0, 19068 /*256:out */ -1 }, 19069 { { /* clr r64 */ { FP64_INT_C(0) } }, 19070 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 19071 { /* => r32 */ { FP64_INT32_C(123456, 0) } }, 19072 /*mxcsr:in */ 0, 19073 /*128:out */ X86_MXCSR_PE, 19074 /*256:out */ -1 }, 19075 { { /* clr r64 */ { FP64_INT_C(0) } }, 19076 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 19077 { /* => r32 */ { FP64_INT32_C(-123456, 0) } }, 19078 /*mxcsr:in */ 0, 19079 /*128:out */ X86_MXCSR_PE, 19080 /*256:out */ -1 }, 19081 { { /* clr r64 */ { FP64_INT_C(0) } }, 19082 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 19083 { /* => r32 */ { FP64_INT32_C(123456, 0) } }, 19084 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 19085 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 19086 /*256:out */ -1 }, 19087 { { /* clr r64 */ { FP64_INT_C(0) } }, 19088 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 19089 { /* => r32 */ { FP64_INT32_C(-123456, 0) } }, 19090 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 19091 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 19092 /*256:out */ -1 }, 19093 { { /* clr r64 */ { FP64_INT_C(0) } }, 19094 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 19095 { /* => r32 */ { FP64_INT32_C(123456, 0) } }, 19096 /*mxcsr:in */ X86_MXCSR_RC_UP, 19097 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 19098 /*256:out */ -1 }, 19099 { { /* clr r64 */ { FP64_INT_C(0) } }, 19100 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 19101 { /* => r32 */ { FP64_INT32_C(-123456, 0) } }, 19102 /*mxcsr:in */ X86_MXCSR_RC_UP, 19103 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 19104 /*256:out */ -1 }, 19105 { { /* clr r64 */ { FP64_INT_C(0) } }, 19106 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 19107 { /* => r32 */ { FP64_INT32_C(123456, 0) } }, 19108 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 19109 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 19110 /*256:out */ -1 }, 19111 { { /* clr r64 */ { FP64_INT_C(0) } }, 19112 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 19113 { /* => r32 */ { FP64_INT32_C(-123456, 0) } }, 19114 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 19115 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 19116 /*256:out */ -1 }, 19117 { { /* clr r64 */ { FP64_INT_C(0) } }, 19118 { /* src xmm */ { FP64_V(1,0xccccccccccccd,0x3fe)/*-0.9*/ } }, 19119 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 19120 /*mxcsr:in */ X86_MXCSR_FZ, 19121 /*128:out */ X86_MXCSR_PE | X86_MXCSR_FZ, 19122 /*256:out */ -1 }, 19123 { { /* clr r64 */ { FP64_INT_C(0) } }, 19124 { /* src xmm */ { FP64_V(0,0xccccccccccccd,0x3fe)/*0.9*/ } }, 19125 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 19126 /*mxcsr:in */ X86_MXCSR_FZ, 19127 /*128:out */ X86_MXCSR_PE | X86_MXCSR_FZ, 19128 /*256:out */ -1 }, 19129 { { /* clr r64 */ { FP64_INT_C(0) } }, 19130 { /* src xmm */ { FP64_V(1,0xccccccccccccd,0x3fe)/*-0.9*/ } }, 19131 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 19132 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 19133 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_DOWN, 19134 /*256:out */ -1 }, 19135 { { /* clr r64 */ { FP64_INT_C(0) } }, 19136 { /* src xmm */ { FP64_V(0,0xccccccccccccd,0x3fe)/*0.9*/ } }, 19137 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 19138 /*mxcsr:in */ X86_MXCSR_RC_UP, 19139 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_UP, 19140 /*256:out */ -1 }, 19141 /* 19142 * Denormals. 19143 */ 19144 /*18*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 19145 { /* src xmm */ { FP64_DENORM_MAX(0), FP64_RAND_x3_V2 } }, 19146 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 19147 /*mxcsr:in */ 0, 19148 /*128:out */ X86_MXCSR_PE, 19149 /*256:out */ -1 }, 19150 { { /* clr r64 */ { FP64_INT_C(0) } }, 19151 { /* src xmm */ { FP64_DENORM_MIN(1), FP64_RAND_x3_V2 } }, 19152 { /* => r32 */ { FP64_INT32_C(0, 0) } }, 19153 /*mxcsr:in */ X86_MXCSR_DAZ, 19154 /*128:out */ X86_MXCSR_DAZ, 19155 /*256:out */ -1 }, 19156 /* 19157 * Overflow (Underflow not possible). 19158 */ 19159 /*20*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 19160 { /* src xmm */ { FP64_NORM_SAFE_INT_MAX(1), FP64_RAND_x3_V2 } }, 19161 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 19162 /*mxcsr:in */ 0, 19163 /*128:out */ X86_MXCSR_IE, 19164 /*256:out */ -1 }, 19165 { { /* clr r64 */ { FP64_INT_C(0) } }, 19166 { /* src xmm */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_x3_V2 } }, 19167 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 19168 /*mxcsr:in */ 0, 19169 /*128:out */ X86_MXCSR_IE, 19170 /*256:out */ -1 }, 19171 { { /* clr r64 */ { FP64_INT_C(0) } }, 19172 { /* src xmm */ { FP64_NORM_MAX(0), FP64_RAND_x3_V2 } }, 19173 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 19174 /*mxcsr:in */ 0, 19175 /*128:out */ X86_MXCSR_IE, 19176 /*256:out */ -1 }, 19177 { { /* clr r64 */ { FP64_INT_C(0) } }, 19178 { /* src xmm */ { FP64_NORM_MAX(1), FP64_RAND_x3_V2 } }, 19179 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 19180 /*mxcsr:in */ 0, 19181 /*128:out */ X86_MXCSR_IE, 19182 /*256:out */ -1 }, 19183 /* 19184 * Invalids. 19185 */ 19186 /*24*/{ { /* clr r64 */ { FP64_INT_C(0) } }, 19187 { /* src xmm */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 19188 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 19189 /*mxcsr:in */ 0, 19190 /*128:out */ X86_MXCSR_IE, 19191 /*256:out */ -1 }, 19192 { { /* clr r64 */ { FP64_INT_C(0) } }, 19193 { /* src xmm */ { FP64_SNAN(1), FP64_RAND_x3_V2 } }, 19194 { /* => r32 */ { FP64_INT32_INDEFINITE(0) } }, 19195 /*mxcsr:in */ 0, 19196 /*128:out */ X86_MXCSR_IE, 19197 /*256:out */ -1 }, 19198 }; 19199 static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues64[] = 19200 { 19201 /* 19202 * Zero. 19203 */ 19204 /* 0*/{ { /* unused */ { FP64_ROW_UNUSED } }, 19205 { /* src xmm */ { FP64_0(0) } }, 19206 { /* => r64 */ { FP64_INT_C(0) } }, 19207 /*mxcsr:in */ 0, 19208 /*128:out */ 0, 19209 /*256:out */ -1 }, 19210 { { /* unused */ { FP64_ROW_UNUSED } }, 19211 { /* src xmm */ { FP64_0(1) } }, 19212 { /* => r64 */ { FP64_INT_C(0) } }, 19213 /*mxcsr:in */ 0, 19214 /*128:out */ 0, 19215 /*256:out */ -1 }, 19216 /* 19217 * Infinity. 19218 */ 19219 /* 2*/{ { /* unused */ { FP64_ROW_UNUSED } }, 19220 { /* src xmm */ { FP64_INF(1) } }, 19221 { /* => r64 */ { FP64_INT_INDEFINITE } }, 19222 /*mxcsr:in */ 0, 19223 /*128:out */ X86_MXCSR_IE, 19224 /*256:out */ -1 }, 19225 { { /* unused */ { FP64_ROW_UNUSED } }, 19226 { /* src xmm */ { FP64_INF(0) } }, 19227 { /* => r64 */ { FP64_INT_INDEFINITE } }, 19228 /*mxcsr:in */ 0, 19229 /*128:out */ X86_MXCSR_IE, 19230 /*256:out */ -1 }, 19231 /* 19232 * Normals & Precision. 19233 */ 19234 /* 4*/{ { /* unused */ { FP64_ROW_UNUSED } }, 19235 { /* src xmm */ { FP64_V(0,0xe240000000000,0x40f)/*123456.0*/ } }, 19236 { /* => r64 */ { FP64_INT_C(123456) } }, 19237 /*mxcsr:in */ 0, 19238 /*128:out */ 0, 19239 /*256:out */ -1 }, 19240 { { /* unused */ { FP64_ROW_UNUSED } }, 19241 { /* src xmm */ { FP64_V(1,0xe240000000000,0x40f)/*-123456.0*/ } }, 19242 { /* => r64 */ { FP64_INT_C(-123456) } }, 19243 /*mxcsr:in */ 0, 19244 /*128:out */ 0, 19245 /*256:out */ -1 }, 19246 { { /* unused */ { FP64_ROW_UNUSED } }, 19247 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 19248 { /* => r64 */ { FP64_INT_C(123456) } }, 19249 /*mxcsr:in */ 0, 19250 /*128:out */ X86_MXCSR_PE, 19251 /*256:out */ -1 }, 19252 { { /* unused */ { FP64_ROW_UNUSED } }, 19253 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 19254 { /* => r64 */ { FP64_INT_C(-123456) } }, 19255 /*mxcsr:in */ 0, 19256 /*128:out */ X86_MXCSR_PE, 19257 /*256:out */ -1 }, 19258 { { /* unused */ { FP64_ROW_UNUSED } }, 19259 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 19260 { /* => r64 */ { FP64_INT_C(123456) } }, 19261 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 19262 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 19263 /*256:out */ -1 }, 19264 { { /* unused */ { FP64_ROW_UNUSED } }, 19265 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 19266 { /* => r64 */ { FP64_INT_C(-123456) } }, 19267 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 19268 /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 19269 /*256:out */ -1 }, 19270 { { /* unused */ { FP64_ROW_UNUSED } }, 19271 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 19272 { /* => r64 */ { FP64_INT_C(123456) } }, 19273 /*mxcsr:in */ X86_MXCSR_RC_UP, 19274 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 19275 /*256:out */ -1 }, 19276 { { /* unused */ { FP64_ROW_UNUSED } }, 19277 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 19278 { /* => r64 */ { FP64_INT_C(-123456) } }, 19279 /*mxcsr:in */ X86_MXCSR_RC_UP, 19280 /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_PE, 19281 /*256:out */ -1 }, 19282 { { /* unused */ { FP64_ROW_UNUSED } }, 19283 { /* src xmm */ { FP64_V(0,0xe240e66666666,0x40f)/*123456.9*/ } }, 19284 { /* => r64 */ { FP64_INT_C(123456) } }, 19285 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 19286 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 19287 /*256:out */ -1 }, 19288 { { /* unused */ { FP64_ROW_UNUSED } }, 19289 { /* src xmm */ { FP64_V(1,0xe240e66666666,0x40f)/*-123456.9*/ } }, 19290 { /* => r64 */ { FP64_INT_C(-123456) } }, 19291 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 19292 /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 19293 /*256:out */ -1 }, 19294 { { /* unused */ { FP64_ROW_UNUSED } }, 19295 { /* src xmm */ { FP64_V(1,0xccccccccccccd,0x3fe)/*-0.9*/ } }, 19296 { /* => r64 */ { FP64_INT_C(0) } }, 19297 /*mxcsr:in */ X86_MXCSR_FZ, 19298 /*128:out */ X86_MXCSR_PE | X86_MXCSR_FZ, 19299 /*256:out */ -1 }, 19300 { { /* unused */ { FP64_ROW_UNUSED } }, 19301 { /* src xmm */ { FP64_V(0,0xccccccccccccd,0x3fe)/*0.9*/ } }, 19302 { /* => r64 */ { FP64_INT_C(0) } }, 19303 /*mxcsr:in */ X86_MXCSR_FZ, 19304 /*128:out */ X86_MXCSR_PE | X86_MXCSR_FZ, 19305 /*256:out */ -1 }, 19306 { { /* unused */ { FP64_ROW_UNUSED } }, 19307 { /* src xmm */ { FP64_V(1,0xccccccccccccd,0x3fe)/*-0.9*/ } }, 19308 { /* => r64 */ { FP64_INT_C(0) } }, 19309 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 19310 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_DOWN, 19311 /*256:out */ -1 }, 19312 { { /* unused */ { FP64_ROW_UNUSED } }, 19313 { /* src xmm */ { FP64_V(0,0xccccccccccccd,0x3fe)/*0.9*/ } }, 19314 { /* => r64 */ { FP64_INT_C(0) } }, 19315 /*mxcsr:in */ X86_MXCSR_RC_UP, 19316 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_UP, 19317 /*256:out */ -1 }, 19318 { { /* unused */ { FP64_ROW_UNUSED } }, 19319 { /* src xmm */ { FP64_NORM_SAFE_INT_MAX(1) } }, 19320 { /* => r64 */ { FP64_INT_C(-9007199254740991) } }, 19321 /*mxcsr:in */ 0, 19322 /*128:out */ 0, 19323 /*256:out */ -1 }, 19324 { { /* unused */ { FP64_ROW_UNUSED } }, 19325 { /* src xmm */ { FP64_NORM_SAFE_INT_MAX(0) } }, 19326 { /* => r64 */ { FP64_INT_C(9007199254740991) } }, 19327 /*mxcsr:in */ 0, 19328 /*128:out */ 0, 19329 /*256:out */ -1 }, 19330 { { /* unused */ { FP64_ROW_UNUSED } }, 19331 { /* src xmm */ { FP64_V(0,0xf399b00000000,0x43d)/*8999999652602314752.0*/ } }, 19332 { /* => r64 */ { FP64_INT_C(8999999652602314752) } }, 19333 /*mxcsr:in */ 0, 19334 /*128:out */ 0, 19335 /*256:out */ -1 }, 19336 { { /* unused */ { FP64_ROW_UNUSED } }, 19337 { /* src xmm */ { FP64_V(1,0xf399b00000000,0x43d)/*-8999999652602314752.0*/ } }, 19338 { /* => r64 */ { FP64_INT_C(-8999999652602314752) } }, 19339 /*mxcsr:in */ 0, 19340 /*128:out */ 0, 19341 /*256:out */ -1 }, 19342 { { /* unused */ { FP64_ROW_UNUSED } }, 19343 { /* src xmm */ { FP64_V(0,0xf399b00000001,0x43d)/*8999999652602315776.0*/ } }, 19344 { /* => r64 */ { FP64_INT_C(8999999652602315776) } }, 19345 /*mxcsr:in */ 0, 19346 /*128:out */ 0, 19347 /*256:out */ -1 }, 19348 { { /* unused */ { FP64_ROW_UNUSED } }, 19349 { /* src xmm */ { FP64_V(1,0xf399b00000001,0x43d)/*-8999999652602315776.0*/ } }, 19350 { /* => r64 */ { FP64_INT_C(-8999999652602315776) } }, 19351 /*mxcsr:in */ 0, 19352 /*128:out */ 0, 19353 /*256:out */ -1 }, 19354 /* 19355 * Denormals. 19356 */ 19357 /*24*/{ { /* unused */ { FP64_ROW_UNUSED } }, 19358 { /* src xmm */ { FP64_DENORM_MAX(0) } }, 19359 { /* => r64 */ { FP64_INT_C(0) } }, 19360 /*mxcsr:in */ 0, 19361 /*128:out */ X86_MXCSR_PE, 19362 /*256:out */ -1 }, 19363 { { /* unused */ { FP64_ROW_UNUSED } }, 19364 { /* src xmm */ { FP64_DENORM_MIN(1) } }, 19365 { /* => r64 */ { FP64_INT_C(0) } }, 19366 /*mxcsr:in */ X86_MXCSR_DAZ, 19367 /*128:out */ X86_MXCSR_DAZ, 19368 /*256:out */ -1 }, 19369 /* 19370 * Overflow (Underflow not possible). 19371 */ 19372 /*26*/{ { /* unused */ { FP64_ROW_UNUSED } }, 19373 { /* src xmm */ { FP64_NORM_MAX(0) } }, 19374 { /* => r64 */ { FP64_INT_INDEFINITE } }, 19375 /*mxcsr:in */ 0, 19376 /*128:out */ X86_MXCSR_IE, 19377 /*256:out */ -1 }, 19378 { { /* unused */ { FP64_ROW_UNUSED } }, 19379 { /* src xmm */ { FP64_NORM_MAX(1) } }, 19380 { /* => r64 */ { FP64_INT_INDEFINITE } }, 19381 /*mxcsr:in */ 0, 19382 /*128:out */ X86_MXCSR_IE, 19383 /*256:out */ -1 }, 19384 /* 19385 * Invalids. 19386 */ 19387 /*28*/{ { /* unused */ { FP64_ROW_UNUSED } }, 19388 { /* src xmm */ { FP64_QNAN(0) } }, 19389 { /* => r64 */ { FP64_INT_INDEFINITE } }, 19390 /*mxcsr:in */ 0, 19391 /*128:out */ X86_MXCSR_IE, 19392 /*256:out */ -1 }, 19393 { { /* unused */ { FP64_ROW_UNUSED } }, 19394 { /* src xmm */ { FP64_SNAN(1) } }, 19395 { /* => r64 */ { FP64_INT_INDEFINITE } }, 19396 /*mxcsr:in */ 0, 19397 /*128:out */ X86_MXCSR_IE, 19398 /*256:out */ -1 }, 19399 }; 19400 19401 static BS3CPUINSTR4_TEST1_T const s_aTests16[] = 19402 { 19403 { bs3CpuInstr4_cvttsd2si_EAX_XMM1_icebp_c16, 255, RM_REG, T_SSE, EAX, XMM1, NOREG, PASS_s_aValues32 }, 19404 { bs3CpuInstr4_cvttsd2si_EAX_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, EAX, FSxBX, NOREG, PASS_s_aValues32 }, 19405 19406 { bs3CpuInstr4_vcvttsd2si_EAX_XMM1_icebp_c16, 255, RM_REG, T_AVX_128, EAX, XMM1, NOREG, PASS_s_aValues32 }, 19407 { bs3CpuInstr4_vcvttsd2si_EAX_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, EAX, FSxBX, NOREG, PASS_s_aValues32 }, 19408 19409 { bs3CpuInstr4_vcvttsd2si_RAX_XMM1_icebp_c16, BS3_XCPT_UD, RM_REG, T_AVX_128, RAX, XMM1, NOREG, PASS_s_aValues64 }, 19410 { bs3CpuInstr4_vcvttsd2si_RAX_FSxBX_icebp_c16, BS3_XCPT_UD, RM_MEM, T_AVX_128, RAX, FSxBX, NOREG, PASS_s_aValues64 }, 19411 }; 19412 19413 static BS3CPUINSTR4_TEST1_T const s_aTests32[] = 19414 { 19415 { bs3CpuInstr4_cvttsd2si_EAX_XMM1_icebp_c32, 255, RM_REG, T_SSE, EAX, XMM1, NOREG, PASS_s_aValues32 }, 19416 { bs3CpuInstr4_cvttsd2si_EAX_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, EAX, FSxBX, NOREG, PASS_s_aValues32 }, 19417 19418 { bs3CpuInstr4_vcvttsd2si_EAX_XMM1_icebp_c32, 255, RM_REG, T_AVX_128, EAX, XMM1, NOREG, PASS_s_aValues32 }, 19419 { bs3CpuInstr4_vcvttsd2si_EAX_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, EAX, FSxBX, NOREG, PASS_s_aValues32 }, 19420 19421 { bs3CpuInstr4_vcvttsd2si_RAX_XMM1_icebp_c32, BS3_XCPT_UD, RM_REG, T_AVX_128, RAX, XMM1, NOREG, PASS_s_aValues64 }, 19422 { bs3CpuInstr4_vcvttsd2si_RAX_FSxBX_icebp_c32, BS3_XCPT_UD, RM_MEM, T_AVX_128, RAX, FSxBX, NOREG, PASS_s_aValues64 }, 19423 }; 19424 static BS3CPUINSTR4_TEST1_T const s_aTests64[] = 19425 { 19426 { bs3CpuInstr4_cvttsd2si_EAX_XMM1_icebp_c64, 255, RM_REG, T_SSE, EAX, XMM1, RAX, PASS_s_aValues32 }, 19427 { bs3CpuInstr4_cvttsd2si_EAX_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, EAX, FSxBX, RAX, PASS_s_aValues32 }, 19428 19429 { bs3CpuInstr4_cvttsd2si_R8D_XMM8_icebp_c64, 255, RM_REG, T_SSE, R8D, XMM8, R8, PASS_s_aValues32 }, 19430 { bs3CpuInstr4_cvttsd2si_R8D_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, R8D, FSxBX, R8, PASS_s_aValues32 }, 19431 19432 { bs3CpuInstr4_vcvttsd2si_EAX_XMM1_icebp_c64, 255, RM_REG, T_AVX_128, EAX, XMM1, RAX, PASS_s_aValues32 }, 19433 { bs3CpuInstr4_vcvttsd2si_EAX_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, EAX, FSxBX, RAX, PASS_s_aValues32 }, 19434 19435 { bs3CpuInstr4_vcvttsd2si_R8D_XMM8_icebp_c64, 255, RM_REG, T_AVX_128, R8D, XMM8, R8, PASS_s_aValues32 }, 19436 { bs3CpuInstr4_vcvttsd2si_R8D_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, R8D, FSxBX, R8, PASS_s_aValues32 }, 19437 19438 { bs3CpuInstr4_cvttsd2si_RAX_XMM1_icebp_c64, 255, RM_REG, T_SSE, RAX, XMM1, NOREG, PASS_s_aValues64 }, 19439 { bs3CpuInstr4_cvttsd2si_RAX_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, RAX, FSxBX, NOREG, PASS_s_aValues64 }, 19440 19441 { bs3CpuInstr4_cvttsd2si_R8_XMM8_icebp_c64, 255, RM_REG, T_SSE, R8, XMM8, NOREG, PASS_s_aValues64 }, 19442 { bs3CpuInstr4_cvttsd2si_R8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, R8, FSxBX, NOREG, PASS_s_aValues64 }, 19443 19444 { bs3CpuInstr4_vcvttsd2si_RAX_XMM1_icebp_c64, 255, RM_REG, T_AVX_128, RAX, XMM1, NOREG, PASS_s_aValues64 }, 19445 { bs3CpuInstr4_vcvttsd2si_RAX_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, RAX, FSxBX, NOREG, PASS_s_aValues64 }, 19446 19447 { bs3CpuInstr4_vcvttsd2si_R8_XMM8_icebp_c64, 255, RM_REG, T_AVX_128, R8, XMM8, NOREG, PASS_s_aValues64 }, 19448 { bs3CpuInstr4_vcvttsd2si_R8_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, R8, FSxBX, NOREG, PASS_s_aValues64 }, 19449 }; 19450 19451 static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); 19452 unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); 19453 return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, 19454 g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); 18297 19455 } 18298 19456 … … 18317 19475 #endif 18318 19476 #if defined(ALL_TESTS) 18319 { "[v]addps", bs3CpuInstr4_v_addps, 0 }, 18320 { "[v]addpd", bs3CpuInstr4_v_addpd, 0 }, 18321 { "[v]addss", bs3CpuInstr4_v_addss, 0 }, 18322 { "[v]addsd", bs3CpuInstr4_v_addsd, 0 }, 18323 { "[v]haddps", bs3CpuInstr4_v_haddps, 0 }, 18324 { "[v]haddpd", bs3CpuInstr4_v_haddpd, 0 }, 18325 { "[v]subps", bs3CpuInstr4_v_subps, 0 }, 18326 { "[v]subpd", bs3CpuInstr4_v_subpd, 0 }, 18327 { "[v]subss", bs3CpuInstr4_v_subss, 0 }, 18328 { "[v]subsd", bs3CpuInstr4_v_subsd, 0 }, 18329 { "[v]hsubps", bs3CpuInstr4_v_hsubps, 0 }, 18330 { "[v]hsubpd", bs3CpuInstr4_v_hsubpd, 0 }, 18331 { "[v]mulps", bs3CpuInstr4_v_mulps, 0 }, 18332 { "[v]mulpd", bs3CpuInstr4_v_mulpd, 0 }, 18333 { "[v]mulss", bs3CpuInstr4_v_mulss, 0 }, 18334 { "[v]mulsd", bs3CpuInstr4_v_mulsd, 0 }, 18335 { "[v]divps", bs3CpuInstr4_v_divps, 0 }, 18336 { "[v]divpd", bs3CpuInstr4_v_divpd, 0 }, 18337 { "[v]divss", bs3CpuInstr4_v_divss, 0 }, 18338 { "[v]divsd", bs3CpuInstr4_v_divsd, 0 }, 18339 { "[v]addsubps", bs3CpuInstr4_v_addsubps, 0 }, 18340 { "[v]addsubpd", bs3CpuInstr4_v_addsubpd, 0 }, 18341 { "[v]maxps", bs3CpuInstr4_v_maxps, 0 }, 18342 { "[v]maxpd", bs3CpuInstr4_v_maxpd, 0 }, 18343 { "[v]maxss", bs3CpuInstr4_v_maxss, 0 }, 18344 { "[v]maxsd", bs3CpuInstr4_v_maxsd, 0 }, 18345 { "[v]minps", bs3CpuInstr4_v_minps, 0 }, 18346 { "[v]minpd", bs3CpuInstr4_v_minpd, 0 }, 18347 { "[v]minss", bs3CpuInstr4_v_minss, 0 }, 18348 { "[v]minsd", bs3CpuInstr4_v_minsd, 0 }, 18349 { "[v]rcpps", bs3CpuInstr4_v_rcpps, 0 }, 18350 { "[v]rcpss", bs3CpuInstr4_v_rcpss, 0 }, 18351 { "[v]sqrtps", bs3CpuInstr4_v_sqrtps, 0 }, 18352 { "[v]sqrtpd", bs3CpuInstr4_v_sqrtpd, 0 }, 18353 { "[v]sqrtss", bs3CpuInstr4_v_sqrtss, 0 }, 18354 { "[v]sqrtsd", bs3CpuInstr4_v_sqrtsd, 0 }, 18355 { "[v]rsqrtps", bs3CpuInstr4_v_rsqrtps, 0 }, 18356 { "[v]rsqrtss", bs3CpuInstr4_v_rsqrtss, 0 }, 18357 { "cvtpi2ps", bs3CpuInstr4_cvtpi2ps, 0 }, 18358 { "cvtps2pi", bs3CpuInstr4_cvtps2pi, 0 }, 18359 { "cvttps2pi", bs3CpuInstr4_cvttps2pi, 0 }, 18360 { "cvtsi2ss", bs3CpuInstr4_cvtsi2ss, 0 }, 18361 { "cvtss2si", bs3CpuInstr4_cvtss2si, 0 }, 18362 { "cvttss2si", bs3CpuInstr4_cvttss2si, 0 }, 18363 { "cvtpi2pd", bs3CpuInstr4_cvtpi2pd, 0 }, 18364 { "cvtpd2pi", bs3CpuInstr4_cvtpd2pi, 0 }, 18365 { "cvttpd2pi", bs3CpuInstr4_cvttpd2pi, 0 }, 19477 { "[v]addps", bs3CpuInstr4_v_addps, 0 }, 19478 { "[v]addpd", bs3CpuInstr4_v_addpd, 0 }, 19479 { "[v]addss", bs3CpuInstr4_v_addss, 0 }, 19480 { "[v]addsd", bs3CpuInstr4_v_addsd, 0 }, 19481 { "[v]haddps", bs3CpuInstr4_v_haddps, 0 }, 19482 { "[v]haddpd", bs3CpuInstr4_v_haddpd, 0 }, 19483 { "[v]subps", bs3CpuInstr4_v_subps, 0 }, 19484 { "[v]subpd", bs3CpuInstr4_v_subpd, 0 }, 19485 { "[v]subss", bs3CpuInstr4_v_subss, 0 }, 19486 { "[v]subsd", bs3CpuInstr4_v_subsd, 0 }, 19487 { "[v]hsubps", bs3CpuInstr4_v_hsubps, 0 }, 19488 { "[v]hsubpd", bs3CpuInstr4_v_hsubpd, 0 }, 19489 { "[v]mulps", bs3CpuInstr4_v_mulps, 0 }, 19490 { "[v]mulpd", bs3CpuInstr4_v_mulpd, 0 }, 19491 { "[v]mulss", bs3CpuInstr4_v_mulss, 0 }, 19492 { "[v]mulsd", bs3CpuInstr4_v_mulsd, 0 }, 19493 { "[v]divps", bs3CpuInstr4_v_divps, 0 }, 19494 { "[v]divpd", bs3CpuInstr4_v_divpd, 0 }, 19495 { "[v]divss", bs3CpuInstr4_v_divss, 0 }, 19496 { "[v]divsd", bs3CpuInstr4_v_divsd, 0 }, 19497 { "[v]addsubps", bs3CpuInstr4_v_addsubps, 0 }, 19498 { "[v]addsubpd", bs3CpuInstr4_v_addsubpd, 0 }, 19499 { "[v]maxps", bs3CpuInstr4_v_maxps, 0 }, 19500 { "[v]maxpd", bs3CpuInstr4_v_maxpd, 0 }, 19501 { "[v]maxss", bs3CpuInstr4_v_maxss, 0 }, 19502 { "[v]maxsd", bs3CpuInstr4_v_maxsd, 0 }, 19503 { "[v]minps", bs3CpuInstr4_v_minps, 0 }, 19504 { "[v]minpd", bs3CpuInstr4_v_minpd, 0 }, 19505 { "[v]minss", bs3CpuInstr4_v_minss, 0 }, 19506 { "[v]minsd", bs3CpuInstr4_v_minsd, 0 }, 19507 { "[v]rcpps", bs3CpuInstr4_v_rcpps, 0 }, 19508 { "[v]rcpss", bs3CpuInstr4_v_rcpss, 0 }, 19509 { "[v]sqrtps", bs3CpuInstr4_v_sqrtps, 0 }, 19510 { "[v]sqrtpd", bs3CpuInstr4_v_sqrtpd, 0 }, 19511 { "[v]sqrtss", bs3CpuInstr4_v_sqrtss, 0 }, 19512 { "[v]sqrtsd", bs3CpuInstr4_v_sqrtsd, 0 }, 19513 { "[v]rsqrtps", bs3CpuInstr4_v_rsqrtps, 0 }, 19514 { "[v]rsqrtss", bs3CpuInstr4_v_rsqrtss, 0 }, 19515 { "cvtpi2ps", bs3CpuInstr4_cvtpi2ps, 0 }, 19516 { "cvtps2pi", bs3CpuInstr4_cvtps2pi, 0 }, 19517 { "cvttps2pi", bs3CpuInstr4_cvttps2pi, 0 }, 19518 { "[v]cvtsi2ss", bs3CpuInstr4_v_cvtsi2ss, 0 }, 19519 { "[v]cvtss2si", bs3CpuInstr4_v_cvtss2si, 0 }, 19520 { "[v]cvttss2si", bs3CpuInstr4_v_cvttss2si, 0 }, 19521 { "cvtpi2pd", bs3CpuInstr4_cvtpi2pd, 0 }, 19522 { "cvtpd2pi", bs3CpuInstr4_cvtpd2pi, 0 }, 19523 { "cvttpd2pi", bs3CpuInstr4_cvttpd2pi, 0 }, 19524 { "[v]cvtsi2sd", bs3CpuInstr4_v_cvtsi2sd, 0 }, 19525 { "[v]cvtsd2si", bs3CpuInstr4_v_cvtsd2si, 0 }, 19526 { "[v]cvttsd2si", bs3CpuInstr4_v_cvttsd2si, 0 }, 18366 19527 #endif 18367 19528 }; … … 18462 19623 Bs3TestTerm(); 18463 19624 } 18464
Note:
See TracChangeset
for help on using the changeset viewer.