- Timestamp:
- Jun 6, 2024 9:03:25 AM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-4.c32
r104852 r104860 220 220 221 221 /** 222 * YMM packed single-precision floating-point register. 223 * @todo move to x86.h? 224 */ 225 typedef union X86YMMFLOATPSREG 226 { 227 /** Packed single-precision floating-point view. */ 228 RTFLOAT32U ar32[8]; 229 /** 256-bit integer view. */ 230 RTUINT256U ymm; 231 } X86YMMFLOATPSREG; 232 # ifndef VBOX_FOR_DTRACE_LIB 233 AssertCompileSize(X86YMMFLOATPSREG, 32); 234 AssertCompileSize(X86YMMFLOATPSREG, sizeof(X86YMMREG)); 235 # endif 236 /** Pointer to a YMM packed single-precision floating-point register. */ 237 typedef X86YMMFLOATPSREG BS3_FAR *PX86YMMFLOATPSREG; 238 /** Pointer to a const YMM single-precision packed floating-point register. */ 239 typedef X86YMMFLOATPSREG const BS3_FAR *PCX86YMMFLOATPSREG; 240 241 /** 222 242 * YMM packed double-precision floating-point register. 223 243 * @todo move to x86.h? … … 232 252 # ifndef VBOX_FOR_DTRACE_LIB 233 253 AssertCompileSize(X86YMMFLOATPDREG, 32); 254 AssertCompileSize(X86YMMFLOATPDREG, sizeof(X86YMMREG)); 234 255 # endif 235 256 /** Pointer to a YMM packed floating-point register. */ … … 237 258 /** Pointer to a const YMM packed floating-point register. */ 238 259 typedef X86YMMFLOATPDREG const BS3_FAR *PCX86YMMFLOATPDREG; 239 240 /**241 * YMM packed single-precision floating-point register.242 * @todo move to x86.h?243 */244 typedef union X86YMMFLOATPSREG245 {246 /** Packed single-precision floating-point view. */247 RTFLOAT32U ar32[8];248 /** 256-bit integer view. */249 RTUINT256U ymm;250 } X86YMMFLOATPSREG;251 # ifndef VBOX_FOR_DTRACE_LIB252 AssertCompileSize(X86YMMFLOATPSREG, 32);253 # endif254 /** Pointer to a YMM packed single-precision floating-point register. */255 typedef X86YMMFLOATPSREG BS3_FAR *PX86YMMFLOATPSREG;256 /** Pointer to a const YMM single-precision packed floating-point register. */257 typedef X86YMMFLOATPSREG const BS3_FAR *PCX86YMMFLOATPSREG;258 260 259 261 /** … … 270 272 # ifndef VBOX_FOR_DTRACE_LIB 271 273 AssertCompileSize(X86YMMFLOATSQREG, 32); 274 AssertCompileSize(X86YMMFLOATSQREG, sizeof(X86YMMREG)); 272 275 # endif 273 276 /** Pointer to a YMM scalar quadruple-precision floating-point register. */ … … 790 793 typedef struct BS3CPUINSTR4_TEST1_VALUES_T 791 794 { 792 X86YMMREG uSrc2; /**< Second source operand. */ 793 X86YMMREG uSrc1; /**< uDstIn for SSE */ 794 X86YMMREG uDstOut; /**< Destination output. */ 795 uint32_t fMxCsrMask; /**< MXCSR exception mask to use. */ 796 bool fDenormalsAreZero; /**< Whether DAZ (Denormals-Are-Zero) is used. */ 797 bool fFlushToZero; /**< Whether Flush-To-Zero (FZ) is used. */ 798 uint32_t fRoundingCtlMask; /**< Rounding control mask (X86_MXCSR_RC_MASK) to use. */ 799 uint32_t fExpectedMxCsrFlags; /**< Expected MXCSR exception flags. */ 795 X86YMMREG uSrc2; /**< Second source operand. */ 796 X86YMMREG uSrc1; /**< uDstIn for SSE */ 797 X86YMMREG uDstOut; /**< Destination output. */ 798 uint32_t fMxCsrMask; /**< MXCSR exception mask to use. */ 799 bool fDenormalsAreZero; /**< Whether DAZ (Denormals-Are-Zero) is used. */ 800 bool fFlushToZero; /**< Whether Flush-To-Zero (FZ) is used. */ 801 uint32_t fRoundingCtlMask; /**< Rounding control mask (X86_MXCSR_RC_MASK) to use. */ 802 uint32_t f128ExpectedMxCsrFlags; /**< Expected MXCSR exception flags for 128-bit instruction. */ 803 uint32_t f256ExpectedMxCsrFlags; /**< Expected MXCSR exception flags for 256-bit instructions. */ 804 uint32_t fPad; 800 805 } BS3CPUINSTR4_TEST1_VALUES_T; 801 806 … … 806 811 typedef struct BS3CPUINSTR4_TEST1_VALUES_PS_T 807 812 { 808 X86YMMFLOATPSREG uSrc2; /**< Second source operand. */ 809 X86YMMFLOATPSREG uSrc1; /**< uDstIn for SSE */ 810 X86YMMFLOATPSREG uDstOut; /**< Destination output. */ 811 uint32_t fMxCsrMask; /**< MXCSR exception mask to use. */ 812 bool fDenormalsAreZero; /**< Whether DAZ (Denormals-Are-Zero) is used. */ 813 bool fFlushToZero; /**< Whether Flush-To-Zero (FZ) is used. */ 814 uint32_t fRoundingCtlMask; /**< Rounding control mask (X86_MXCSR_RC_MASK) to use. */ 815 uint32_t fExpectedMxCsrFlags; /**< Expected MXCSR exception flags. */ 813 X86YMMFLOATPSREG uSrc2; /**< Second source operand. */ 814 X86YMMFLOATPSREG uSrc1; /**< uDstIn for SSE */ 815 X86YMMFLOATPSREG uDstOut; /**< Destination output. */ 816 uint32_t fMxCsrMask; /**< MXCSR exception mask to use. */ 817 bool fDenormalsAreZero; /**< Whether DAZ (Denormals-Are-Zero) is used. */ 818 bool fFlushToZero; /**< Whether Flush-To-Zero (FZ) is used. */ 819 uint32_t fRoundingCtlMask; /**< Rounding control mask (X86_MXCSR_RC_MASK) to use. */ 820 uint32_t f128ExpectedMxCsrFlags; /**< Expected MXCSR exception flags for 128-bit instruction. */ 821 uint32_t f256ExpectedMxCsrFlags; /**< Expected MXCSR exception flags for 256-bit instructions. */ 822 uint32_t fPad; 816 823 } BS3CPUINSTR4_TEST1_VALUES_PS_T; 817 824 AssertCompile(sizeof(BS3CPUINSTR4_TEST1_VALUES_PS_T) == sizeof(BS3CPUINSTR4_TEST1_VALUES_T)); 818 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, uSrc2, BS3CPUINSTR4_TEST1_VALUES_T, uSrc2); 819 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, uSrc1, BS3CPUINSTR4_TEST1_VALUES_T, uSrc1); 820 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, uDstOut, BS3CPUINSTR4_TEST1_VALUES_T, uDstOut); 821 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, fMxCsrMask, BS3CPUINSTR4_TEST1_VALUES_T, fMxCsrMask); 822 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, fDenormalsAreZero, BS3CPUINSTR4_TEST1_VALUES_T, fDenormalsAreZero); 823 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, fFlushToZero, BS3CPUINSTR4_TEST1_VALUES_T, fFlushToZero); 824 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, fRoundingCtlMask, BS3CPUINSTR4_TEST1_VALUES_T, fRoundingCtlMask); 825 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, fExpectedMxCsrFlags, BS3CPUINSTR4_TEST1_VALUES_T, fExpectedMxCsrFlags); 825 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, uSrc2, BS3CPUINSTR4_TEST1_VALUES_T, uSrc2); 826 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, uSrc1, BS3CPUINSTR4_TEST1_VALUES_T, uSrc1); 827 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, uDstOut, BS3CPUINSTR4_TEST1_VALUES_T, uDstOut); 828 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, fMxCsrMask, BS3CPUINSTR4_TEST1_VALUES_T, fMxCsrMask); 829 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, fDenormalsAreZero, BS3CPUINSTR4_TEST1_VALUES_T, fDenormalsAreZero); 830 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, fFlushToZero, BS3CPUINSTR4_TEST1_VALUES_T, fFlushToZero); 831 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, fRoundingCtlMask, BS3CPUINSTR4_TEST1_VALUES_T, fRoundingCtlMask); 832 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, f128ExpectedMxCsrFlags, BS3CPUINSTR4_TEST1_VALUES_T, f128ExpectedMxCsrFlags); 833 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, f256ExpectedMxCsrFlags, BS3CPUINSTR4_TEST1_VALUES_T, f256ExpectedMxCsrFlags); 826 834 827 835 /* … … 831 839 typedef struct BS3CPUINSTR4_TEST1_VALUES_PD_T 832 840 { 833 X86YMMFLOATPDREG uSrc2; /**< Second source operand. */ 834 X86YMMFLOATPDREG uSrc1; /**< uDstIn for SSE */ 835 X86YMMFLOATPDREG uDstOut; /**< Destination output. */ 836 uint32_t fMxCsrMask; /**< MXCSR exception mask to use. */ 837 bool fDenormalsAreZero; /**< Whether DAZ (Denormals-Are-Zero) is used. */ 838 bool fFlushToZero; /**< Whether Flush-To-Zero (FZ) is used. */ 839 uint32_t fRoundingCtlMask; /**< Rounding control mask (X86_MXCSR_RC_MASK) to use. */ 840 uint32_t fExpectedMxCsrFlags; /**< Expected MXCSR exception flags. */ 841 X86YMMFLOATPDREG uSrc2; /**< Second source operand. */ 842 X86YMMFLOATPDREG uSrc1; /**< uDstIn for SSE */ 843 X86YMMFLOATPDREG uDstOut; /**< Destination output. */ 844 uint32_t fMxCsrMask; /**< MXCSR exception mask to use. */ 845 bool fDenormalsAreZero; /**< Whether DAZ (Denormals-Are-Zero) is used. */ 846 bool fFlushToZero; /**< Whether Flush-To-Zero (FZ) is used. */ 847 uint32_t fRoundingCtlMask; /**< Rounding control mask (X86_MXCSR_RC_MASK) to use. */ 848 uint32_t f128ExpectedMxCsrFlags; /**< Expected MXCSR exception flags for 128-bit instruction. */ 849 uint32_t f256ExpectedMxCsrFlags; /**< Expected MXCSR exception flags for 256-bit instructions. */ 850 uint32_t fPad; 841 851 } BS3CPUINSTR4_TEST1_VALUES_PD_T; 842 852 AssertCompile(sizeof(BS3CPUINSTR4_TEST1_VALUES_PD_T) == sizeof(BS3CPUINSTR4_TEST1_VALUES_T)); 843 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, uSrc2, BS3CPUINSTR4_TEST1_VALUES_T, uSrc2); 844 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, uSrc1, BS3CPUINSTR4_TEST1_VALUES_T, uSrc1); 845 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, uDstOut, BS3CPUINSTR4_TEST1_VALUES_T, uDstOut); 846 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, fMxCsrMask, BS3CPUINSTR4_TEST1_VALUES_T, fMxCsrMask); 847 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, fDenormalsAreZero, BS3CPUINSTR4_TEST1_VALUES_T, fDenormalsAreZero); 848 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, fFlushToZero, BS3CPUINSTR4_TEST1_VALUES_T, fFlushToZero); 849 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, fRoundingCtlMask, BS3CPUINSTR4_TEST1_VALUES_T, fRoundingCtlMask); 850 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, fExpectedMxCsrFlags, BS3CPUINSTR4_TEST1_VALUES_T, fExpectedMxCsrFlags); 853 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, uSrc2, BS3CPUINSTR4_TEST1_VALUES_T, uSrc2); 854 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, uSrc1, BS3CPUINSTR4_TEST1_VALUES_T, uSrc1); 855 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, uDstOut, BS3CPUINSTR4_TEST1_VALUES_T, uDstOut); 856 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, fMxCsrMask, BS3CPUINSTR4_TEST1_VALUES_T, fMxCsrMask); 857 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, fDenormalsAreZero, BS3CPUINSTR4_TEST1_VALUES_T, fDenormalsAreZero); 858 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, fFlushToZero, BS3CPUINSTR4_TEST1_VALUES_T, fFlushToZero); 859 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, fRoundingCtlMask, BS3CPUINSTR4_TEST1_VALUES_T, fRoundingCtlMask); 860 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, f128ExpectedMxCsrFlags, BS3CPUINSTR4_TEST1_VALUES_T, f128ExpectedMxCsrFlags); 861 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, f256ExpectedMxCsrFlags, BS3CPUINSTR4_TEST1_VALUES_T, f256ExpectedMxCsrFlags); 851 862 852 863 /* … … 856 867 typedef struct BS3CPUINSTR4_TEST1_VALUES_SQ_T 857 868 { 858 X86YMMFLOATSQREG uSrc2; /**< Second source operand. */ 859 X86YMMFLOATSQREG uSrc1; /**< uDstIn for SSE */ 860 X86YMMFLOATSQREG uDstOut; /**< Destination output. */ 861 uint32_t fMxCsrMask; /**< MXCSR exception mask to use. */ 862 bool fDenormalsAreZero; /**< Whether DAZ (Denormals-Are-Zero) is used. */ 863 bool fFlushToZero; /**< Whether Flush-To-Zero (FZ) is used. */ 864 uint32_t fRoundingCtlMask; /**< Rounding control mask (X86_MXCSR_RC_MASK) to use. */ 865 uint32_t fExpectedMxCsrFlags; /**< Expected MXCSR exception flags. */ 869 X86YMMFLOATSQREG uSrc2; /**< Second source operand. */ 870 X86YMMFLOATSQREG uSrc1; /**< uDstIn for SSE */ 871 X86YMMFLOATSQREG uDstOut; /**< Destination output. */ 872 uint32_t fMxCsrMask; /**< MXCSR exception mask to use. */ 873 bool fDenormalsAreZero; /**< Whether DAZ (Denormals-Are-Zero) is used. */ 874 bool fFlushToZero; /**< Whether Flush-To-Zero (FZ) is used. */ 875 uint32_t fRoundingCtlMask; /**< Rounding control mask (X86_MXCSR_RC_MASK) to use. */ 876 uint32_t f128ExpectedMxCsrFlags; /**< Expected MXCSR exception flags for 128-bit instruction. */ 877 uint32_t f256ExpectedMxCsrFlags; /**< Expected MXCSR exception flags for 256-bit instructions. */ 878 uint32_t fPad; 866 879 } BS3CPUINSTR4_TEST1_VALUES_SQ_T; 867 880 AssertCompile(sizeof(BS3CPUINSTR4_TEST1_VALUES_SQ_T) == sizeof(BS3CPUINSTR4_TEST1_VALUES_T)); 868 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, uSrc2, BS3CPUINSTR4_TEST1_VALUES_T, uSrc2); 869 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, uSrc1, BS3CPUINSTR4_TEST1_VALUES_T, uSrc1); 870 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, uDstOut, BS3CPUINSTR4_TEST1_VALUES_T, uDstOut); 871 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, fMxCsrMask, BS3CPUINSTR4_TEST1_VALUES_T, fMxCsrMask); 872 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, fDenormalsAreZero, BS3CPUINSTR4_TEST1_VALUES_T, fDenormalsAreZero); 873 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, fFlushToZero, BS3CPUINSTR4_TEST1_VALUES_T, fFlushToZero); 874 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, fRoundingCtlMask, BS3CPUINSTR4_TEST1_VALUES_T, fRoundingCtlMask); 875 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, fExpectedMxCsrFlags, BS3CPUINSTR4_TEST1_VALUES_T, fExpectedMxCsrFlags); 881 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, uSrc2, BS3CPUINSTR4_TEST1_VALUES_T, uSrc2); 882 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, uSrc1, BS3CPUINSTR4_TEST1_VALUES_T, uSrc1); 883 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, uDstOut, BS3CPUINSTR4_TEST1_VALUES_T, uDstOut); 884 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, fMxCsrMask, BS3CPUINSTR4_TEST1_VALUES_T, fMxCsrMask); 885 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, fDenormalsAreZero, BS3CPUINSTR4_TEST1_VALUES_T, fDenormalsAreZero); 886 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, fFlushToZero, BS3CPUINSTR4_TEST1_VALUES_T, fFlushToZero); 887 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, fRoundingCtlMask, BS3CPUINSTR4_TEST1_VALUES_T, fRoundingCtlMask); 888 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, f128ExpectedMxCsrFlags, BS3CPUINSTR4_TEST1_VALUES_T, f128ExpectedMxCsrFlags); 889 AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, f256ExpectedMxCsrFlags, BS3CPUINSTR4_TEST1_VALUES_T, f256ExpectedMxCsrFlags); 876 890 877 891 typedef struct BS3CPUINSTR4_TEST1_T … … 930 944 BS3CPUINSTR4_TEST1_T const BS3_FAR *pTest = pTestCtx->pTest; 931 945 BS3CPUINSTR4_TEST1_VALUES_T const BS3_FAR *pValues = &pTestCtx->pTest->paValues[pTestCtx->iVal]; 932 PBS3TRAPFRAME pTrapFrame = pTestCtx->pTrapFrame; 933 PBS3REGCTX pCtx = pTestCtx->pCtx; 934 PBS3EXTCTX pExtCtx = pTestCtx->pExtCtx; 935 PBS3EXTCTX pExtCtxOut = pTestCtx->pExtCtxOut; 936 uint8_t BS3_FAR *puMemOp = pTestCtx->puMemOp; 937 uint8_t BS3_FAR *puMemOpAlias = pTestCtx->puMemOpAlias; 938 uint8_t cbMemOp = pTestCtx->cbMemOp; 939 uint8_t const cbOperand = pTestCtx->cbOperand; 940 uint8_t const cbInstr = ((uint8_t const BS3_FAR *)(uintptr_t)pTestCtx->pTest->pfnWorker)[-1]; 941 uint8_t bXcptExpect = pTestCtx->bXcptExpect; 942 uint8_t const bFpXcpt = pTestCtx->pConfig->fCr4OsXmmExcpt ? X86_XCPT_XF : X86_XCPT_UD; 943 bool const fFpFlagsExpect = RT_BOOL( (pValues->fExpectedMxCsrFlags 944 & (~pValues->fMxCsrMask >> X86_MXCSR_XCPT_MASK_SHIFT)) & X86_MXCSR_XCPT_FLAGS); 946 PBS3TRAPFRAME pTrapFrame = pTestCtx->pTrapFrame; 947 PBS3REGCTX pCtx = pTestCtx->pCtx; 948 PBS3EXTCTX pExtCtx = pTestCtx->pExtCtx; 949 PBS3EXTCTX pExtCtxOut = pTestCtx->pExtCtxOut; 950 uint8_t BS3_FAR *puMemOp = pTestCtx->puMemOp; 951 uint8_t BS3_FAR *puMemOpAlias = pTestCtx->puMemOpAlias; 952 uint8_t cbMemOp = pTestCtx->cbMemOp; 953 uint8_t const cbOperand = pTestCtx->cbOperand; 954 uint8_t const cbInstr = ((uint8_t const BS3_FAR *)(uintptr_t)pTestCtx->pTest->pfnWorker)[-1]; 955 uint8_t bXcptExpect = pTestCtx->bXcptExpect; 956 uint8_t const bFpXcpt = pTestCtx->pConfig->fCr4OsXmmExcpt ? X86_XCPT_XF : X86_XCPT_UD; 957 uint32_t const fExpectedMxCsrFlags = pTestCtx->cbOperand > 16 ? pValues->f256ExpectedMxCsrFlags 958 : pValues->f128ExpectedMxCsrFlags; 959 bool const fFpFlagsExpect = RT_BOOL( (fExpectedMxCsrFlags 960 & (~pValues->fMxCsrMask >> X86_MXCSR_XCPT_MASK_SHIFT)) & X86_MXCSR_XCPT_FLAGS); 945 961 uint32_t uMxCsr; 946 962 X86YMMREG MemOpExpect; … … 1043 1059 #endif 1044 1060 if (bXcptExpect == X86_XCPT_DB) 1045 Bs3ExtCtxSetMxCsr(pExtCtx, (uMxCsr & ~X86_MXCSR_XCPT_FLAGS)1046 | ( pValues->fExpectedMxCsrFlags & X86_MXCSR_XCPT_FLAGS));1061 Bs3ExtCtxSetMxCsr(pExtCtx, (uMxCsr & ~X86_MXCSR_XCPT_FLAGS) 1062 | (fExpectedMxCsrFlags & X86_MXCSR_XCPT_FLAGS)); 1047 1063 Bs3TestCheckExtCtx(pExtCtxOut, pExtCtx, 0 /*fFlags*/, pTestCtx->pszMode, pTestCtx->idTestStep); 1048 1064 … … 1052 1068 1053 1069 /* Check if the SIMD FP exception flags (or lack of) are as expected. */ 1054 if (fMxCsrXcptFlags != ( pValues->fExpectedMxCsrFlags & X86_MXCSR_XCPT_FLAGS))1070 if (fMxCsrXcptFlags != (fExpectedMxCsrFlags & X86_MXCSR_XCPT_FLAGS)) 1055 1071 { 1056 1072 char szGotBuf[BS3_FP_XCPT_NAMES_MAXLEN]; 1057 1073 char szExpectBuf[BS3_FP_XCPT_NAMES_MAXLEN]; 1058 bs3CpuInstr4GetXcptFlags(&szExpectBuf[0], sizeof(szExpectBuf), pValues->fExpectedMxCsrFlags);1074 bs3CpuInstr4GetXcptFlags(&szExpectBuf[0], sizeof(szExpectBuf), fExpectedMxCsrFlags); 1059 1075 bs3CpuInstr4GetXcptFlags(&szGotBuf[0], sizeof(szGotBuf), fMxCsrXcptFlags); 1060 1076 Bs3TestFailedF("Expected floating-point xcpt flags%s, got%s", szExpectBuf, szGotBuf); … … 1207 1223 uint16_t cErrors; 1208 1224 BS3CPUINSTR4_TEST1_CTX_T TestCtx; 1225 uint32_t const fExpectedMxCsrFlags = pTest->enmType >= T_128BITS 1226 ? pTest->paValues[iVal].f128ExpectedMxCsrFlags 1227 : pTest->paValues[iVal].f256ExpectedMxCsrFlags; 1228 1209 1229 if (BS3_SKIPIT(bRing, iCfg, iTest, iVal, 0)) 1210 1230 continue; … … 1218 1238 if ( !g_fMxCsrDazSupported 1219 1239 && pTest->paValues[iVal].fDenormalsAreZero 1220 && ( pTest->paValues[iVal].fExpectedMxCsrFlags & X86_MXCSR_DE))1240 && (fExpectedMxCsrFlags & X86_MXCSR_DE)) 1221 1241 continue; 1222 1242 … … 1246 1266 { 1247 1267 if (paConfigs[iCfg].fAligned) 1248 Bs3TestFailedF("%s: ring-%d/cfg#%u/test#%u/value#%u failed (bXcptExpect=%u %s )",1268 Bs3TestFailedF("%s: ring-%d/cfg#%u/test#%u/value#%u failed (bXcptExpect=%u %s, %s %u-bit)", 1249 1269 Bs3GetModeName(bMode), bRing, iCfg, iTest, iVal, 1250 bXcptExpect, bs3CpuInstr4XcptName(bXcptExpect) );1270 bXcptExpect, bs3CpuInstr4XcptName(bXcptExpect), fSseInstr ? "SSE" : "AVX", cbOperand * 8); 1251 1271 else 1252 Bs3TestFailedF("%s: ring-%d/cfg#%u/test#%u/value#%u failed (bXcptExpect=%u %s, puMemOp=%p, EFLAGS=%#RX32, CR0=%#RX32 )",1272 Bs3TestFailedF("%s: ring-%d/cfg#%u/test#%u/value#%u failed (bXcptExpect=%u %s, puMemOp=%p, EFLAGS=%#RX32, CR0=%#RX32, %s %u-bit)", 1253 1273 Bs3GetModeName(bMode), bRing, iCfg, iTest, iVal, 1254 1274 bXcptExpect, bs3CpuInstr4XcptName(bXcptExpect), puMemOp, 1255 TrapFrame.Ctx.rflags.u32, TrapFrame.Ctx.cr0 );1275 TrapFrame.Ctx.rflags.u32, TrapFrame.Ctx.cr0, fSseInstr ? "SSE" : "AVX", cbOperand * 8); 1256 1276 Bs3TestPrintf("\n"); 1257 1277 } … … 1288 1308 static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = 1289 1309 { 1310 /* 1311 * Zero. 1312 */ 1290 1313 /* 0*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1291 1314 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, … … 1293 1316 /*mask */ X86_MXCSR_XCPT_MASK, 1294 1317 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1295 /*flags */ 0 },1318 /*flags */ 0, 0 }, 1296 1319 /* 1*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1297 1320 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, … … 1299 1322 /*mask */ ~X86_MXCSR_XCPT_MASK, 1300 1323 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1301 /*flags */ 0 }, 1302 /* 2*/{ { /*src2 */ { BS3_FP32_INF(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0)} }, 1303 { /*src1 */ { BS3_FP32_INF(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0)} }, 1304 { /* => */ { BS3_FP32_INF(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0)} }, 1324 /*flags */ 0, 0 }, 1325 /* 2*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1326 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1327 { /* => */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1328 /*mask */ ~X86_MXCSR_XCPT_MASK, 1329 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_UP, 1330 /*flags */ 0, 0 }, 1331 /* 3*/{ { /*src2 */ { BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1) } }, 1332 { /*src1 */ { BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1) } }, 1333 { /* => */ { BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1) } }, 1334 /*mask */ ~X86_MXCSR_XCPT_MASK, 1335 /*daz,fz,rc*/ 1, 0, X86_MXCSR_RC_ZERO, 1336 /*flags */ 0, 0 }, 1337 /* 4*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(1) } }, 1338 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(1) } }, 1339 { /* => */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(1) } }, 1340 /*mask */ ~X86_MXCSR_XCPT_MASK, 1341 /*daz,fz,rc*/ 0, 1, X86_MXCSR_RC_ZERO, 1342 /*flags */ 0, 0 }, 1343 /* 5*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1) } }, 1344 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1) } }, 1345 { /* => */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(1) } }, 1346 /*mask */ X86_MXCSR_XCPT_MASK, 1347 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_DOWN, 1348 /*flags */ 0, 0 }, 1349 /* 1350 * Infinity. 1351 */ 1352 /* 6*/{ { /*src2 */ { BS3_FP32_INF(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1353 { /*src1 */ { BS3_FP32_INF(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1354 { /* => */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1305 1355 /*mask */ ~X86_MXCSR_IM, 1306 1356 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1307 /*flags */ X86_MXCSR_IE },1308 /* 3*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_INF(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0)} },1309 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_INF(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } },1310 { /* => */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_QNAN(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } },1357 /*flags */ X86_MXCSR_IE, X86_MXCSR_IE }, 1358 /* 7*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_INF(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1359 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_INF(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1360 { /* => */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_QNAN(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1311 1361 /*mask */ X86_MXCSR_XCPT_MASK, 1312 1362 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1313 /*flags */ X86_MXCSR_IE }, 1363 /*flags */ X86_MXCSR_IE, X86_MXCSR_IE }, 1364 /* 8*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_INF(0), BS3_FP32_ZERO(1), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0) } }, 1365 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_INF(1), BS3_FP32_ZERO(1), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0) } }, 1366 { /* => */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_QNAN(1), BS3_FP32_ZERO(1), BS3_FP32_ZERO(1), BS3_FP32_ZERO(0) } }, 1367 /*mask */ X86_MXCSR_XCPT_MASK, 1368 /*daz,fz,rc*/ 0, 1, X86_MXCSR_RC_NEAREST, 1369 /*flags */ 0, X86_MXCSR_IE }, 1370 /* 9*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_INF(0) } }, 1371 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_INF(1) } }, 1372 { /* => */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_QNAN(0) } }, 1373 /*mask */ ~X86_MXCSR_XCPT_MASK, 1374 /*daz,fz,rc*/ 0, 1, X86_MXCSR_RC_NEAREST, 1375 /*flags */ 0, X86_MXCSR_IE }, 1376 /*10*/{ { /*src2 */ { BS3_FP32_INF(0), BS3_FP32_INF(1), BS3_FP32_ZERO(0), BS3_FP32_INF(1), BS3_FP32_ZERO(1), BS3_FP32_INF(1), BS3_FP32_INF(1), BS3_FP32_INF(0) } }, 1377 { /*src1 */ { BS3_FP32_INF(1), BS3_FP32_INF(0), BS3_FP32_ZERO(1), BS3_FP32_INF(0), BS3_FP32_ZERO(0), BS3_FP32_INF(0), BS3_FP32_INF(0), BS3_FP32_INF(1) } }, 1378 { /* => */ { BS3_FP32_INF(1), BS3_FP32_QNAN(1), BS3_FP32_ZERO(0), BS3_FP32_QNAN(1), BS3_FP32_ZERO(1), BS3_FP32_QNAN(1), BS3_FP32_QNAN(1), BS3_FP32_INF(1) } }, 1379 /*mask */ ~X86_MXCSR_XCPT_MASK, 1380 /*daz,fz,rc*/ 0, 1, X86_MXCSR_RC_ZERO, 1381 /*flags */ X86_MXCSR_IE, X86_MXCSR_IE }, 1314 1382 }; 1315 1383 … … 1369 1437 { 1370 1438 /* 1371 * Zero .1439 * Zero (Positive and Negative). 1372 1440 */ 1373 1441 /* 0*/{ { /*src2 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1376 1444 /*mask */ X86_MXCSR_XCPT_MASK, 1377 1445 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1378 /*flags */ 0 },1446 /*flags */ 0, 0 }, 1379 1447 /* 1*/{ { /*src2 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1380 1448 { /*src1 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1382 1450 /*mask */ ~X86_MXCSR_XCPT_MASK, 1383 1451 /*daz,fz,rc*/ 0, 1, X86_MXCSR_RC_NEAREST, 1384 /*flags */ 0 },1385 /* 2*/{ { /*src2 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO( 0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } },1386 { /*src1 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO( 0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } },1387 { /* => */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO( 0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } },1452 /*flags */ 0, 0 }, 1453 /* 2*/{ { /*src2 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(1), BS3_FP64_ZERO(1), BS3_FP64_ZERO(0) } }, 1454 { /*src1 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(1), BS3_FP64_ZERO(1), BS3_FP64_ZERO(0) } }, 1455 { /* => */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(1), BS3_FP64_ZERO(1), BS3_FP64_ZERO(0) } }, 1388 1456 /*mask */ X86_MXCSR_XCPT_MASK, 1389 1457 /*daz,fz,rc*/ 1, 0, X86_MXCSR_RC_DOWN, 1390 /*flags */ 0 },1391 /* 3*/{ { /*src2 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO( 0), BS3_FP64_ZERO(0) } },1392 { /*src1 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO( 0), BS3_FP64_ZERO(0) } },1393 { /* => */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO( 0), BS3_FP64_ZERO(0) } },1458 /*flags */ 0, 0 }, 1459 /* 3*/{ { /*src2 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(1), BS3_FP64_ZERO(1) } }, 1460 { /*src1 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(1), BS3_FP64_ZERO(1) } }, 1461 { /* => */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(1), BS3_FP64_ZERO(1) } }, 1394 1462 /*mask */ ~X86_MXCSR_XCPT_MASK, 1395 1463 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_UP, 1396 /*flags */ 0 },1397 /* 4*/{ { /*src2 */ { BS3_FP64_ZERO( 0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } },1398 { /*src1 */ { BS3_FP64_ZERO( 0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } },1399 { /* => */ { BS3_FP64_ZERO( 0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } },1464 /*flags */ 0, 0 }, 1465 /* 4*/{ { /*src2 */ { BS3_FP64_ZERO(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(1), BS3_FP64_ZERO(0) } }, 1466 { /*src1 */ { BS3_FP64_ZERO(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(1), BS3_FP64_ZERO(0) } }, 1467 { /* => */ { BS3_FP64_ZERO(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(1), BS3_FP64_ZERO(0) } }, 1400 1468 /*mask */ X86_MXCSR_XCPT_MASK, 1401 1469 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_ZERO, 1402 /*flags */ 0 },1470 /*flags */ 0, 0 }, 1403 1471 /* 1404 1472 * Infinity. … … 1409 1477 /*mask */ ~X86_MXCSR_IM, 1410 1478 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1411 /*flags */ X86_MXCSR_IE },1479 /*flags */ X86_MXCSR_IE, X86_MXCSR_IE }, 1412 1480 /* 6*/{ { /*src2 */ { BS3_FP64_ZERO(0), BS3_FP64_INF(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1413 1481 { /*src1 */ { BS3_FP64_ZERO(0), BS3_FP64_INF(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1415 1483 /*mask */ ~X86_MXCSR_IM, 1416 1484 /*daz,fz,rc*/ 0, 1, X86_MXCSR_RC_DOWN, 1417 /*flags */ X86_MXCSR_IE },1485 /*flags */ X86_MXCSR_IE, X86_MXCSR_IE }, 1418 1486 /* 7*/{ { /*src2 */ { BS3_FP64_ZERO(0), BS3_FP64_INF(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1419 1487 { /*src1 */ { BS3_FP64_ZERO(0), BS3_FP64_INF(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1421 1489 /*mask */ ~X86_MXCSR_IM, 1422 1490 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_UP, 1423 /*flags */ X86_MXCSR_IE },1491 /*flags */ X86_MXCSR_IE, X86_MXCSR_IE }, 1424 1492 /* 8*/{ { /*src2 */ { BS3_FP64_INF(0), BS3_FP64_INF(1), BS3_FP64_ZERO(0), BS3_FP64_INF(1) } }, 1425 1493 { /*src1 */ { BS3_FP64_INF(1), BS3_FP64_INF(0), BS3_FP64_ZERO(0), BS3_FP64_INF(0) } }, … … 1427 1495 /*mask */ X86_MXCSR_XCPT_MASK, 1428 1496 /*daz,fz,rc*/ 1, 0, X86_MXCSR_RC_ZERO, 1429 /*flags */ X86_MXCSR_IE },1497 /*flags */ X86_MXCSR_IE, X86_MXCSR_IE }, 1430 1498 /* 1431 1499 * Overflow, Precision. … … 1436 1504 /*mask */ ~X86_MXCSR_XCPT_MASK, 1437 1505 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1438 /*flags */ X86_MXCSR_OE },1506 /*flags */ X86_MXCSR_OE, X86_MXCSR_OE }, 1439 1507 /*10*/{ { /*src2 */ { BS3_FP64_NORMAL_MAX(0), BS3_FP64_NORMAL_MAX(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1440 1508 { /*src1 */ { BS3_FP64_NORMAL_MAX(0), BS3_FP64_NORMAL_MAX(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1442 1510 /*mask */ ~X86_MXCSR_XCPT_MASK, 1443 1511 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1444 /*flags */ X86_MXCSR_OE },1512 /*flags */ X86_MXCSR_OE, X86_MXCSR_OE }, 1445 1513 /*11*/{ { /*src2 */ { BS3_FP64_NORMAL_MAX(0), BS3_FP64_NORMAL_MIN(1), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_MAX(0) } }, 1446 1514 { /*src1 */ { BS3_FP64_NORMAL_MAX(0), BS3_FP64_NORMAL_MIN(1), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_MAX(0) } }, … … 1448 1516 /*mask */ X86_MXCSR_OM | X86_MXCSR_PM, 1449 1517 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_NEAREST, 1450 /*flags */ X86_MXCSR_OE | X86_MXCSR_PE },1518 /*flags */ X86_MXCSR_OE | X86_MXCSR_PE, X86_MXCSR_OE | X86_MXCSR_PE }, 1451 1519 /*12*/{ { /*src2 */ { BS3_FP64_NORMAL_MIN(1), BS3_FP64_NORMAL_MAX(0), BS3_FP64_NORMAL_MAX(0), BS3_FP64_ZERO(0) } }, 1452 1520 { /*src1 */ { BS3_FP64_NORMAL_MIN(1), BS3_FP64_NORMAL_MAX(0), BS3_FP64_NORMAL_MAX(1), BS3_FP64_ZERO(0) } }, … … 1454 1522 /*mask */ X86_MXCSR_OM | X86_MXCSR_PM, 1455 1523 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_ZERO, 1456 /*flags */ X86_MXCSR_OE | X86_MXCSR_PE },1524 /*flags */ X86_MXCSR_OE | X86_MXCSR_PE, X86_MXCSR_OE | X86_MXCSR_PE }, 1457 1525 /*13*/{ { /*src2 */ { BS3_FP64_NORMAL_MAX(0), BS3_FP64_NORMAL_MAX(1), BS3_FP64_NORMAL_MAX(1), BS3_FP64_NORMAL_MAX(0) } }, 1458 1526 { /*src1 */ { BS3_FP64_NORMAL_MAX(0), BS3_FP64_NORMAL_MAX(1), BS3_FP64_NORMAL_MAX(1), BS3_FP64_NORMAL_MAX(0) } }, … … 1460 1528 /*mask */ X86_MXCSR_XCPT_MASK, 1461 1529 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_ZERO, 1462 /*flags */ X86_MXCSR_OE | X86_MXCSR_PE },1530 /*flags */ X86_MXCSR_OE | X86_MXCSR_PE, X86_MXCSR_OE | X86_MXCSR_PE }, 1463 1531 /*14*/{ { /*src2 */ { BS3_FP64_NORMAL_SAFE_INT_MIN(0), BS3_FP64_NORMAL_MAX(0), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MAX(1) } }, 1464 1532 { /*src1 */ { BS3_FP64_NORMAL_SAFE_INT_MAX(0), BS3_FP64_NORMAL_MAX(1), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MAX(1) } }, … … 1466 1534 /*mask */ ~X86_MXCSR_XCPT_MASK, 1467 1535 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_ZERO, 1468 /*flags */ X86_MXCSR_PE },1536 /*flags */ X86_MXCSR_PE, X86_MXCSR_PE }, 1469 1537 /*15*/{ { /*src2 */ { BS3_FP64_VAL(0, 0xc000000000000, 0x3ff)/* 1.75*/, BS3_FP64_NORMAL_MAX(0), BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0, 0x3fd)/*0.25*/ } }, 1470 1538 { /*src1 */ { BS3_FP64_VAL(1, 0, 0x07d)/*-0.25*/, BS3_FP64_NORMAL_MAX(1), BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0, 0x3fe)/*0.50*/ } }, … … 1472 1540 /*mask */ X86_MXCSR_XCPT_MASK, 1473 1541 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_DOWN, 1474 /*flags */ X86_MXCSR_PE },1542 /*flags */ X86_MXCSR_PE, X86_MXCSR_PE }, 1475 1543 /* 1476 1544 * Normals. … … 1481 1549 /*mask */ ~X86_MXCSR_XCPT_MASK, 1482 1550 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1483 /*flags */ 0 },1551 /*flags */ 0, 0 }, 1484 1552 /*17*/{ { /*src2 */ { BS3_FP64_VAL(0, 0, 0x409)/*1024*/, BS3_FP64_VAL(0, 0xb800000000000, 0x404)/*55*/, BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1485 1553 { /*src1 */ { BS3_FP64_VAL(0, 0, 0x408)/* 512*/, BS3_FP64_VAL(0, 0xc000000000000, 0x401)/* 7*/, BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1487 1555 /*mask */ X86_MXCSR_XCPT_MASK, 1488 1556 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1489 /*flags */ 0 },1557 /*flags */ 0, 0 }, 1490 1558 /*18*/{ { /*src2 */ { BS3_FP64_VAL(0, 0x26580b4800000, 0x41d)/* 1234567890*/, BS3_FP64_VAL(0, 0xd6f3458800000, 0x41c)/*987654321*/, BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } }, 1491 1559 { /*src1 */ { BS3_FP64_VAL(1, 0x26580b4800000, 0x41d)/*-1234567890*/, BS3_FP64_VAL(1, 0x9000000000000, 0x405)/* -100*/, BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0xd6eca42000000, 0x419)/* 123450000.5*/ } }, … … 1493 1561 /*mask */ ~X86_MXCSR_XCPT_MASK, 1494 1562 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1495 /*flags */ 0 },1563 /*flags */ 0, 0 }, 1496 1564 /*19*/{ { /*src2 */ { BS3_FP64_VAL(0, BS3_FP64_FRACTION_NORMAL_MAX - 1, BS3_FP64_EXP_BIAS + BS3_FP64_FRACTION_BITS), BS3_FP64_NORMAL_SAFE_INT_MAX(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1497 1565 { /*src1 */ { BS3_FP64_ONE(0), BS3_FP64_ONE(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1499 1567 /*mask */ X86_MXCSR_XCPT_MASK, 1500 1568 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_ZERO, 1501 /*flags */ 0 },1569 /*flags */ 0, 0 }, 1502 1570 /*20*/{ { /*src2 */ { BS3_FP64_NORMAL_SAFE_INT_MAX(0), BS3_FP64_ONE(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1503 1571 { /*src1 */ { BS3_FP64_ONE(0), BS3_FP64_NORMAL_SAFE_INT_MAX(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1505 1573 /*mask */ ~X86_MXCSR_XCPT_MASK, 1506 1574 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1507 /*flags */ 0 },1575 /*flags */ 0, 0 }, 1508 1576 /*21*/{ { /*src2 */ { BS3_FP64_NORMAL_SAFE_INT_MIN(0), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MIN(0), BS3_FP64_NORMAL_SAFE_INT_MIN(0) } }, 1509 1577 { /*src1 */ { BS3_FP64_NORMAL_SAFE_INT_MIN(1), BS3_FP64_NORMAL_SAFE_INT_MIN(1), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MIN(0) } }, … … 1511 1579 /*mask */ ~X86_MXCSR_XCPT_MASK, 1512 1580 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_ZERO, 1513 /*flags */ 0 },1581 /*flags */ 0, 0 }, 1514 1582 /*22*/{ { /*src2 */ { BS3_FP64_VAL(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MIN(1) } }, 1515 1583 { /*src1 */ { BS3_FP64_VAL(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MIN(1) } }, … … 1517 1585 /*mask */ X86_MXCSR_XCPT_MASK, 1518 1586 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_DOWN, 1519 /*flags */ 0 },1587 /*flags */ 0, 0 }, 1520 1588 /* 1521 1589 * Denormals. … … 1526 1594 /*mask */ ~X86_MXCSR_XCPT_MASK, 1527 1595 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1528 /*flags */ X86_MXCSR_DE },1596 /*flags */ X86_MXCSR_DE, X86_MXCSR_DE }, 1529 1597 /*24*/{ { /*src2 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1530 1598 { /*src1 */ { BS3_FP64_ZERO(0), BS3_FP64_DENORMAL_MAX(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1532 1600 /*mask */ X86_MXCSR_XCPT_MASK, 1533 1601 /*daz,fz,rc*/ 1, 0, X86_MXCSR_RC_NEAREST, 1534 /*flags */ 0 },1602 /*flags */ 0, 0 }, 1535 1603 /*25*/{ { /*src2 */ { BS3_FP64_DENORMAL_MIN(0), BS3_FP64_DENORMAL_MIN(0), BS3_FP64_DENORMAL_MAX(0), BS3_FP64_DENORMAL_MAX(0) } }, 1536 1604 { /*src1 */ { BS3_FP64_DENORMAL_MAX(0), BS3_FP64_DENORMAL_MIN(0), BS3_FP64_DENORMAL_MAX(0), BS3_FP64_DENORMAL_MIN(0) } }, 1537 { /* => */ { BS3_FP64_ZERO(0), BS3_FP64_ DENORMAL_MIN(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0)} },1605 { /* => */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1538 1606 /*mask */ X86_MXCSR_XCPT_MASK, 1539 1607 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_UP, 1540 /*flags */ 0 }, 1608 /*flags */ 0, 0 }, 1609 /** @todo More denormals; Underflow, Precision; Rounding, FZ etc. */ 1541 1610 }; 1542 1611
Note:
See TracChangeset
for help on using the changeset viewer.