Changeset 104174 in vbox
- Timestamp:
- Apr 5, 2024 10:21:30 AM (10 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r104157 r104174 6329 6329 6330 6330 ;; 6331 ; Initialize the SSE MXCSR register using the guest value partially to6332 ; account for rounding mode.6333 ;6334 ; @uses 4 bytes of stack to save the original value, T0.6335 ; @param 1 Expression giving the address of the MXCSR register of the guest.6336 ;6337 %macro SSE_LD_FXSTATE_MXCSR_ONLY 16338 sub xSP, 46339 6340 stmxcsr [xSP]6341 mov T0_32, [%1]6342 and T0_32, X86_MXCSR_FZ | X86_MXCSR_RC_MASK | X86_MXCSR_DAZ6343 or T0_32, X86_MXCSR_XCPT_MASK6344 sub xSP, 46345 mov [xSP], T0_326346 ldmxcsr [xSP]6347 add xSP, 46348 %endmacro6349 6350 6351 ;;6352 ; Restores the SSE MXCSR register with the original value.6353 ;6354 ; @uses 4 bytes of stack to save the content of MXCSR value, T0, T1.6355 ; @param 1 Expression giving the address where to return the MXCSR value - only the MXCSR is stored, no IEMSSERESULT is used.6356 ;6357 ; @note Restores the stack pointer.6358 ;6359 %macro SSE_ST_FXSTATE_MXCSR_ONLY_NO_FXSTATE 16360 sub xSP, 46361 stmxcsr [xSP]6362 mov T0_32, [xSP]6363 add xSP, 46364 ; Merge the status bits into the original MXCSR value.6365 mov T1_32, [%1]6366 and T0_32, X86_MXCSR_XCPT_FLAGS6367 or T0_32, T1_326368 mov [%1], T0_326369 6370 ldmxcsr [xSP]6371 add xSP, 46372 %endmacro6373 6374 6375 ;;6376 6331 ; Need to move this as well somewhere better? 6377 6332 ; … … 6542 6497 ; @param 1 The instruction name. 6543 6498 ; 6544 ; @param A0 Pointer to the MXCSR value (input/output). 6499 ; @return R0_32 The new MXCSR value of the guest. 6500 ; @param A0_32 The guest's MXCSR register value to use (input). 6545 6501 ; @param A1 Pointer to the first MMX register sized operand (output). 6546 6502 ; @param A2 Pointer to the media register sized operand (input). … … 6550 6506 PROLOGUE_3_ARGS 6551 6507 IEMIMPL_SSE_PROLOGUE 6552 SSE_ LD_FXSTATE_MXCSR_ONLY A06508 SSE_AVX_LD_MXCSR A0_32 6553 6509 6554 6510 movdqu xmm0, [A2] … … 6556 6512 movq [A1], mm0 6557 6513 6558 SSE_ ST_FXSTATE_MXCSR_ONLY_NO_FXSTATE A06514 SSE_AVX_ST_MXCSR R0_32, A0_32 6559 6515 IEMIMPL_SSE_EPILOGUE 6560 6516 EPILOGUE_3_ARGS … … 6572 6528 ; @param 1 The instruction name. 6573 6529 ; 6574 ; @param A0 Pointer to the MXCSR value (input/output). 6530 ; @return R0_32 The new MXCSR value of the guest. 6531 ; @param A0_32 The guest's MXCSR register value to use (input). 6575 6532 ; @param A1 Pointer to the first media register sized operand (input/output). 6576 6533 ; @param A2 The 64bit source value from a MMX media register (input) … … 6580 6537 PROLOGUE_3_ARGS 6581 6538 IEMIMPL_SSE_PROLOGUE 6582 SSE_ LD_FXSTATE_MXCSR_ONLY A06539 SSE_AVX_LD_MXCSR A0_32 6583 6540 6584 6541 movdqu xmm0, [A1] … … 6587 6544 movdqu [A1], xmm0 6588 6545 6589 SSE_ ST_FXSTATE_MXCSR_ONLY_NO_FXSTATE A06546 SSE_AVX_ST_MXCSR R0_32, A0_32 6590 6547 IEMIMPL_SSE_EPILOGUE 6591 6548 EPILOGUE_3_ARGS … … 6603 6560 ; @param 1 The instruction name. 6604 6561 ; 6605 ; @param A0 Pointer to the MXCSR value (input/output). 6562 ; @return R0_32 The new MXCSR value of the guest. 6563 ; @param A0_32 The guest's MXCSR register value to use (input). 6606 6564 ; @param A1 Pointer to the first MMX media register sized operand (output). 6607 6565 ; @param A2 The 64bit source value (input). … … 6611 6569 PROLOGUE_3_ARGS 6612 6570 IEMIMPL_SSE_PROLOGUE 6613 SSE_ LD_FXSTATE_MXCSR_ONLY A06571 SSE_AVX_LD_MXCSR A0_32 6614 6572 6615 6573 movq xmm0, A2 … … 6617 6575 movq [A1], mm0 6618 6576 6619 SSE_ ST_FXSTATE_MXCSR_ONLY_NO_FXSTATE A06577 SSE_AVX_ST_MXCSR R0_32, A0_32 6620 6578 IEMIMPL_SSE_EPILOGUE 6621 6579 EPILOGUE_3_ARGS -
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r104173 r104174 18665 18665 18666 18666 18667 IEM_DECL_IMPL_DEF( void, iemAImpl_cvtpd2pi_u128,(uint32_t *pfMxcsr, uint64_t *pu64Dst, PCX86XMMREG pSrc))18667 IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_cvtpd2pi_u128,(uint32_t fMxCsrIn, uint64_t *pu64Dst, PCX86XMMREG pSrc)) 18668 18668 { 18669 18669 RTUINT64U u64Res; 18670 uint32_t fMxcsrOut = iemAImpl_cvtpd2pi_u128_worker( *pfMxcsr, &u64Res.ai32[0], &pSrc->ar64[0]);18671 fMxcsrOut |= iemAImpl_cvtpd2pi_u128_worker( *pfMxcsr, &u64Res.ai32[1], &pSrc->ar64[1]);18670 uint32_t fMxcsrOut = iemAImpl_cvtpd2pi_u128_worker(fMxCsrIn, &u64Res.ai32[0], &pSrc->ar64[0]); 18671 fMxcsrOut |= iemAImpl_cvtpd2pi_u128_worker(fMxCsrIn, &u64Res.ai32[1], &pSrc->ar64[1]); 18672 18672 18673 18673 *pu64Dst = u64Res.u; 18674 *pfMxcsr =fMxcsrOut;18674 return fMxcsrOut; 18675 18675 } 18676 18676 #endif … … 18692 18692 18693 18693 18694 IEM_DECL_IMPL_DEF( void, iemAImpl_cvttpd2pi_u128,(uint32_t *pfMxcsr, uint64_t *pu64Dst, PCX86XMMREG pSrc))18694 IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_cvttpd2pi_u128,(uint32_t fMxCsrIn, uint64_t *pu64Dst, PCX86XMMREG pSrc)) 18695 18695 { 18696 18696 RTUINT64U u64Res; 18697 uint32_t fMxcsrOut = iemAImpl_cvttpd2pi_u128_worker( *pfMxcsr, &u64Res.ai32[0], &pSrc->ar64[0]);18698 fMxcsrOut |= iemAImpl_cvttpd2pi_u128_worker( *pfMxcsr, &u64Res.ai32[1], &pSrc->ar64[1]);18697 uint32_t fMxcsrOut = iemAImpl_cvttpd2pi_u128_worker(fMxCsrIn, &u64Res.ai32[0], &pSrc->ar64[0]); 18698 fMxcsrOut |= iemAImpl_cvttpd2pi_u128_worker(fMxCsrIn, &u64Res.ai32[1], &pSrc->ar64[1]); 18699 18699 18700 18700 *pu64Dst = u64Res.u; 18701 *pfMxcsr =fMxcsrOut;18701 return fMxcsrOut; 18702 18702 } 18703 18703 #endif … … 18716 18716 18717 18717 18718 IEM_DECL_IMPL_DEF( void, iemAImpl_cvtpi2ps_u128,(uint32_t *pfMxcsr, PX86XMMREG pDst, uint64_t u64Src))18718 IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_cvtpi2ps_u128,(uint32_t fMxCsrIn, PX86XMMREG pDst, uint64_t u64Src)) 18719 18719 { 18720 18720 RTUINT64U uSrc = { u64Src }; 18721 uint32_t fMxcsrOut = iemAImpl_cvtpi2ps_u128_worker( *pfMxcsr, &pDst->ar32[0], uSrc.ai32[0]);18722 fMxcsrOut |= iemAImpl_cvtpi2ps_u128_worker( *pfMxcsr, &pDst->ar32[1], uSrc.ai32[1]);18723 *pfMxcsr =fMxcsrOut;18721 uint32_t fMxcsrOut = iemAImpl_cvtpi2ps_u128_worker(fMxCsrIn, &pDst->ar32[0], uSrc.ai32[0]); 18722 fMxcsrOut |= iemAImpl_cvtpi2ps_u128_worker(fMxCsrIn, &pDst->ar32[1], uSrc.ai32[1]); 18723 return fMxcsrOut; 18724 18724 } 18725 18725 #endif … … 18738 18738 18739 18739 18740 IEM_DECL_IMPL_DEF( void, iemAImpl_cvtpi2pd_u128,(uint32_t *pfMxcsr, PX86XMMREG pDst, uint64_t u64Src))18740 IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_cvtpi2pd_u128,(uint32_t fMxCsrIn, PX86XMMREG pDst, uint64_t u64Src)) 18741 18741 { 18742 18742 RTUINT64U uSrc = { u64Src }; 18743 uint32_t fMxcsrOut = iemAImpl_cvtpi2pd_u128_worker( *pfMxcsr, &pDst->ar64[0], uSrc.ai32[0]);18744 fMxcsrOut |= iemAImpl_cvtpi2pd_u128_worker( *pfMxcsr, &pDst->ar64[1], uSrc.ai32[1]);18745 *pfMxcsr =fMxcsrOut;18743 uint32_t fMxcsrOut = iemAImpl_cvtpi2pd_u128_worker(fMxCsrIn, &pDst->ar64[0], uSrc.ai32[0]); 18744 fMxcsrOut |= iemAImpl_cvtpi2pd_u128_worker(fMxCsrIn, &pDst->ar64[1], uSrc.ai32[1]); 18745 return fMxcsrOut; 18746 18746 } 18747 18747 #endif … … 18763 18763 18764 18764 18765 IEM_DECL_IMPL_DEF( void, iemAImpl_cvtps2pi_u128,(uint32_t *pfMxcsr, uint64_t *pu64Dst, uint64_t u64Src))18765 IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_cvtps2pi_u128,(uint32_t fMxCsrIn, uint64_t *pu64Dst, uint64_t u64Src)) 18766 18766 { 18767 18767 RTUINT64U uDst; 18768 18768 RTUINT64U uSrc = { u64Src }; 18769 uint32_t fMxcsrOut = iemAImpl_cvtps2pi_u128_worker( *pfMxcsr, &uDst.ai32[0], (PCRTFLOAT32U)&uSrc.au32[0]);18770 fMxcsrOut |= iemAImpl_cvtps2pi_u128_worker( *pfMxcsr, &uDst.ai32[1], (PCRTFLOAT32U)&uSrc.au32[1]);18769 uint32_t fMxcsrOut = iemAImpl_cvtps2pi_u128_worker(fMxCsrIn, &uDst.ai32[0], (PCRTFLOAT32U)&uSrc.au32[0]); 18770 fMxcsrOut |= iemAImpl_cvtps2pi_u128_worker(fMxCsrIn, &uDst.ai32[1], (PCRTFLOAT32U)&uSrc.au32[1]); 18771 18771 *pu64Dst = uDst.u; 18772 *pfMxcsr =fMxcsrOut;18772 return fMxcsrOut; 18773 18773 } 18774 18774 #endif … … 18790 18790 18791 18791 18792 IEM_DECL_IMPL_DEF( void, iemAImpl_cvttps2pi_u128,(uint32_t *pfMxcsr, uint64_t *pu64Dst, uint64_t u64Src))18792 IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_cvttps2pi_u128,(uint32_t fMxCsrIn, uint64_t *pu64Dst, uint64_t u64Src)) 18793 18793 { 18794 18794 RTUINT64U uDst; 18795 18795 RTUINT64U uSrc = { u64Src }; 18796 uint32_t fMxcsrOut = iemAImpl_cvttps2pi_u128_worker( *pfMxcsr, &uDst.ai32[0], (PCRTFLOAT32U)&uSrc.au32[0]);18797 fMxcsrOut |= iemAImpl_cvttps2pi_u128_worker( *pfMxcsr, &uDst.ai32[1], (PCRTFLOAT32U)&uSrc.au32[1]);18796 uint32_t fMxcsrOut = iemAImpl_cvttps2pi_u128_worker(fMxCsrIn, &uDst.ai32[0], (PCRTFLOAT32U)&uSrc.au32[0]); 18797 fMxcsrOut |= iemAImpl_cvttps2pi_u128_worker(fMxCsrIn, &uDst.ai32[1], (PCRTFLOAT32U)&uSrc.au32[1]); 18798 18798 *pu64Dst = uDst.u; 18799 *pfMxcsr =fMxcsrOut;18799 return fMxcsrOut; 18800 18800 } 18801 18801 #endif -
trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py
r104155 r104174 3279 3279 'IEM_MC_REF_MREG_U64': (McBlock.parseMcGeneric, False, False, False, ), 3280 3280 'IEM_MC_REF_MREG_U64_CONST': (McBlock.parseMcGeneric, False, False, False, ), 3281 'IEM_MC_REF_MXCSR': (McBlock.parseMcGeneric, False, False, True, ),3282 3281 'IEM_MC_REF_XREG_R32_CONST': (McBlock.parseMcGeneric, False, False, g_fNativeSimd), 3283 3282 'IEM_MC_REF_XREG_R64_CONST': (McBlock.parseMcGeneric, False, False, g_fNativeSimd), -
trunk/src/VBox/VMM/VMMAll/IEMAllInstTwoByte0f.cpp.h
r104156 r104174 3475 3475 IEM_MC_BEGIN(0, 0); 3476 3476 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX_EX(fSse2); 3477 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);3478 3477 IEM_MC_LOCAL(X86XMMREG, Dst); 3479 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, pDst, Dst, 1);3480 IEM_MC_ARG(uint64_t, u64Src, 2);3478 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, pDst, Dst, 0); 3479 IEM_MC_ARG(uint64_t, u64Src, 1); 3481 3480 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3482 3481 IEM_MC_MAYBE_RAISE_FPU_XCPT(); … … 3484 3483 IEM_MC_FPU_TO_MMX_MODE(); 3485 3484 3486 IEM_MC_REF_MXCSR(pfMxcsr);3487 3485 IEM_MC_FETCH_XREG_XMM(Dst, IEM_GET_MODRM_REG(pVCpu, bRm)); /* Need it because the high quadword remains unchanged. */ 3488 3486 IEM_MC_FETCH_MREG_U64(u64Src, IEM_GET_MODRM_RM_8(bRm)); 3489 3487 3490 IEM_MC_CALL_ VOID_AIMPL_3(iemAImpl_cvtpi2ps_u128, pfMxcsr, pDst, u64Src);3488 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvtpi2ps_u128, pDst, u64Src); 3491 3489 IEM_MC_IF_MXCSR_XCPT_PENDING() { 3492 3490 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); … … 3504 3502 */ 3505 3503 IEM_MC_BEGIN(0, 0); 3506 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);3507 3504 IEM_MC_LOCAL(X86XMMREG, Dst); 3508 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, pDst, Dst, 1);3509 IEM_MC_ARG(uint64_t, u64Src, 2);3505 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, pDst, Dst, 0); 3506 IEM_MC_ARG(uint64_t, u64Src, 1); 3510 3507 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 3511 3508 … … 3518 3515 IEM_MC_PREPARE_FPU_USAGE(); 3519 3516 IEM_MC_FPU_TO_MMX_MODE(); 3520 IEM_MC_REF_MXCSR(pfMxcsr); 3521 3522 IEM_MC_CALL_VOID_AIMPL_3(iemAImpl_cvtpi2ps_u128, pfMxcsr, pDst, u64Src); 3517 3518 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvtpi2ps_u128, pDst, u64Src); 3523 3519 IEM_MC_IF_MXCSR_XCPT_PENDING() { 3524 3520 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); … … 3545 3541 IEM_MC_BEGIN(0, 0); 3546 3542 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX_EX(fSse2); 3547 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);3548 3543 IEM_MC_LOCAL(X86XMMREG, Dst); 3549 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, pDst, Dst, 1);3550 IEM_MC_ARG(uint64_t, u64Src, 2);3544 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, pDst, Dst, 0); 3545 IEM_MC_ARG(uint64_t, u64Src, 1); 3551 3546 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3552 3547 IEM_MC_MAYBE_RAISE_FPU_XCPT(); … … 3554 3549 IEM_MC_FPU_TO_MMX_MODE(); 3555 3550 3556 IEM_MC_REF_MXCSR(pfMxcsr);3557 3551 IEM_MC_FETCH_MREG_U64(u64Src, IEM_GET_MODRM_RM_8(bRm)); 3558 3552 3559 IEM_MC_CALL_ VOID_AIMPL_3(iemAImpl_cvtpi2pd_u128, pfMxcsr, pDst, u64Src);3553 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvtpi2pd_u128, pDst, u64Src); 3560 3554 IEM_MC_IF_MXCSR_XCPT_PENDING() { 3561 3555 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); … … 3573 3567 */ 3574 3568 IEM_MC_BEGIN(0, 0); 3575 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);3576 3569 IEM_MC_LOCAL(X86XMMREG, Dst); 3577 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, pDst, Dst, 1);3578 IEM_MC_ARG(uint64_t, u64Src, 2);3570 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, pDst, Dst, 0); 3571 IEM_MC_ARG(uint64_t, u64Src, 1); 3579 3572 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 3580 3573 … … 3587 3580 /* Doesn't cause a transition to MMX mode. */ 3588 3581 IEM_MC_PREPARE_SSE_USAGE(); 3589 IEM_MC_REF_MXCSR(pfMxcsr); 3590 3591 IEM_MC_CALL_VOID_AIMPL_3(iemAImpl_cvtpi2pd_u128, pfMxcsr, pDst, u64Src); 3582 3583 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvtpi2pd_u128, pDst, u64Src); 3592 3584 IEM_MC_IF_MXCSR_XCPT_PENDING() { 3593 3585 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); … … 3921 3913 IEM_MC_BEGIN(0, 0); 3922 3914 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX_EX(fSse2); 3923 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);3924 3915 IEM_MC_LOCAL(uint64_t, u64Dst); 3925 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 1);3926 IEM_MC_ARG(uint64_t, u64Src, 2);3916 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 0); 3917 IEM_MC_ARG(uint64_t, u64Src, 1); 3927 3918 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3928 3919 IEM_MC_PREPARE_FPU_USAGE(); 3929 3920 IEM_MC_FPU_TO_MMX_MODE(); 3930 3921 3931 IEM_MC_REF_MXCSR(pfMxcsr);3932 3922 IEM_MC_FETCH_XREG_U64(u64Src, IEM_GET_MODRM_RM(pVCpu, bRm), 0 /* a_iQword*/); 3933 3923 3934 IEM_MC_CALL_ VOID_AIMPL_3(iemAImpl_cvttps2pi_u128, pfMxcsr, pu64Dst, u64Src);3924 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvttps2pi_u128, pu64Dst, u64Src); 3935 3925 IEM_MC_IF_MXCSR_XCPT_PENDING() { 3936 3926 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); … … 3948 3938 */ 3949 3939 IEM_MC_BEGIN(0, 0); 3950 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);3951 3940 IEM_MC_LOCAL(uint64_t, u64Dst); 3952 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 1);3953 IEM_MC_ARG(uint64_t, u64Src, 2);3941 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 0); 3942 IEM_MC_ARG(uint64_t, u64Src, 1); 3954 3943 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 3955 3944 … … 3961 3950 IEM_MC_PREPARE_FPU_USAGE(); 3962 3951 IEM_MC_FPU_TO_MMX_MODE(); 3963 IEM_MC_REF_MXCSR(pfMxcsr); 3964 3965 IEM_MC_CALL_VOID_AIMPL_3(iemAImpl_cvttps2pi_u128, pfMxcsr, pu64Dst, u64Src); 3952 3953 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvttps2pi_u128, pu64Dst, u64Src); 3966 3954 IEM_MC_IF_MXCSR_XCPT_PENDING() { 3967 3955 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); … … 3988 3976 IEM_MC_BEGIN(0, 0); 3989 3977 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX_EX(fSse2); 3990 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);3991 3978 IEM_MC_LOCAL(uint64_t, u64Dst); 3992 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 1);3993 IEM_MC_ARG(PCX86XMMREG, pSrc, 2);3979 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 0); 3980 IEM_MC_ARG(PCX86XMMREG, pSrc, 1); 3994 3981 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3995 3982 IEM_MC_PREPARE_FPU_USAGE(); 3996 3983 IEM_MC_FPU_TO_MMX_MODE(); 3997 3984 3998 IEM_MC_REF_MXCSR(pfMxcsr);3999 3985 IEM_MC_REF_XREG_XMM_CONST(pSrc, IEM_GET_MODRM_RM(pVCpu, bRm)); 4000 3986 4001 IEM_MC_CALL_ VOID_AIMPL_3(iemAImpl_cvttpd2pi_u128, pfMxcsr, pu64Dst, pSrc);3987 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvttpd2pi_u128, pu64Dst, pSrc); 4002 3988 IEM_MC_IF_MXCSR_XCPT_PENDING() { 4003 3989 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); … … 4015 4001 */ 4016 4002 IEM_MC_BEGIN(0, 0); 4017 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);4018 4003 IEM_MC_LOCAL(uint64_t, u64Dst); 4019 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 1);4004 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 0); 4020 4005 IEM_MC_LOCAL(X86XMMREG, uSrc); 4021 IEM_MC_ARG_LOCAL_REF(PCX86XMMREG, pSrc, uSrc, 2);4006 IEM_MC_ARG_LOCAL_REF(PCX86XMMREG, pSrc, uSrc, 1); 4022 4007 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 4023 4008 … … 4030 4015 IEM_MC_FPU_TO_MMX_MODE(); 4031 4016 4032 IEM_MC_REF_MXCSR(pfMxcsr); 4033 4034 IEM_MC_CALL_VOID_AIMPL_3(iemAImpl_cvttpd2pi_u128, pfMxcsr, pu64Dst, pSrc); 4017 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvttpd2pi_u128, pu64Dst, pSrc); 4035 4018 IEM_MC_IF_MXCSR_XCPT_PENDING() { 4036 4019 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); … … 4283 4266 IEM_MC_BEGIN(0, 0); 4284 4267 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX_EX(fSse2); 4285 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);4286 4268 IEM_MC_LOCAL(uint64_t, u64Dst); 4287 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 1);4288 IEM_MC_ARG(uint64_t, u64Src, 2);4269 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 0); 4270 IEM_MC_ARG(uint64_t, u64Src, 1); 4289 4271 4290 4272 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); … … 4292 4274 IEM_MC_FPU_TO_MMX_MODE(); 4293 4275 4294 IEM_MC_REF_MXCSR(pfMxcsr);4295 4276 IEM_MC_FETCH_XREG_U64(u64Src, IEM_GET_MODRM_RM(pVCpu, bRm), 0 /* a_iQword*/); 4296 4277 4297 IEM_MC_CALL_ VOID_AIMPL_3(iemAImpl_cvtps2pi_u128, pfMxcsr, pu64Dst, u64Src);4278 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvtps2pi_u128, pu64Dst, u64Src); 4298 4279 IEM_MC_IF_MXCSR_XCPT_PENDING() { 4299 4280 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); … … 4311 4292 */ 4312 4293 IEM_MC_BEGIN(0, 0); 4313 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);4314 4294 IEM_MC_LOCAL(uint64_t, u64Dst); 4315 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 1);4316 IEM_MC_ARG(uint64_t, u64Src, 2);4295 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 0); 4296 IEM_MC_ARG(uint64_t, u64Src, 1); 4317 4297 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 4318 4298 … … 4324 4304 IEM_MC_PREPARE_FPU_USAGE(); 4325 4305 IEM_MC_FPU_TO_MMX_MODE(); 4326 IEM_MC_REF_MXCSR(pfMxcsr); 4327 4328 IEM_MC_CALL_VOID_AIMPL_3(iemAImpl_cvtps2pi_u128, pfMxcsr, pu64Dst, u64Src); 4306 4307 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvtps2pi_u128, pu64Dst, u64Src); 4329 4308 IEM_MC_IF_MXCSR_XCPT_PENDING() { 4330 4309 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); … … 4351 4330 IEM_MC_BEGIN(0, 0); 4352 4331 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX_EX(fSse2); 4353 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);4354 4332 IEM_MC_LOCAL(uint64_t, u64Dst); 4355 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 1);4356 IEM_MC_ARG(PCX86XMMREG, pSrc, 2);4333 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 0); 4334 IEM_MC_ARG(PCX86XMMREG, pSrc, 1); 4357 4335 4358 4336 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); … … 4360 4338 IEM_MC_FPU_TO_MMX_MODE(); 4361 4339 4362 IEM_MC_REF_MXCSR(pfMxcsr);4363 4340 IEM_MC_REF_XREG_XMM_CONST(pSrc, IEM_GET_MODRM_RM(pVCpu, bRm)); 4364 4341 4365 IEM_MC_CALL_ VOID_AIMPL_3(iemAImpl_cvtpd2pi_u128, pfMxcsr, pu64Dst, pSrc);4342 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvtpd2pi_u128, pu64Dst, pSrc); 4366 4343 IEM_MC_IF_MXCSR_XCPT_PENDING() { 4367 4344 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); … … 4379 4356 */ 4380 4357 IEM_MC_BEGIN(0, 0); 4381 IEM_MC_ARG(uint32_t *, pfMxcsr, 0);4382 4358 IEM_MC_LOCAL(uint64_t, u64Dst); 4383 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 1);4359 IEM_MC_ARG_LOCAL_REF(uint64_t *, pu64Dst, u64Dst, 0); 4384 4360 IEM_MC_LOCAL(X86XMMREG, uSrc); 4385 IEM_MC_ARG_LOCAL_REF(PCX86XMMREG, pSrc, uSrc, 2);4361 IEM_MC_ARG_LOCAL_REF(PCX86XMMREG, pSrc, uSrc, 1); 4386 4362 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 4387 4363 … … 4394 4370 IEM_MC_FPU_TO_MMX_MODE(); 4395 4371 4396 IEM_MC_REF_MXCSR(pfMxcsr); 4397 4398 IEM_MC_CALL_VOID_AIMPL_3(iemAImpl_cvtpd2pi_u128, pfMxcsr, pu64Dst, pSrc); 4372 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_cvtpd2pi_u128, pu64Dst, pSrc); 4399 4373 IEM_MC_IF_MXCSR_XCPT_PENDING() { 4400 4374 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); -
trunk/src/VBox/VMM/VMMAll/IEMAllN8veLiveness.cpp
r104155 r104174 585 585 } while (0) 586 586 #define IEM_MC_ASSERT_EFLAGS(a_fEflInput, a_fEflOutput) NOP() 587 #define IEM_MC_REF_MXCSR(a_pfMxcsr) IEM_LIVENESS_MXCSR_MODIFY()588 587 589 588 -
trunk/src/VBox/VMM/include/IEMInternal.h
r104156 r104174 3927 3927 FNIEMAIMPLMXCSRF2XMMIMM8 iemAImpl_dppd_u128, iemAImpl_dppd_u128_fallback; 3928 3928 3929 typedef IEM_DECL_IMPL_TYPE( void, FNIEMAIMPLMXCSRU64U128,(uint32_t *pfMxcsr, uint64_t *pu64Dst, PCX86XMMREG pSrc));3929 typedef IEM_DECL_IMPL_TYPE(uint32_t, FNIEMAIMPLMXCSRU64U128,(uint32_t fMxCsrIn, uint64_t *pu64Dst, PCX86XMMREG pSrc)); 3930 3930 typedef FNIEMAIMPLMXCSRU64U128 *PFNIEMAIMPLMXCSRU64U128; 3931 3931 … … 3933 3933 FNIEMAIMPLMXCSRU64U128 iemAImpl_cvttpd2pi_u128; 3934 3934 3935 typedef IEM_DECL_IMPL_TYPE( void, FNIEMAIMPLMXCSRU128U64,(uint32_t *pfMxcsr, PX86XMMREG pDst, uint64_t u64Src));3935 typedef IEM_DECL_IMPL_TYPE(uint32_t, FNIEMAIMPLMXCSRU128U64,(uint32_t fMxCsrIn, PX86XMMREG pDst, uint64_t u64Src)); 3936 3936 typedef FNIEMAIMPLMXCSRU128U64 *PFNIEMAIMPLMXCSRU128U64; 3937 3937 … … 3939 3939 FNIEMAIMPLMXCSRU128U64 iemAImpl_cvtpi2pd_u128; 3940 3940 3941 typedef IEM_DECL_IMPL_TYPE( void, FNIEMAIMPLMXCSRU64U64,(uint32_t *pfMxcsr, uint64_t *pu64Dst, uint64_t u64Src));3941 typedef IEM_DECL_IMPL_TYPE(uint32_t, FNIEMAIMPLMXCSRU64U64,(uint32_t fMxCsrIn, uint64_t *pu64Dst, uint64_t u64Src)); 3942 3942 typedef FNIEMAIMPLMXCSRU64U64 *PFNIEMAIMPLMXCSRU64U64; 3943 3943 -
trunk/src/VBox/VMM/include/IEMMc.h
r104168 r104174 329 329 #define IEM_MC_REF_EFLAGS(a_pEFlags) (a_pEFlags) = &pVCpu->cpum.GstCtx.eflags.uBoth 330 330 #define IEM_MC_REF_EFLAGS_EX(a_pEFlags, a_fEflInput, a_fEflOutput) IEM_MC_REF_EFLAGS(a_pEFlags) 331 #define IEM_MC_REF_MXCSR(a_pfMxcsr) (a_pfMxcsr) = &pVCpu->cpum.GstCtx.XState.x87.MXCSR332 331 333 332 #define IEM_MC_ADD_GREG_U16(a_iGReg, a_u16Value) *iemGRegRefU16(pVCpu, (a_iGReg)) += (a_u16Value) -
trunk/src/VBox/VMM/testcase/tstIEMAImpl.cpp
r104173 r104174 8906 8906 | (iFz ? X86_MXCSR_FZ : 0) 8907 8907 | X86_MXCSR_XCPT_MASK; 8908 uint32_t fMxcsrM = fMxcsrIn;8909 8908 uint64_t u64ResM; 8910 pfn(&fMxcsrM, &u64ResM, &TestData.InVal);8909 uint32_t fMxcsrM = pfn(fMxcsrIn, &u64ResM, &TestData.InVal); 8911 8910 TestData.fMxcsrIn = fMxcsrIn; 8912 8911 TestData.fMxcsrOut = fMxcsrM; … … 8915 8914 8916 8915 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; 8917 uint32_t fMxcsrU = fMxcsrIn;8918 8916 uint64_t u64ResU; 8919 pfn(&fMxcsrU, &u64ResU, &TestData.InVal);8917 uint32_t fMxcsrU = pfn(fMxcsrIn, &u64ResU, &TestData.InVal); 8920 8918 TestData.fMxcsrIn = fMxcsrIn; 8921 8919 TestData.fMxcsrOut = fMxcsrU; … … 8927 8925 { 8928 8926 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | fXcpt; 8929 uint32_t fMxcsr1 = fMxcsrIn;8930 8927 uint64_t u64Res1; 8931 pfn(&fMxcsr1, &u64Res1, &TestData.InVal);8928 uint32_t fMxcsr1 = pfn(fMxcsrIn, &u64Res1, &TestData.InVal); 8932 8929 TestData.fMxcsrIn = fMxcsrIn; 8933 8930 TestData.fMxcsrOut = fMxcsr1; … … 8939 8936 fXcpt |= fMxcsr1 & X86_MXCSR_XCPT_FLAGS; 8940 8937 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | (fXcpt << X86_MXCSR_XCPT_MASK_SHIFT); 8941 uint32_t fMxcsr2 = fMxcsrIn;8942 8938 uint64_t u64Res2; 8943 pfn(&fMxcsr2, &u64Res2, &TestData.InVal);8939 uint32_t fMxcsr2 = pfn(fMxcsrIn, &u64Res2, &TestData.InVal); 8944 8940 TestData.fMxcsrIn = fMxcsrIn; 8945 8941 TestData.fMxcsrOut = fMxcsr2; … … 8952 8948 { 8953 8949 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | ((fXcpt & ~fUnmasked) << X86_MXCSR_XCPT_MASK_SHIFT); 8954 uint32_t fMxcsr3 = fMxcsrIn;8955 8950 uint64_t u64Res3; 8956 pfn(&fMxcsr3, &u64Res3, &TestData.InVal);8951 uint32_t fMxcsr3 = pfn(fMxcsrIn, &u64Res3, &TestData.InVal); 8957 8952 TestData.fMxcsrIn = fMxcsrIn; 8958 8953 TestData.fMxcsrOut = fMxcsr3; … … 8987 8982 { 8988 8983 RTUINT64U ValOut; 8989 uint32_t fMxcsr = paTests[iTest].fMxcsrIn; 8990 pfn(&fMxcsr, &ValOut.u, &paTests[iTest].InVal); 8984 uint32_t fMxcsr = pfn(paTests[iTest].fMxcsrIn, &ValOut.u, &paTests[iTest].InVal); 8991 8985 if ( fMxcsr != paTests[iTest].fMxcsrOut 8992 8986 || ValOut.ai32[0] != paTests[iTest].OutVal.ai32[0] … … 9060 9054 | (iFz ? X86_MXCSR_FZ : 0) 9061 9055 | X86_MXCSR_XCPT_MASK; 9062 uint32_t fMxcsrM = fMxcsrIn; 9063 pfn(&fMxcsrM, &TestData.OutVal, TestData.InVal.u); 9056 uint32_t fMxcsrM = pfn(fMxcsrIn, &TestData.OutVal, TestData.InVal.u); 9064 9057 TestData.fMxcsrIn = fMxcsrIn; 9065 9058 TestData.fMxcsrOut = fMxcsrM; … … 9067 9060 9068 9061 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; 9069 uint32_t fMxcsrU = fMxcsrIn; 9070 pfn(&fMxcsrU, &TestData.OutVal, TestData.InVal.u); 9062 uint32_t fMxcsrU = pfn(fMxcsrIn, &TestData.OutVal, TestData.InVal.u); 9071 9063 TestData.fMxcsrIn = fMxcsrIn; 9072 9064 TestData.fMxcsrOut = fMxcsrU; … … 9077 9069 { 9078 9070 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | fXcpt; 9079 uint32_t fMxcsr1 = fMxcsrIn; 9080 pfn(&fMxcsr1, &TestData.OutVal, TestData.InVal.u); 9071 uint32_t fMxcsr1 = pfn(fMxcsrIn, &TestData.OutVal, TestData.InVal.u); 9081 9072 TestData.fMxcsrIn = fMxcsrIn; 9082 9073 TestData.fMxcsrOut = fMxcsr1; … … 9087 9078 fXcpt |= fMxcsr1 & X86_MXCSR_XCPT_FLAGS; 9088 9079 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | (fXcpt << X86_MXCSR_XCPT_MASK_SHIFT); 9089 uint32_t fMxcsr2 = fMxcsrIn; 9090 pfn(&fMxcsr2, &TestData.OutVal, TestData.InVal.u); 9080 uint32_t fMxcsr2 = pfn(fMxcsrIn, &TestData.OutVal, TestData.InVal.u); 9091 9081 TestData.fMxcsrIn = fMxcsrIn; 9092 9082 TestData.fMxcsrOut = fMxcsr2; … … 9098 9088 { 9099 9089 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | ((fXcpt & ~fUnmasked) << X86_MXCSR_XCPT_MASK_SHIFT); 9100 uint32_t fMxcsr3 = fMxcsrIn; 9101 pfn(&fMxcsr3, &TestData.OutVal, TestData.InVal.u); 9090 uint32_t fMxcsr3 = pfn(fMxcsrIn, &TestData.OutVal, TestData.InVal.u); 9102 9091 TestData.fMxcsrIn = fMxcsrIn; 9103 9092 TestData.fMxcsrOut = fMxcsr3; … … 9131 9120 { 9132 9121 X86XMMREG ValOut; 9133 uint32_t fMxcsr = paTests[iTest].fMxcsrIn; 9134 pfn(&fMxcsr, &ValOut, paTests[iTest].InVal.u); 9122 uint32_t fMxcsr = pfn(paTests[iTest].fMxcsrIn, &ValOut, paTests[iTest].InVal.u); 9135 9123 if ( fMxcsr != paTests[iTest].fMxcsrOut 9136 9124 || !RTFLOAT64U_ARE_IDENTICAL(&ValOut.ar64[0], &paTests[iTest].OutVal.ar64[0]) … … 9205 9193 | (iFz ? X86_MXCSR_FZ : 0) 9206 9194 | X86_MXCSR_XCPT_MASK; 9207 uint32_t fMxcsrM = fMxcsrIn; 9208 pfn(&fMxcsrM, &TestData.OutVal, TestData.InVal.u); 9195 uint32_t fMxcsrM = pfn(fMxcsrIn, &TestData.OutVal, TestData.InVal.u); 9209 9196 TestData.fMxcsrIn = fMxcsrIn; 9210 9197 TestData.fMxcsrOut = fMxcsrM; … … 9212 9199 9213 9200 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; 9214 uint32_t fMxcsrU = fMxcsrIn; 9215 pfn(&fMxcsrU, &TestData.OutVal, TestData.InVal.u); 9201 uint32_t fMxcsrU = pfn(fMxcsrIn, &TestData.OutVal, TestData.InVal.u); 9216 9202 TestData.fMxcsrIn = fMxcsrIn; 9217 9203 TestData.fMxcsrOut = fMxcsrU; … … 9222 9208 { 9223 9209 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | fXcpt; 9224 uint32_t fMxcsr1 = fMxcsrIn; 9225 pfn(&fMxcsr1, &TestData.OutVal, TestData.InVal.u); 9210 uint32_t fMxcsr1 = pfn(fMxcsrIn, &TestData.OutVal, TestData.InVal.u); 9226 9211 TestData.fMxcsrIn = fMxcsrIn; 9227 9212 TestData.fMxcsrOut = fMxcsr1; … … 9232 9217 fXcpt |= fMxcsr1 & X86_MXCSR_XCPT_FLAGS; 9233 9218 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | (fXcpt << X86_MXCSR_XCPT_MASK_SHIFT); 9234 uint32_t fMxcsr2 = fMxcsrIn; 9235 pfn(&fMxcsr2, &TestData.OutVal, TestData.InVal.u); 9219 uint32_t fMxcsr2 = pfn(fMxcsrIn, &TestData.OutVal, TestData.InVal.u); 9236 9220 TestData.fMxcsrIn = fMxcsrIn; 9237 9221 TestData.fMxcsrOut = fMxcsr2; … … 9243 9227 { 9244 9228 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | ((fXcpt & ~fUnmasked) << X86_MXCSR_XCPT_MASK_SHIFT); 9245 uint32_t fMxcsr3 = fMxcsrIn; 9246 pfn(&fMxcsr3, &TestData.OutVal, TestData.InVal.u); 9229 uint32_t fMxcsr3 = pfn(fMxcsrIn, &TestData.OutVal, TestData.InVal.u); 9247 9230 TestData.fMxcsrIn = fMxcsrIn; 9248 9231 TestData.fMxcsrOut = fMxcsr3; … … 9276 9259 { 9277 9260 X86XMMREG ValOut; 9278 uint32_t fMxcsr = paTests[iTest].fMxcsrIn; 9279 pfn(&fMxcsr, &ValOut, paTests[iTest].InVal.u); 9261 uint32_t fMxcsr = pfn(paTests[iTest].fMxcsrIn, &ValOut, paTests[iTest].InVal.u); 9280 9262 if ( fMxcsr != paTests[iTest].fMxcsrOut 9281 9263 || !RTFLOAT32U_ARE_IDENTICAL(&ValOut.ar32[0], &paTests[iTest].OutVal.ar32[0]) … … 9368 9350 | (iFz ? X86_MXCSR_FZ : 0) 9369 9351 | X86_MXCSR_XCPT_MASK; 9370 uint32_t fMxcsrM = fMxcsrIn;9371 9352 uint64_t u64ResM; 9372 pfn(&fMxcsrM, &u64ResM, TestVal.u);9353 uint32_t fMxcsrM = pfn(fMxcsrIn, &u64ResM, TestVal.u); 9373 9354 TestData.fMxcsrIn = fMxcsrIn; 9374 9355 TestData.fMxcsrOut = fMxcsrM; … … 9377 9358 9378 9359 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; 9379 uint32_t fMxcsrU = fMxcsrIn;9380 9360 uint64_t u64ResU; 9381 pfn(&fMxcsrU, &u64ResU, TestVal.u);9361 uint32_t fMxcsrU = pfn(fMxcsrIn, &u64ResU, TestVal.u); 9382 9362 TestData.fMxcsrIn = fMxcsrIn; 9383 9363 TestData.fMxcsrOut = fMxcsrU; … … 9389 9369 { 9390 9370 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | fXcpt; 9391 uint32_t fMxcsr1 = fMxcsrIn;9392 9371 uint64_t u64Res1; 9393 pfn(&fMxcsr1, &u64Res1, TestVal.u);9372 uint32_t fMxcsr1 = pfn(fMxcsrIn, &u64Res1, TestVal.u); 9394 9373 TestData.fMxcsrIn = fMxcsrIn; 9395 9374 TestData.fMxcsrOut = fMxcsr1; … … 9401 9380 fXcpt |= fMxcsr1 & X86_MXCSR_XCPT_FLAGS; 9402 9381 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | (fXcpt << X86_MXCSR_XCPT_MASK_SHIFT); 9403 uint32_t fMxcsr2 = fMxcsrIn;9404 9382 uint64_t u64Res2; 9405 pfn(&fMxcsr2, &u64Res2, TestVal.u);9383 uint32_t fMxcsr2 = pfn(fMxcsrIn, &u64Res2, TestVal.u); 9406 9384 TestData.fMxcsrIn = fMxcsrIn; 9407 9385 TestData.fMxcsrOut = fMxcsr2; … … 9414 9392 { 9415 9393 fMxcsrIn = (fMxcsrIn & ~X86_MXCSR_XCPT_MASK) | ((fXcpt & ~fUnmasked) << X86_MXCSR_XCPT_MASK_SHIFT); 9416 uint32_t fMxcsr3 = fMxcsrIn;9417 9394 uint64_t u64Res3; 9418 pfn(&fMxcsr3, &u64Res3, TestVal.u);9395 uint32_t fMxcsr3 = pfn(fMxcsrIn, &u64Res3, TestVal.u); 9419 9396 TestData.fMxcsrIn = fMxcsrIn; 9420 9397 TestData.fMxcsrOut = fMxcsr3; … … 9457 9434 ValIn.au32[1] = paTests[iTest].ar32InVal[1].u; 9458 9435 9459 uint32_t fMxcsr = paTests[iTest].fMxcsrIn; 9460 pfn(&fMxcsr, &ValOut.u, ValIn.u); 9436 uint32_t fMxcsr = pfn(paTests[iTest].fMxcsrIn, &ValOut.u, ValIn.u); 9461 9437 if ( fMxcsr != paTests[iTest].fMxcsrOut 9462 9438 || ValOut.ai32[0] != paTests[iTest].OutVal.ai32[0] -
trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
r104150 r104174 729 729 #define IEM_MC_REF_EFLAGS_EX(a_pEFlags, a_fEflInput, a_fEflOutput) IEM_MC_REF_EFLAGS(a_pEFlags) 730 730 #define IEM_MC_REF_FPUREG(a_pr80Dst, a_iSt) do { (a_pr80Dst) = (PRTFLOAT80U)((uintptr_t)0); CHK_PTYPE(PCRTFLOAT80U, a_pr80Dst); CHK_VAR(a_pr80Dst); AssertCompile((a_iSt) < 8); (void)fMcBegin; } while (0) 731 #define IEM_MC_REF_MXCSR(a_pfMxcsr) do { (a_pfMxcsr) = (uint32_t *)((uintptr_t)0); CHK_PTYPE(uint32_t *, a_pfMxcsr); CHK_VAR(a_pfMxcsr); (void)fMcBegin; (void)fSseRead; } while (0)732 731 733 732 #define IEM_MC_ADD_GREG_U16(a_iGReg, a_u16Const) do { CHK_GREG_IDX(a_iGReg); CHK_CONST(uint16_t, a_u16Const); (void)fMcBegin; } while (0)
Note:
See TracChangeset
for help on using the changeset viewer.