Changeset 106306 in vbox
- Timestamp:
- Oct 14, 2024 9:53:20 AM (7 weeks 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
r106285 r106306 696 696 EMIT_INSTR_PLUS_ICEBP_C64 vsqrtpd, YMM8, YMM9 697 697 EMIT_INSTR_PLUS_ICEBP_C64 vsqrtpd, YMM8, FSxBX 698 698 699 ; 699 700 ;; [v]sqrtss … … 715 716 EMIT_INSTR_PLUS_ICEBP vsqrtss, XMM1, XMM1, FSxBX 716 717 718 ; 719 ;; [v]sqrtsd 720 ; 721 EMIT_INSTR_PLUS_ICEBP sqrtsd, XMM1, XMM2 722 EMIT_INSTR_PLUS_ICEBP sqrtsd, XMM1, FSxBX 723 EMIT_INSTR_PLUS_ICEBP_C64 sqrtsd, XMM8, XMM9 724 EMIT_INSTR_PLUS_ICEBP_C64 sqrtsd, XMM8, FSxBX 725 726 EMIT_INSTR_PLUS_ICEBP vsqrtsd, XMM1, XMM2, XMM3 727 EMIT_INSTR_PLUS_ICEBP vsqrtsd, XMM1, XMM2, FSxBX 728 EMIT_INSTR_PLUS_ICEBP_C64 vsqrtsd, XMM8, XMM9, XMM10 729 EMIT_INSTR_PLUS_ICEBP_C64 vsqrtsd, XMM8, XMM9, FSxBX 730 731 EMIT_INSTR_PLUS_ICEBP sqrtsd, XMM1, XMM1 732 EMIT_INSTR_PLUS_ICEBP vsqrtsd, XMM1, XMM1, XMM1 733 EMIT_INSTR_PLUS_ICEBP vsqrtsd, XMM1, XMM1, XMM2 734 EMIT_INSTR_PLUS_ICEBP vsqrtsd, XMM1, XMM2, XMM2 735 EMIT_INSTR_PLUS_ICEBP vsqrtsd, XMM1, XMM1, FSxBX 736 717 737 %endif ; BS3_INSTANTIATING_CMN 718 738 -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-4.c32
r106305 r106306 387 387 #define FP64_DENORM_MAX(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_DENORM_MAX, 0) 388 388 #define FP64_DENORM_MIN(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_DENORM_MIN, 0) 389 #define FP64_DENORM_V0(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_ RAND_V2, 0)390 #define FP64_DENORM_V1(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_ RAND_V1, 0)389 #define FP64_DENORM_V0(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_INV_V2, 0) 390 #define FP64_DENORM_V1(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_INV_V1, 0) 391 391 #define FP64_DENORM_V2(a_Sign) RTFLOAT64U_INIT_C(a_Sign, 0x00123456789ab, 0) 392 392 #define FP64_DENORM_V3(a_Sign) RTFLOAT64U_INIT_C(a_Sign, 0x314159, 0) … … 13261 13261 /*mxcsr:in */ 0, 13262 13262 /*128:out */ 0, 13263 /*256:out */ -1 13263 /*256:out */ -1 }, 13264 13264 { { /*src1 */ { FP32_0(1), FP32_RAND_x7_V2 } }, 13265 13265 { /*src2 */ { FP32_RAND_V5(0), FP32_RAND_x7_V1 } }, … … 14329 14329 */ 14330 14330 /** @todo Invalids. */ 14331 /*23*/ /* FP64_TABLE_D10_P S_INVALIDS */14331 /*23*/ /* FP64_TABLE_D10_PD_INVALIDS */ 14332 14332 /** @todo Underflow; Rounding; FZ etc. */ 14333 14333 }; … … 14405 14405 /*mxcsr:in */ 0, 14406 14406 /*128:out */ 0, 14407 /*256:out */ -1 14407 /*256:out */ -1 }, 14408 14408 { { /*src1 */ { FP32_0(1), FP32_RAND_x7_V2 } }, 14409 14409 { /*src2 */ { FP32_RAND_V5(0), FP32_RAND_x7_V1 } }, … … 14689 14689 /*mxcsr:in */ 0, 14690 14690 /*128:out */ 0, 14691 /*256:out */ -1 14691 /*256:out */ -1 }, 14692 14692 /* 14693 14693 * Infinity. … … 14805 14805 { bs3CpuInstr4_vsqrtss_XMM1_XMM2_XMM2_icebp_c64, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 2, 2, PASS_s_aValuesSR }, 14806 14806 { bs3CpuInstr4_vsqrtss_XMM1_XMM1_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, 14807 }; 14808 #undef PASS_s_aValues 14809 #undef PASS_s_aValuesSR 14810 14811 static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); 14812 unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); 14813 return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, 14814 g_aXcptConfig5, RT_ELEMENTS(g_aXcptConfig5)); 14815 } 14816 14817 14818 /* 14819 * [V]SQRTSD. 14820 */ 14821 BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_sqrtsd(uint8_t bMode) 14822 { 14823 static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues[] = 14824 { 14825 /* 14826 * Zero. 14827 */ 14828 /* 0*/{ { /*src1 */ { FP64_0(0), FP64_RAND_x3_V3 } }, 14829 { /*src2 */ { FP64_RAND_V2(0), FP64_RAND_x3_V2 } }, 14830 { /* => */ { FP64_0(0), FP64_RAND_x3_V2 } }, 14831 /*mxcsr:in */ 0, 14832 /*128:out */ 0, 14833 /*256:out */ -1 }, 14834 { { /*src1 */ { FP64_0(1), FP64_RAND_x3_V0 } }, 14835 { /*src2 */ { FP64_RAND_V3(1), FP64_RAND_x3_V1 } }, 14836 { /* => */ { FP64_0(1), FP64_RAND_x3_V1 } }, 14837 /*mxcsr:in */ 0, 14838 /*128:out */ 0, 14839 /*256:out */ -1 }, 14840 { { /*src1 */ { FP64_0(1), FP64_RAND_x3_V2 } }, 14841 { /*src2 */ { FP64_RAND_V1(0), FP64_RAND_x3_V1 } }, 14842 { /* => */ { FP64_0(1), FP64_RAND_x3_V1 } }, 14843 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 14844 /*128:out */ X86_MXCSR_RC_ZERO, 14845 /*256:out */ -1 }, 14846 { { /*src1 */ { FP64_0(1), FP64_RAND_x3_V0 } }, 14847 { /*src2 */ { FP64_SNAN(0), FP64_RAND_x3_V3 } }, 14848 { /* => */ { FP64_0(1), FP64_RAND_x3_V3 } }, 14849 /*mxcsr:in */ X86_MXCSR_RC_UP, 14850 /*128:out */ X86_MXCSR_RC_UP, 14851 /*256:out */ -1 }, 14852 { { /*src1 */ { FP64_0(0), FP64_RAND_x3_V2 } }, 14853 { /*src2 */ { FP64_QNAN(1), FP64_RAND_x3_V0 } }, 14854 { /* => */ { FP64_0(0), FP64_RAND_x3_V0 } }, 14855 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 14856 /*128:out */ X86_MXCSR_RC_DOWN, 14857 /*256:out */ -1 }, 14858 { { /*src1 */ { FP64_0(0), FP64_RAND_x3_V1 } }, 14859 { /*src2 */ { FP64_RAND_V0(1), FP64_RAND_x3_V3 } }, 14860 { /* => */ { FP64_0(0), FP64_RAND_x3_V3 } }, 14861 /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, 14862 /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, 14863 /*256:out */ -1 }, 14864 /* 14865 * Infinity. 14866 */ 14867 /* 6*/{ { /*src1 */ { FP64_INF(0), FP64_RAND_x3_V1 } }, 14868 { /*src2 */ { FP64_RAND_V2(0), FP64_RAND_x3_V0 } }, 14869 { /* => */ { FP64_INF(0), FP64_RAND_x3_V0 } }, 14870 /*mxcsr:in */ 0, 14871 /*128:out */ 0, 14872 /*256:out */ -1 }, 14873 { { /*src1 */ { FP64_INF(0), FP64_RAND_x3_V3 } }, 14874 { /*src2 */ { FP64_2(1), FP64_RAND_x3_V1 } }, 14875 { /* => */ { FP64_INF(0), FP64_RAND_x3_V1 } }, 14876 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 14877 /*128:out */ X86_MXCSR_RC_ZERO, 14878 /*256:out */ -1 }, 14879 { { /*src1 */ { FP64_INF(0), FP64_RAND_x3_V1 } }, 14880 { /*src2 */ { FP64_RAND_V2(0), FP64_RAND_x3_V3 } }, 14881 { /* => */ { FP64_INF(0), FP64_RAND_x3_V3 } }, 14882 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, 14883 /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, 14884 /*256:out */ -1 }, 14885 { { /*src1 */ { FP64_INF(0), FP64_RAND_x3_V2 } }, 14886 { /*src2 */ { FP64_SNAN(0), FP64_RAND_x3_V0 } }, 14887 { /* => */ { FP64_INF(0), FP64_RAND_x3_V0 } }, 14888 /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, 14889 /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, 14890 /*256:out */ -1 }, 14891 { { /*src1 */ { FP64_INF(1), FP64_RAND_x3_V2 } }, 14892 { /*src2 */ { FP64_RAND_V2(0), FP64_RAND_x3_V2 } }, 14893 { /* => */ { FP64_QNAN(1), FP64_RAND_x3_V2 } }, 14894 /*mxcsr:in */ 0, 14895 /*128:out */ X86_MXCSR_IE, 14896 /*256:out */ -1 }, 14897 { { /*src1 */ { FP64_INF(1), FP64_RAND_x3_V1 } }, 14898 { /*src2 */ { FP64_RAND_V2(0), FP64_RAND_x3_V1 } }, 14899 { /* => */ { FP64_QNAN(1), FP64_RAND_x3_V1 } }, 14900 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 14901 /*128:out */ X86_MXCSR_IE | X86_MXCSR_RC_ZERO, 14902 /*256:out */ -1 }, 14903 { { /*src1 */ { FP64_INF(1), FP64_RAND_x3_V2 } }, 14904 { /*src2 */ { FP64_QNAN(0), FP64_RAND_x3_V2 } }, 14905 { /* => */ { FP64_QNAN(1), FP64_RAND_x3_V2 } }, 14906 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, 14907 /*128:out */ X86_MXCSR_IE | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, 14908 /*256:out */ -1 }, 14909 { { /*src1 */ { FP64_INF(1), FP64_RAND_x3_V3 } }, 14910 { /*src2 */ { FP64_RAND_V0(0), FP64_RAND_x3_V1 } }, 14911 { /* => */ { FP64_QNAN(1), FP64_RAND_x3_V1 } }, 14912 /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, 14913 /*128:out */ X86_MXCSR_IE | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, 14914 /*256:out */ -1 }, 14915 /* 14916 * Normals & Precision (Overflow, Underflow not possible). 14917 */ 14918 /*14*/{ { /*src1 */ { FP64_NORM_V0(0), FP64_RAND_x3_V3 } }, 14919 { /*src2 */ { FP64_NORM_V0(0), FP64_RAND_x3_V0 } }, 14920 { /* => */ { FP64_V(0,0x4b4cf5d7baa8f,0x200)/*sqrt(FP64_NORM_V0)*/, FP64_RAND_x3_V0 } }, 14921 /*mxcsr:in */ 0, 14922 /*128:out */ X86_MXCSR_PE, 14923 /*256:out */ -1 }, 14924 { { /*src1 */ { FP64_NORM_V2(0), FP64_RAND_x3_V2 } }, 14925 { /*src2 */ { FP64_1(1), FP64_RAND_x3_V3 } }, 14926 { /* => */ { FP64_V(0,0x568cddb7b5f47,0x5fe)/*sqrt(FP64_NORM_V2)*/, FP64_RAND_x3_V3 } }, 14927 /*mxcsr:in */ X86_MXCSR_FZ, 14928 /*128:out */ X86_MXCSR_PE | X86_MXCSR_FZ, 14929 /*256:out */ -1 }, 14930 { { /*src1 */ { FP64_NORM_V3(0), FP64_0_x3(0) } }, 14931 { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_RAND_x3_V1 } }, 14932 { /* => */ { FP64_V(0,0x4ebe86dd38102,0x440)/*sqrt(FP64_NORM_V3)*/, FP64_RAND_x3_V1 } }, 14933 /*mxcsr:in */ X86_MXCSR_DAZ, 14934 /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_PE, 14935 /*256:out */ -1 }, 14936 { { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_x3_V0 } }, 14937 { /*src2 */ { FP64_NORM_MAX(1), FP64_RAND_x3_V2 } }, 14938 { /* => */ { FP64_V(0,0xfffffffffffff,0x5fe)/*sqrt(FP64_NORM_MAX)*/, FP64_RAND_x3_V2 } }, 14939 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ, 14940 /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_PE, 14941 /*256:out */ -1 }, 14942 { { /*src1 */ { FP64_NORM_MIN(0), FP64_RAND_x3_V3 } }, 14943 { /*src2 */ { FP64_INF(1), FP64_RAND_x3_V2 } }, 14944 { /* => */ { FP64_V(0,0x0,0x200)/*sqrt(FP64_NORM_MIN)*/, FP64_RAND_x3_V2 } }, 14945 /*mxcsr:in */ 0, 14946 /*128:out */ 0, 14947 /*256:out */ -1 }, 14948 { { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_x3_V2 } }, 14949 { /*src2 */ { FP64_RAND_V1(1), FP64_RAND_x3_V1 } }, 14950 { /* => */ { FP64_V(0,0x6a09e667f3bcc,0x419)/*sqrt(FP64_NORM_SAFE_INT_MAX)*/, FP64_RAND_x3_V1 } }, 14951 /*mxcsr:in */ 0, 14952 /*128:out */ X86_MXCSR_PE, 14953 /*256:out */ -1 }, 14954 { { /*src1 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_RAND_x3_V1 } }, 14955 { /*src2 */ { FP64_RAND_V0(0), FP64_RAND_x3_V3 } }, 14956 { /* => */ { FP64_V(0,0x0,0x200)/*sqrt(FP64_NORM_SAFE_INT_MIN)*/, FP64_RAND_x3_V3 } }, 14957 /*mxcsr:in */ 0, 14958 /*128:out */ 0, 14959 /*256:out */ -1 }, 14960 { { /*src1 */ { FP64_V(0,0x0,0x403)/*256.0*/, FP64_RAND_x3_V0 } }, 14961 { /*src2 */ { FP64_2(0), FP64_RAND_x3_V0 } }, 14962 { /* => */ { FP64_V(0,0x0,0x401)/*16.0*/, FP64_RAND_x3_V0 } }, 14963 /*mxcsr:in */ X86_MXCSR_RC_ZERO, 14964 /*128:out */ X86_MXCSR_RC_ZERO, 14965 /*256:out */ -1 }, 14966 { { /*src1 */ { FP64_V(0,0x0,0x403)/*256.0*/, FP64_RAND_x3_V3 } }, 14967 { /*src2 */ { FP64_DENORM_V3(0), FP64_RAND_x3_V0 } }, 14968 { /* => */ { FP64_V(0,0x0,0x401)/*16.0*/, FP64_RAND_x3_V0 } }, 14969 /*mxcsr:in */ X86_MXCSR_RC_UP, 14970 /*128:out */ X86_MXCSR_RC_UP, 14971 /*256:out */ -1 }, 14972 { { /*src1 */ { FP64_V(0,0x800000000000,0x408)/*528.0*/, FP64_RAND_x3_V2 } }, 14973 { /*src2 */ { FP64_NORM_SAFE_INT_MAX(1), FP64_RAND_x3_V3 } }, 14974 { /* => */ { FP64_V(0,0x6fa6ea162d0f0,0x403)/*sqrt(528)*/, FP64_RAND_x3_V3 } }, 14975 /*mxcsr:in */ 0, 14976 /*128:out */ X86_MXCSR_PE, 14977 /*256:out */ -1 }, 14978 { { /*src1 */ { FP64_V(0,0x800000000000,0x408)/*528.0*/, FP64_RAND_x3_V3 } }, 14979 { /*src2 */ { FP64_NORM_V3(0), FP64_RAND_x3_V1 } }, 14980 { /* => */ { FP64_V(0,0x6fa6ea162d0f1,0x403)/*sqrt(528)[UP]*/, FP64_RAND_x3_V1 } }, 14981 /*mxcsr:in */ X86_MXCSR_RC_UP, 14982 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_UP, 14983 /*256:out */ -1 }, 14984 { { /*src1 */ { FP64_V(0,0x87fffffffffff,0x3fc)/*(7/16)^2-epsilon*/, FP64_RAND_x3_V0 } }, 14985 { /*src2 */ { FP64_0(0), FP64_RAND_x3_V2 } }, 14986 { /* => */ { FP64_V(0,0xbffffffffffff,0x3fd)/*7/16-*/, FP64_RAND_x3_V2 } }, 14987 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 14988 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_DOWN, 14989 /*256:out */ -1 }, 14990 { { /*src1 */ { FP64_V(0,0x87fffffffffff,0x3fc)/*(7/16)^2-epsilon*/, FP64_RAND_x3_V3 } }, 14991 { /*src2 */ { FP64_SNAN_V0(1), FP64_RAND_x3_V2 } }, 14992 { /* => */ { FP64_V(0,0xc000000000000,0x3fd)/*7/16[UP]*/, FP64_RAND_x3_V2 } }, 14993 /*mxcsr:in */ X86_MXCSR_RC_UP, 14994 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_UP, 14995 /*256:out */ -1 }, 14996 { { /*src1 */ { FP64_V(0,0x8800000000000,0x3fc)/*(7/16)^2*/, FP64_RAND_x3_V2 } }, 14997 { /*src2 */ { FP64_DENORM_MIN(1), FP64_RAND_x3_V1 } }, 14998 { /* => */ { FP64_V(0,0xc000000000000,0x3fd)/*7/16*/, FP64_RAND_x3_V1 } }, 14999 /*mxcsr:in */ 0, 15000 /*128:out */ 0, 15001 /*256:out */ -1 }, 15002 { { /*src1 */ { FP64_V(0,0x880000000000,0x408)/*529.0*/, FP64_RAND_x3_V1 } }, 15003 { /*src2 */ { FP64_RAND_V3(0), FP64_RAND_x3_V3 } }, 15004 { /* => */ { FP64_V(0,0x7000000000000,0x403)/*23.0*/, FP64_RAND_x3_V3 } }, 15005 /*mxcsr:in */ 0, 15006 /*128:out */ 0, 15007 /*256:out */ -1 }, 15008 { { /*src1 */ { FP64_V(0,0xde90800000000,0x40c)/*123.75^2*/, FP64_0_x3(1) } }, 15009 { /*src2 */ { FP64_SNAN_V0(1), FP64_RAND_x3_V0 } }, 15010 { /* => */ { FP64_V(0,0xef00000000000,0x405)/*123.75*/, FP64_RAND_x3_V0 } }, 15011 /*mxcsr:in */ 0, 15012 /*128:out */ 0, 15013 /*256:out */ -1 }, 15014 { { /*src1 */ { FP64_V(0,0xde90800000001,0x40c)/*123.75^2+epsilon*/, FP64_RAND_x3_V3 } }, 15015 { /*src2 */ { FP64_QNAN_V2(0), FP64_RAND_x3_V0 } }, 15016 { /* => */ { FP64_V(0,0xef00000000000,0x405)/*123.75[ZERO=DOWN]*/, FP64_RAND_x3_V0 } }, 15017 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 15018 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_DOWN, 15019 /*256:out */ -1 }, 15020 { { /*src1 */ { FP64_V(0,0xde90800000001,0x40c)/*123.75^2+epsilon*/, FP64_RAND_x3_V2 } }, 15021 { /*src2 */ { FP64_QNAN_V2(1), FP64_RAND_x3_V3 } }, 15022 { /* => */ { FP64_V(0,0xef00000000001,0x405)/*123.75+*/, FP64_RAND_x3_V3 } }, 15023 /*mxcsr:in */ 0, 15024 /*128:out */ X86_MXCSR_PE, 15025 /*256:out */ -1 }, 15026 { { /*src1 */ { FP64_V(0,0x100000000000,0x407)/*257.0*/, FP64_RAND_x3_V1 } }, 15027 { /*src2 */ { FP64_DENORM_V1(1), FP64_0_x3(0) } }, 15028 { /* => */ { FP64_V(0,0x7fe00ff6070,0x403)/*sqrt(257)*/, FP64_0_x3(0) } }, 15029 /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_NEAREST, 15030 /*128:out */ X86_MXCSR_PE | X86_MXCSR_DAZ | X86_MXCSR_RC_NEAREST, 15031 /*256:out */ -1 }, 15032 { { /*src1 */ { FP64_V(0,0x100000000000,0x407)/*257.0*/, FP64_RAND_x3_V0 } }, 15033 { /*src2 */ { FP64_NORM_V0(0), FP64_RAND_x3_V2 } }, 15034 { /* => */ { FP64_V(0,0x7fe00ff606f,0x403)/*sqrt(257)[DOWN]*/, FP64_RAND_x3_V2 } }, 15035 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 15036 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_DOWN, 15037 /*256:out */ -1 }, 15038 { { /*src1 */ { FP64_V(1,0x100000000000,0x407)/*-257.0*/, FP64_RAND_x3_V3 } }, 15039 { /*src2 */ { FP64_NORM_V3(0), FP64_RAND_x3_V2 } }, 15040 { /* => */ { FP64_QNAN(1), FP64_RAND_x3_V2 } }, 15041 /*mxcsr:in */ 0, 15042 /*128:out */ X86_MXCSR_IE, 15043 /*256:out */ -1 }, 15044 /* 15045 * Denormals. 15046 */ 15047 /*35*/{ { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_x3_V1 } }, 15048 { /*src2 */ { FP64_NORM_V1(0), FP64_RAND_x3_V2 } }, 15049 { /* => */ { FP64_V(0,0xfffffffffffff,0x1ff), FP64_RAND_x3_V2 } }, 15050 /*mxcsr:in */ 0, 15051 /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE, 15052 /*256:out */ -1 }, 15053 { { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_x3_V2 } }, 15054 { /*src2 */ { FP64_DENORM_MIN(1), FP64_RAND_x3_V3 } }, 15055 { /* => */ { FP64_V(0,0xffffffffffffe,0x1ff), FP64_RAND_x3_V3 } }, 15056 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 15057 /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_RC_DOWN, 15058 /*256:out */ -1 }, 15059 { { /*src1 */ { FP64_DENORM_MIN(0), FP64_RAND_x3_V3 } }, 15060 { /*src2 */ { FP64_RAND_V1(0), FP64_RAND_x3_V3 } }, 15061 { /* => */ { FP64_V(0,0x0,0x1e6), FP64_RAND_x3_V3 } }, 15062 /*mxcsr:in */ X86_MXCSR_FZ, 15063 /*128:out */ X86_MXCSR_DE | X86_MXCSR_FZ, 15064 /*256:out */ -1 }, 15065 { { /*src1 */ { FP64_DENORM_V1(0), FP64_RAND_x3_V2 } }, 15066 { /*src2 */ { FP64_NORM_V1(0), FP64_0_x3(1) } }, 15067 { /* => */ { FP64_V(0,0xf268ffb4eca58,0x1fe), FP64_0_x3(1) } }, 15068 /*mxcsr:in */ 0, 15069 /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE, 15070 /*256:out */ -1 }, 15071 { { /*src1 */ { FP64_DENORM_V0(0), FP64_0_x3(0) } }, 15072 { /*src2 */ { FP64_RAND_V0(1), FP64_RAND_x3_V0 } }, 15073 { /* => */ { FP64_V(0,0x560f6572dd65,0x1fe), FP64_RAND_x3_V0 } }, 15074 /*mxcsr:in */ X86_MXCSR_FZ, 15075 /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_FZ, 15076 /*256:out */ -1 }, 15077 { { /*src1 */ { FP64_DENORM_V3(0), FP64_0_x3(0) } }, 15078 { /*src2 */ { FP64_RAND_V0(1), FP64_RAND_x3_V0 } }, 15079 { /* => */ { FP64_V(0,0xc12a581683cac,0x1f0), FP64_RAND_x3_V0 } }, 15080 /*mxcsr:in */ 0, 15081 /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE, 15082 /*256:out */ -1 }, 15083 { { /*src1 */ { FP64_DENORM_V3(0), FP64_0_x3(0) } }, 15084 { /*src2 */ { FP64_RAND_V0(1), FP64_RAND_x3_V0 } }, 15085 { /* => */ { FP64_V(0,0xc12a581683cad,0x1f0), FP64_RAND_x3_V0 } }, 15086 /*mxcsr:in */ X86_MXCSR_RC_UP, 15087 /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_RC_UP, 15088 /*256:out */ -1 }, 15089 { { /*src1 */ { FP64_DENORM_V2(0), FP64_RAND_x3_V1 } }, 15090 { /*src2 */ { FP64_NORM_V3(0), FP64_RAND_x3_V3 } }, 15091 { /* => */ { FP64_0(0), FP64_RAND_x3_V3 } }, 15092 /*mxcsr:in */ X86_MXCSR_DAZ, 15093 /*128:out */ X86_MXCSR_DAZ, 15094 /*256:out */ -1 }, 15095 { { /*src1 */ { FP64_DENORM_V3(1), FP64_RAND_x3_V0 } }, 15096 { /*src2 */ { FP64_QNAN_V0(0), FP64_RAND_x3_V3 } }, 15097 { /* => */ { FP64_0(1), FP64_RAND_x3_V3 } }, 15098 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ, 15099 /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ, 15100 /*256:out */ -1 }, 15101 /** @todo Invalids. */ 15102 /*44*/ /* FP64_TABLE_D10_SD_INVALIDS */ 15103 }; 15104 #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues 15105 15106 /* Sanity-check subset for 'same register' instruction variants */ 15107 static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValuesSR[] = 15108 { 15109 /* 15110 * Zero. 15111 */ 15112 /* 0*/{ { /*src1 */ { FP64_0(0), FP64_RAND_x3_V3 } }, 15113 { /*src2 */ { FP64_0(0), FP64_RAND_x3_V3 } }, 15114 { /* => */ { FP64_0(0), FP64_RAND_x3_V3 } }, 15115 /*mxcsr:in */ 0, 15116 /*128:out */ 0, 15117 /*256:out */ -1 }, 15118 { { /*src1 */ { FP64_0(1), FP64_RAND_x3_V0 } }, 15119 { /*src2 */ { FP64_0(1), FP64_RAND_x3_V0 } }, 15120 { /* => */ { FP64_0(1), FP64_RAND_x3_V0 } }, 15121 /*mxcsr:in */ 0, 15122 /*128:out */ 0, 15123 /*256:out */ -1 }, 15124 /* 15125 * Infinity. 15126 */ 15127 /* 2*/{ { /*src1 */ { FP64_INF(0), FP64_RAND_x3_V1 } }, 15128 { /*src2 */ { FP64_INF(0), FP64_RAND_x3_V1 } }, 15129 { /* => */ { FP64_INF(0), FP64_RAND_x3_V1 } }, 15130 /*mxcsr:in */ 0, 15131 /*128:out */ 0, 15132 /*256:out */ -1 }, 15133 { { /*src1 */ { FP64_INF(1), FP64_RAND_x3_V2 } }, 15134 { /*src2 */ { FP64_INF(1), FP64_RAND_x3_V2 } }, 15135 { /* => */ { FP64_QNAN(1), FP64_RAND_x3_V2 } }, 15136 /*mxcsr:in */ 0, 15137 /*128:out */ X86_MXCSR_IE, 15138 /*256:out */ -1 }, 15139 /* 15140 * Normals & Precision (Overflow, Underflow not possible). 15141 */ 15142 /* 4*/{ { /*src1 */ { FP64_NORM_V0(0), FP64_RAND_x3_V3 } }, 15143 { /*src2 */ { FP64_NORM_V0(0), FP64_RAND_x3_V3 } }, 15144 { /* => */ { FP64_V(0,0x4b4cf5d7baa8f,0x200)/*sqrt(FP64_NORM_V0)*/, FP64_RAND_x3_V3 } }, 15145 /*mxcsr:in */ 0, 15146 /*128:out */ X86_MXCSR_PE, 15147 /*256:out */ -1 }, 15148 { { /*src1 */ { FP64_NORM_MIN(0), FP64_RAND_x3_V3 } }, 15149 { /*src2 */ { FP64_NORM_MIN(0), FP64_RAND_x3_V3 } }, 15150 { /* => */ { FP64_V(0,0x0,0x200)/*sqrt(FP64_NORM_MIN)*/, FP64_RAND_x3_V3 } }, 15151 /*mxcsr:in */ 0, 15152 /*128:out */ 0, 15153 /*256:out */ -1 }, 15154 { { /*src1 */ { FP64_V(0,0x87fffffffffff,0x3fc)/*(7/16)^2-epsilon*/, FP64_RAND_x3_V0 } }, 15155 { /*src2 */ { FP64_V(0,0x87fffffffffff,0x3fc)/*(7/16)^2-epsilon*/, FP64_RAND_x3_V0 } }, 15156 { /* => */ { FP64_V(0,0xbffffffffffff,0x3fd)/*7/16-*/, FP64_RAND_x3_V0 } }, 15157 /*mxcsr:in */ X86_MXCSR_RC_DOWN, 15158 /*128:out */ X86_MXCSR_PE | X86_MXCSR_RC_DOWN, 15159 /*256:out */ -1 }, 15160 { { /*src1 */ { FP64_V(0,0x8800000000000,0x3fc)/*(7/16)^2*/, FP64_RAND_x3_V2 } }, 15161 { /*src2 */ { FP64_V(0,0x8800000000000,0x3fc)/*(7/16)^2*/, FP64_RAND_x3_V2 } }, 15162 { /* => */ { FP64_V(0,0xc000000000000,0x3fd)/*7/16*/, FP64_RAND_x3_V2 } }, 15163 /*mxcsr:in */ X86_MXCSR_RC_UP, 15164 /*128:out */ X86_MXCSR_RC_UP, 15165 /*256:out */ -1 }, 15166 /* 15167 * Denormals. 15168 */ 15169 /* 8*/{ { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_x3_V1 } }, 15170 { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_x3_V1 } }, 15171 { /* => */ { FP64_V(0,0xfffffffffffff,0x1ff), FP64_RAND_x3_V1 } }, 15172 /*mxcsr:in */ 0, 15173 /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE, 15174 /*256:out */ -1 }, 15175 { { /*src1 */ { FP64_DENORM_MIN(0), FP64_RAND_x3_V3 } }, 15176 { /*src2 */ { FP64_DENORM_MIN(1), FP64_RAND_x3_V3 } }, 15177 { /* => */ { FP64_V(0,0x0,0x1e6), FP64_RAND_x3_V3 } }, 15178 /*mxcsr:in */ X86_MXCSR_FZ, 15179 /*128:out */ X86_MXCSR_DE | X86_MXCSR_FZ, 15180 /*256:out */ -1 }, 15181 { { /*src1 */ { FP64_DENORM_V3(1), FP64_RAND_x3_V0 } }, 15182 { /*src2 */ { FP64_DENORM_V3(1), FP64_RAND_x3_V0 } }, 15183 { /* => */ { FP64_0(1), FP64_RAND_x3_V0 } }, 15184 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ, 15185 /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ, 15186 /*256:out */ -1 }, 15187 /** @todo Invalids. */ 15188 /*11*/ /* FP64_TABLE_D10_SD_INVALIDS // or excerpt? */ 15189 }; 15190 #define PASS_s_aValuesSR RT_ELEMENTS(s_aValuesSR), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValuesSR 15191 15192 static BS3CPUINSTR4_TEST1_T const s_aTests16[] = 15193 { 15194 { bs3CpuInstr4_sqrtsd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, 15195 { bs3CpuInstr4_sqrtsd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, 15196 15197 { bs3CpuInstr4_vsqrtsd_XMM1_XMM2_XMM3_icebp_c16, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, 15198 { bs3CpuInstr4_vsqrtsd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, 15199 15200 { bs3CpuInstr4_sqrtsd_XMM1_XMM1_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 1, PASS_s_aValuesSR }, 15201 { bs3CpuInstr4_vsqrtsd_XMM1_XMM1_XMM1_icebp_c16, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 1, 1, PASS_s_aValuesSR }, 15202 { bs3CpuInstr4_vsqrtsd_XMM1_XMM1_XMM2_icebp_c16, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, 15203 { bs3CpuInstr4_vsqrtsd_XMM1_XMM2_XMM2_icebp_c16, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 2, 2, PASS_s_aValuesSR }, 15204 { bs3CpuInstr4_vsqrtsd_XMM1_XMM1_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, 15205 }; 15206 static BS3CPUINSTR4_TEST1_T const s_aTests32[] = 15207 { 15208 { bs3CpuInstr4_sqrtsd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, 15209 { bs3CpuInstr4_sqrtsd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, 15210 15211 { bs3CpuInstr4_vsqrtsd_XMM1_XMM2_XMM3_icebp_c32, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, 15212 { bs3CpuInstr4_vsqrtsd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, 15213 15214 { bs3CpuInstr4_sqrtsd_XMM1_XMM1_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 1, PASS_s_aValuesSR }, 15215 { bs3CpuInstr4_vsqrtsd_XMM1_XMM1_XMM1_icebp_c32, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 1, 1, PASS_s_aValuesSR }, 15216 { bs3CpuInstr4_vsqrtsd_XMM1_XMM1_XMM2_icebp_c32, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, 15217 { bs3CpuInstr4_vsqrtsd_XMM1_XMM2_XMM2_icebp_c32, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 2, 2, PASS_s_aValuesSR }, 15218 { bs3CpuInstr4_vsqrtsd_XMM1_XMM1_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, 15219 }; 15220 static BS3CPUINSTR4_TEST1_T const s_aTests64[] = 15221 { 15222 { bs3CpuInstr4_sqrtsd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, 15223 { bs3CpuInstr4_sqrtsd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, 15224 15225 { bs3CpuInstr4_sqrtsd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, 15226 { bs3CpuInstr4_sqrtsd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, 15227 15228 { bs3CpuInstr4_vsqrtsd_XMM1_XMM2_XMM3_icebp_c64, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, 15229 { bs3CpuInstr4_vsqrtsd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, 15230 15231 { bs3CpuInstr4_vsqrtsd_XMM8_XMM9_XMM10_icebp_c64, X86_XCPT_AC, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, 15232 { bs3CpuInstr4_vsqrtsd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, 15233 15234 { bs3CpuInstr4_sqrtsd_XMM1_XMM1_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 1, PASS_s_aValuesSR }, 15235 { bs3CpuInstr4_vsqrtsd_XMM1_XMM1_XMM1_icebp_c64, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 1, 1, PASS_s_aValuesSR }, 15236 { bs3CpuInstr4_vsqrtsd_XMM1_XMM1_XMM2_icebp_c64, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, 15237 { bs3CpuInstr4_vsqrtsd_XMM1_XMM2_XMM2_icebp_c64, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 2, 2, PASS_s_aValuesSR }, 15238 { bs3CpuInstr4_vsqrtsd_XMM1_XMM1_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, 14807 15239 }; 14808 15240 #undef PASS_s_aValues … … 14870 15302 { "[v]sqrtpd", bs3CpuInstr4_v_sqrtpd, 0 }, 14871 15303 { "[v]sqrtss", bs3CpuInstr4_v_sqrtss, 0 }, 15304 { "[v]sqrtsd", bs3CpuInstr4_v_sqrtsd, 0 }, 14872 15305 #endif 14873 15306 };
Note:
See TracChangeset
for help on using the changeset viewer.