Changeset 96741 in vbox
- Timestamp:
- Sep 14, 2022 6:33:25 PM (2 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r96731 r96741 5675 5675 EPILOGUE_4_ARGS 5676 5676 ENDPROC iemAImpl_cvtss2si_i64_r32 5677 5678 5679 ;; 5680 ; cvtsi2ss instruction - 32-bit variant. 5681 ; 5682 ; @param A0 FPU context (FXSTATE or XSAVEAREA). 5683 ; @param A1 Where to return the MXCSR value. 5684 ; @param A2 Pointer to the result operand (output). 5685 ; @param A3 Pointer to the second operand (input). 5686 ; 5687 BEGINPROC_FASTCALL iemAImpl_cvtsi2ss_r32_i32, 16 5688 PROLOGUE_4_ARGS 5689 IEMIMPL_SSE_PROLOGUE 5690 SSE_LD_FXSTATE_MXCSR A0 5691 5692 cvtsi2ss xmm0, dword [A3] 5693 movd dword [A2], xmm0 5694 5695 SSE_ST_FXSTATE_MXCSR_ONLY A1, A0 5696 IEMIMPL_SSE_PROLOGUE 5697 EPILOGUE_4_ARGS 5698 ENDPROC iemAImpl_cvtsi2ss_r32_i32 5699 5700 ;; 5701 ; cvtsi2ss instruction - 64-bit variant. 5702 ; 5703 ; @param A0 FPU context (FXSTATE or XSAVEAREA). 5704 ; @param A1 Where to return the MXCSR value. 5705 ; @param A2 Pointer to the result operand (output). 5706 ; @param A3 Pointer to the second operand (input). 5707 ; 5708 BEGINPROC_FASTCALL iemAImpl_cvtsi2ss_r32_i64, 16 5709 PROLOGUE_4_ARGS 5710 IEMIMPL_SSE_PROLOGUE 5711 SSE_LD_FXSTATE_MXCSR A0 5712 5713 cvtsi2ss xmm0, qword [A3] 5714 movd dword [A2], xmm0 5715 5716 SSE_ST_FXSTATE_MXCSR_ONLY A1, A0 5717 IEMIMPL_SSE_PROLOGUE 5718 EPILOGUE_4_ARGS 5719 ENDPROC iemAImpl_cvtsi2ss_r32_i64 5720 5721 5722 ;; 5723 ; cvtsi2sd instruction - 32-bit variant. 5724 ; 5725 ; @param A0 FPU context (FXSTATE or XSAVEAREA). 5726 ; @param A1 Where to return the MXCSR value. 5727 ; @param A2 Pointer to the result operand (output). 5728 ; @param A3 Pointer to the second operand (input). 5729 ; 5730 BEGINPROC_FASTCALL iemAImpl_cvtsi2sd_r64_i32, 16 5731 PROLOGUE_4_ARGS 5732 IEMIMPL_SSE_PROLOGUE 5733 SSE_LD_FXSTATE_MXCSR A0 5734 5735 cvtsi2sd xmm0, dword [A3] 5736 movq [A2], xmm0 5737 5738 SSE_ST_FXSTATE_MXCSR_ONLY A1, A0 5739 IEMIMPL_SSE_PROLOGUE 5740 EPILOGUE_4_ARGS 5741 ENDPROC iemAImpl_cvtsi2sd_r64_i32 5742 5743 ;; 5744 ; cvtsi2ss instruction - 64-bit variant. 5745 ; 5746 ; @param A0 FPU context (FXSTATE or XSAVEAREA). 5747 ; @param A1 Where to return the MXCSR value. 5748 ; @param A2 Pointer to the result operand (output). 5749 ; @param A3 Pointer to the second operand (input). 5750 ; 5751 BEGINPROC_FASTCALL iemAImpl_cvtsi2sd_r64_i64, 16 5752 PROLOGUE_4_ARGS 5753 IEMIMPL_SSE_PROLOGUE 5754 SSE_LD_FXSTATE_MXCSR A0 5755 5756 cvtsi2sd xmm0, qword [A3] 5757 movq [A2], xmm0 5758 5759 SSE_ST_FXSTATE_MXCSR_ONLY A1, A0 5760 IEMIMPL_SSE_PROLOGUE 5761 EPILOGUE_4_ARGS 5762 ENDPROC iemAImpl_cvtsi2sd_r64_i64 -
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r96731 r96741 16124 16124 #endif 16125 16125 16126 16127 /** 16128 * CVTSI2SD 16129 */ 16130 #ifdef IEM_WITHOUT_ASSEMBLY 16131 IEM_DECL_IMPL_DEF(void, iemAImpl_cvtsi2sd_r64_i32,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT64U pr64Dst, const int32_t *pi32Src)) 16132 { 16133 softfloat_state_t SoftState = IEM_SOFTFLOAT_STATE_INITIALIZER_FROM_MXCSR(pFpuState->MXCSR); 16134 float64_t r64Res = i32_to_f64(*pi32Src, &SoftState); 16135 *pfMxcsr = iemSseSoftStateAndR64ToMxcsrAndIprtResult(&SoftState, r64Res, pr64Dst, pFpuState->MXCSR); 16136 } 16137 16138 16139 IEM_DECL_IMPL_DEF(void, iemAImpl_cvtsi2sd_r64_i64,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT64U pr64Dst, const int64_t *pi64Src)) 16140 { 16141 softfloat_state_t SoftState = IEM_SOFTFLOAT_STATE_INITIALIZER_FROM_MXCSR(pFpuState->MXCSR); 16142 float64_t r64Res = i64_to_f64(*pi64Src, &SoftState); 16143 *pfMxcsr = iemSseSoftStateAndR64ToMxcsrAndIprtResult(&SoftState, r64Res, pr64Dst, pFpuState->MXCSR); 16144 } 16145 #endif 16146 16147 16148 /** 16149 * CVTSI2SS 16150 */ 16151 #ifdef IEM_WITHOUT_ASSEMBLY 16152 IEM_DECL_IMPL_DEF(void, iemAImpl_cvtsi2ss_r32_i32,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT32U pr32Dst, const int32_t *pi32Src)) 16153 { 16154 softfloat_state_t SoftState = IEM_SOFTFLOAT_STATE_INITIALIZER_FROM_MXCSR(pFpuState->MXCSR); 16155 float32_t r32Res = i32_to_f32(*pi32Src, &SoftState); 16156 *pfMxcsr = iemSseSoftStateAndR32ToMxcsrAndIprtResult(&SoftState, r32Res, pr32Dst, pFpuState->MXCSR); 16157 } 16158 16159 16160 IEM_DECL_IMPL_DEF(void, iemAImpl_cvtsi2ss_r32_i64,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT32U pr32Dst, const int64_t *pi64Src)) 16161 { 16162 softfloat_state_t SoftState = IEM_SOFTFLOAT_STATE_INITIALIZER_FROM_MXCSR(pFpuState->MXCSR); 16163 float32_t r32Res = i64_to_f32(*pi64Src, &SoftState); 16164 *pfMxcsr = iemSseSoftStateAndR32ToMxcsrAndIprtResult(&SoftState, r32Res, pr32Dst, pFpuState->MXCSR); 16165 } 16166 #endif -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h
r96731 r96741 3583 3583 /** Opcode 0x66 0x0f 0x2a - cvtpi2pd Vpd, Qpi */ 3584 3584 FNIEMOP_STUB(iemOp_cvtpi2pd_Vpd_Qpi); //NEXT 3585 3586 3585 3587 /** Opcode 0xf3 0x0f 0x2a - vcvtsi2ss Vss, Hss, Ey */ 3586 FNIEMOP_STUB(iemOp_cvtsi2ss_Vss_Ey); //NEXT 3588 FNIEMOP_DEF(iemOp_cvtsi2ss_Vss_Ey) 3589 { 3590 IEMOP_MNEMONIC2(RM, CVTSI2SS, cvtsi2ss, Vss, Ey, DISOPTYPE_HARMLESS | DISOPTYPE_SSE, 0); 3591 3592 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 3593 if (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_SIZE_REX_W) 3594 { 3595 if (IEM_IS_MODRM_REG_MODE(bRm)) 3596 { 3597 /* XMM, greg64 */ 3598 IEM_MC_BEGIN(3, 4); 3599 IEM_MC_LOCAL(uint32_t, fMxcsr); 3600 IEM_MC_LOCAL(RTFLOAT32U, r32Dst); 3601 IEM_MC_ARG_LOCAL_REF(uint32_t *, pfMxcsr, fMxcsr, 0); 3602 IEM_MC_ARG_LOCAL_REF(PRTFLOAT32U, pr32Dst, r32Dst, 1); 3603 IEM_MC_ARG(const int64_t *, pi64Src, 2); 3604 3605 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3606 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3607 IEM_MC_PREPARE_SSE_USAGE(); /** @todo: This is superfluous because IEM_MC_CALL_SSE_AIMPL_3() is calling this but the tstIEMCheckMc testcase depends on it. */ 3608 3609 IEM_MC_REF_GREG_I64_CONST(pi64Src, IEM_GET_MODRM_REG(pVCpu, bRm)); 3610 IEM_MC_CALL_SSE_AIMPL_3(iemAImpl_cvtsi2ss_r32_i64, pfMxcsr, pr32Dst, pi64Src); 3611 IEM_MC_SSE_UPDATE_MXCSR(fMxcsr); 3612 IEM_MC_IF_MXCSR_XCPT_PENDING() 3613 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 3614 IEM_MC_ELSE() 3615 IEM_MC_STORE_XREG_R32(IEM_GET_MODRM_RM(pVCpu, bRm), r32Dst); 3616 IEM_MC_ENDIF(); 3617 3618 IEM_MC_ADVANCE_RIP(); 3619 IEM_MC_END(); 3620 } 3621 else 3622 { 3623 /* XMM, [mem64] */ 3624 IEM_MC_BEGIN(3, 4); 3625 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 3626 IEM_MC_LOCAL(uint32_t, fMxcsr); 3627 IEM_MC_LOCAL(RTFLOAT32U, r32Dst); 3628 IEM_MC_LOCAL(int64_t, i64Src); 3629 IEM_MC_ARG_LOCAL_REF(uint32_t *, pfMxcsr, fMxcsr, 0); 3630 IEM_MC_ARG_LOCAL_REF(PRTFLOAT32U, pr32Dst, r32Dst, 1); 3631 IEM_MC_ARG_LOCAL_REF(const int64_t *, pi64Src, i64Src, 2); 3632 3633 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 3634 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3635 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3636 IEM_MC_PREPARE_SSE_USAGE(); /** @todo: This is superfluous because IEM_MC_CALL_SSE_AIMPL_3() is calling this but the tstIEMCheckMc testcase depends on it. */ 3637 3638 IEM_MC_FETCH_MEM_I64(i64Src, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 3639 IEM_MC_CALL_SSE_AIMPL_3(iemAImpl_cvtsi2ss_r32_i64, pfMxcsr, pr32Dst, pi64Src); 3640 IEM_MC_SSE_UPDATE_MXCSR(fMxcsr); 3641 IEM_MC_IF_MXCSR_XCPT_PENDING() 3642 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 3643 IEM_MC_ELSE() 3644 IEM_MC_STORE_XREG_R32(IEM_GET_MODRM_RM(pVCpu, bRm), r32Dst); 3645 IEM_MC_ENDIF(); 3646 3647 IEM_MC_ADVANCE_RIP(); 3648 IEM_MC_END(); 3649 } 3650 } 3651 else 3652 { 3653 if (IEM_IS_MODRM_REG_MODE(bRm)) 3654 { 3655 /* greg, XMM */ 3656 IEM_MC_BEGIN(3, 4); 3657 IEM_MC_LOCAL(uint32_t, fMxcsr); 3658 IEM_MC_LOCAL(RTFLOAT32U, r32Dst); 3659 IEM_MC_ARG_LOCAL_REF(uint32_t *, pfMxcsr, fMxcsr, 0); 3660 IEM_MC_ARG_LOCAL_REF(PRTFLOAT32U, pr32Dst, r32Dst, 1); 3661 IEM_MC_ARG(const int32_t *, pi32Src, 2); 3662 3663 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3664 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3665 IEM_MC_PREPARE_SSE_USAGE(); /** @todo: This is superfluous because IEM_MC_CALL_SSE_AIMPL_3() is calling this but the tstIEMCheckMc testcase depends on it. */ 3666 3667 IEM_MC_REF_GREG_I32_CONST(pi32Src, IEM_GET_MODRM_REG(pVCpu, bRm)); 3668 IEM_MC_CALL_SSE_AIMPL_3(iemAImpl_cvtsi2ss_r32_i32, pfMxcsr, pr32Dst, pi32Src); 3669 IEM_MC_SSE_UPDATE_MXCSR(fMxcsr); 3670 IEM_MC_IF_MXCSR_XCPT_PENDING() 3671 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 3672 IEM_MC_ELSE() 3673 IEM_MC_STORE_XREG_R32(IEM_GET_MODRM_RM(pVCpu, bRm), r32Dst); 3674 IEM_MC_ENDIF(); 3675 3676 IEM_MC_ADVANCE_RIP(); 3677 IEM_MC_END(); 3678 } 3679 else 3680 { 3681 /* greg, [mem] */ 3682 IEM_MC_BEGIN(3, 4); 3683 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 3684 IEM_MC_LOCAL(uint32_t, fMxcsr); 3685 IEM_MC_LOCAL(RTFLOAT32U, r32Dst); 3686 IEM_MC_LOCAL(int32_t, i32Src); 3687 IEM_MC_ARG_LOCAL_REF(uint32_t *, pfMxcsr, fMxcsr, 0); 3688 IEM_MC_ARG_LOCAL_REF(PRTFLOAT32U, pr32Dst, r32Dst, 1); 3689 IEM_MC_ARG_LOCAL_REF(const int32_t *, pi32Src, i32Src, 2); 3690 3691 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 3692 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3693 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3694 IEM_MC_PREPARE_SSE_USAGE(); /** @todo: This is superfluous because IEM_MC_CALL_SSE_AIMPL_3() is calling this but the tstIEMCheckMc testcase depends on it. */ 3695 3696 IEM_MC_FETCH_MEM_I32(i32Src, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 3697 IEM_MC_CALL_SSE_AIMPL_3(iemAImpl_cvtsi2ss_r32_i32, pfMxcsr, pr32Dst, pi32Src); 3698 IEM_MC_SSE_UPDATE_MXCSR(fMxcsr); 3699 IEM_MC_IF_MXCSR_XCPT_PENDING() 3700 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 3701 IEM_MC_ELSE() 3702 IEM_MC_STORE_XREG_R32(IEM_GET_MODRM_RM(pVCpu, bRm), r32Dst); 3703 IEM_MC_ENDIF(); 3704 3705 IEM_MC_ADVANCE_RIP(); 3706 IEM_MC_END(); 3707 } 3708 } 3709 return VINF_SUCCESS; 3710 } 3711 3712 3587 3713 /** Opcode 0xf2 0x0f 0x2a - vcvtsi2sd Vsd, Hsd, Ey */ 3588 FNIEMOP_STUB(iemOp_cvtsi2sd_Vsd_Ey); //NEXT 3714 FNIEMOP_DEF(iemOp_cvtsi2sd_Vsd_Ey) 3715 { 3716 IEMOP_MNEMONIC2(RM, CVTSI2SD, cvtsi2sd, Vsd, Ey, DISOPTYPE_HARMLESS | DISOPTYPE_SSE, 0); 3717 3718 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 3719 if (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_SIZE_REX_W) 3720 { 3721 if (IEM_IS_MODRM_REG_MODE(bRm)) 3722 { 3723 /* XMM, greg64 */ 3724 IEM_MC_BEGIN(3, 4); 3725 IEM_MC_LOCAL(uint32_t, fMxcsr); 3726 IEM_MC_LOCAL(RTFLOAT64U, r64Dst); 3727 IEM_MC_ARG_LOCAL_REF(uint32_t *, pfMxcsr, fMxcsr, 0); 3728 IEM_MC_ARG_LOCAL_REF(PRTFLOAT64U, pr64Dst, r64Dst, 1); 3729 IEM_MC_ARG(const int64_t *, pi64Src, 2); 3730 3731 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3732 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3733 IEM_MC_PREPARE_SSE_USAGE(); /** @todo: This is superfluous because IEM_MC_CALL_SSE_AIMPL_3() is calling this but the tstIEMCheckMc testcase depends on it. */ 3734 3735 IEM_MC_REF_GREG_I64_CONST(pi64Src, IEM_GET_MODRM_REG(pVCpu, bRm)); 3736 IEM_MC_CALL_SSE_AIMPL_3(iemAImpl_cvtsi2sd_r64_i64, pfMxcsr, pr64Dst, pi64Src); 3737 IEM_MC_SSE_UPDATE_MXCSR(fMxcsr); 3738 IEM_MC_IF_MXCSR_XCPT_PENDING() 3739 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 3740 IEM_MC_ELSE() 3741 IEM_MC_STORE_XREG_R64(IEM_GET_MODRM_RM(pVCpu, bRm), r64Dst); 3742 IEM_MC_ENDIF(); 3743 3744 IEM_MC_ADVANCE_RIP(); 3745 IEM_MC_END(); 3746 } 3747 else 3748 { 3749 /* XMM, [mem64] */ 3750 IEM_MC_BEGIN(3, 4); 3751 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 3752 IEM_MC_LOCAL(uint32_t, fMxcsr); 3753 IEM_MC_LOCAL(RTFLOAT64U, r64Dst); 3754 IEM_MC_LOCAL(int64_t, i64Src); 3755 IEM_MC_ARG_LOCAL_REF(uint32_t *, pfMxcsr, fMxcsr, 0); 3756 IEM_MC_ARG_LOCAL_REF(PRTFLOAT64U, pr64Dst, r64Dst, 1); 3757 IEM_MC_ARG_LOCAL_REF(const int64_t *, pi64Src, i64Src, 2); 3758 3759 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 3760 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3761 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3762 IEM_MC_PREPARE_SSE_USAGE(); /** @todo: This is superfluous because IEM_MC_CALL_SSE_AIMPL_3() is calling this but the tstIEMCheckMc testcase depends on it. */ 3763 3764 IEM_MC_FETCH_MEM_I64(i64Src, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 3765 IEM_MC_CALL_SSE_AIMPL_3(iemAImpl_cvtsi2sd_r64_i64, pfMxcsr, pr64Dst, pi64Src); 3766 IEM_MC_SSE_UPDATE_MXCSR(fMxcsr); 3767 IEM_MC_IF_MXCSR_XCPT_PENDING() 3768 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 3769 IEM_MC_ELSE() 3770 IEM_MC_STORE_XREG_R64(IEM_GET_MODRM_RM(pVCpu, bRm), r64Dst); 3771 IEM_MC_ENDIF(); 3772 3773 IEM_MC_ADVANCE_RIP(); 3774 IEM_MC_END(); 3775 } 3776 } 3777 else 3778 { 3779 if (IEM_IS_MODRM_REG_MODE(bRm)) 3780 { 3781 /* greg, XMM */ 3782 IEM_MC_BEGIN(3, 4); 3783 IEM_MC_LOCAL(uint32_t, fMxcsr); 3784 IEM_MC_LOCAL(RTFLOAT64U, r64Dst); 3785 IEM_MC_ARG_LOCAL_REF(uint32_t *, pfMxcsr, fMxcsr, 0); 3786 IEM_MC_ARG_LOCAL_REF(PRTFLOAT64U, pr64Dst, r64Dst, 1); 3787 IEM_MC_ARG(const int32_t *, pi32Src, 2); 3788 3789 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3790 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3791 IEM_MC_PREPARE_SSE_USAGE(); /** @todo: This is superfluous because IEM_MC_CALL_SSE_AIMPL_3() is calling this but the tstIEMCheckMc testcase depends on it. */ 3792 3793 IEM_MC_REF_GREG_I32_CONST(pi32Src, IEM_GET_MODRM_REG(pVCpu, bRm)); 3794 IEM_MC_CALL_SSE_AIMPL_3(iemAImpl_cvtsi2sd_r64_i32, pfMxcsr, pr64Dst, pi32Src); 3795 IEM_MC_SSE_UPDATE_MXCSR(fMxcsr); 3796 IEM_MC_IF_MXCSR_XCPT_PENDING() 3797 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 3798 IEM_MC_ELSE() 3799 IEM_MC_STORE_XREG_R64(IEM_GET_MODRM_RM(pVCpu, bRm), r64Dst); 3800 IEM_MC_ENDIF(); 3801 3802 IEM_MC_ADVANCE_RIP(); 3803 IEM_MC_END(); 3804 } 3805 else 3806 { 3807 /* greg, [mem] */ 3808 IEM_MC_BEGIN(3, 4); 3809 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 3810 IEM_MC_LOCAL(uint32_t, fMxcsr); 3811 IEM_MC_LOCAL(RTFLOAT64U, r64Dst); 3812 IEM_MC_LOCAL(int32_t, i32Src); 3813 IEM_MC_ARG_LOCAL_REF(uint32_t *, pfMxcsr, fMxcsr, 0); 3814 IEM_MC_ARG_LOCAL_REF(PRTFLOAT64U, pr64Dst, r64Dst, 1); 3815 IEM_MC_ARG_LOCAL_REF(const int32_t *, pi32Src, i32Src, 2); 3816 3817 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 3818 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3819 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 3820 IEM_MC_PREPARE_SSE_USAGE(); /** @todo: This is superfluous because IEM_MC_CALL_SSE_AIMPL_3() is calling this but the tstIEMCheckMc testcase depends on it. */ 3821 3822 IEM_MC_FETCH_MEM_I32(i32Src, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 3823 IEM_MC_CALL_SSE_AIMPL_3(iemAImpl_cvtsi2sd_r64_i32, pfMxcsr, pr64Dst, pi32Src); 3824 IEM_MC_SSE_UPDATE_MXCSR(fMxcsr); 3825 IEM_MC_IF_MXCSR_XCPT_PENDING() 3826 IEM_MC_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 3827 IEM_MC_ELSE() 3828 IEM_MC_STORE_XREG_R64(IEM_GET_MODRM_RM(pVCpu, bRm), r64Dst); 3829 IEM_MC_ENDIF(); 3830 3831 IEM_MC_ADVANCE_RIP(); 3832 IEM_MC_END(); 3833 } 3834 } 3835 return VINF_SUCCESS; 3836 } 3589 3837 3590 3838 -
trunk/src/VBox/VMM/include/IEMInternal.h
r96731 r96741 2315 2315 FNIEMAIMPLSSEF2I64U32 iemAImpl_cvtss2si_i64_r32; 2316 2316 2317 typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2R32I32,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT32U pr32Dst, const int32_t *pi32Src)); 2318 typedef FNIEMAIMPLSSEF2R32I32 *PFNIEMAIMPLSSEF2R32I32; 2319 typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2R32I64,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT32U pr32Dst, const int64_t *pi64Src)); 2320 typedef FNIEMAIMPLSSEF2R32I64 *PFNIEMAIMPLSSEF2R32I64; 2321 2322 FNIEMAIMPLSSEF2R32I32 iemAImpl_cvtsi2ss_r32_i32; 2323 FNIEMAIMPLSSEF2R32I64 iemAImpl_cvtsi2ss_r32_i64; 2324 2325 typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2R64I32,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT64U pr64Dst, const int32_t *pi32Src)); 2326 typedef FNIEMAIMPLSSEF2R64I32 *PFNIEMAIMPLSSEF2R64I32; 2327 typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2R64I64,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT64U pr64Dst, const int64_t *pi64Src)); 2328 typedef FNIEMAIMPLSSEF2R64I64 *PFNIEMAIMPLSSEF2R64I64; 2329 2330 FNIEMAIMPLSSEF2R64I32 iemAImpl_cvtsi2sd_r64_i32; 2331 FNIEMAIMPLSSEF2R64I64 iemAImpl_cvtsi2sd_r64_i64; 2317 2332 /** @} */ 2318 2333 -
trunk/src/VBox/VMM/include/IEMMc.h
r96731 r96741 321 321 * Use IEM_MC_CLEAR_HIGH_GREG_U64_BY_REF! */ 322 322 #define IEM_MC_REF_GREG_U32(a_pu32Dst, a_iGReg) (a_pu32Dst) = iemGRegRefU32(pVCpu, (a_iGReg)) 323 #define IEM_MC_REF_GREG_I32(a_pi32Dst, a_iGReg) (a_pi32Dst) = (int32_t *)iemGRegRefU32(pVCpu, (a_iGReg)) 324 #define IEM_MC_REF_GREG_I32_CONST(a_pi32Dst, a_iGReg) (a_pi32Dst) = (int32_t const *)iemGRegRefU32(pVCpu, (a_iGReg)) 323 325 #define IEM_MC_REF_GREG_U64(a_pu64Dst, a_iGReg) (a_pu64Dst) = iemGRegRefU64(pVCpu, (a_iGReg)) 326 #define IEM_MC_REF_GREG_I64(a_pi64Dst, a_iGReg) (a_pi64Dst) = (int64_t *)iemGRegRefU64(pVCpu, (a_iGReg)) 327 #define IEM_MC_REF_GREG_I64_CONST(a_pi64Dst, a_iGReg) (a_pi64Dst) = (int64_t const *)iemGRegRefU64(pVCpu, (a_iGReg)) 324 328 /** @note Not for IOPL or IF testing or modification. */ 325 329 #define IEM_MC_REF_EFLAGS(a_pEFlags) (a_pEFlags) = &pVCpu->cpum.GstCtx.eflags.u … … 465 469 #define IEM_MC_STORE_XREG_U32(a_iXReg, a_u32Value) \ 466 470 do { pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au32[0] = (a_u32Value); } while (0) 471 #define IEM_MC_STORE_XREG_R32(a_iXReg, a_r32Value) \ 472 do { pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].ar32[0] = (a_r32Value); } while (0) 473 #define IEM_MC_STORE_XREG_R64(a_iXReg, a_r64Value) \ 474 do { pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].ar64[0] = (a_r64Value); } while (0) 467 475 #define IEM_MC_STORE_XREG_U32_ZX_U128(a_iXReg, a_u32Value) \ 468 476 do { pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[0] = (uint32_t)(a_u32Value); \ -
trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
r96731 r96741 665 665 #define IEM_MC_REF_GREG_U16(a_pu16Dst, a_iGReg) do { (a_pu16Dst) = (uint16_t *)((uintptr_t)0); CHK_PTYPE(uint16_t *, a_pu16Dst); (void)fMcBegin; } while (0) 666 666 #define IEM_MC_REF_GREG_U32(a_pu32Dst, a_iGReg) do { (a_pu32Dst) = (uint32_t *)((uintptr_t)0); CHK_PTYPE(uint32_t *, a_pu32Dst); (void)fMcBegin; } while (0) 667 #define IEM_MC_REF_GREG_I32(a_pi32Dst, a_iGReg) do { (a_pi32Dst) = (int32_t *)((uintptr_t)0); CHK_PTYPE(int32_t *, a_pi32Dst); (void)fMcBegin; } while (0) 668 #define IEM_MC_REF_GREG_I32_CONST(a_pi32Dst, a_iGReg) do { (a_pi32Dst) = (int32_t const *)((uintptr_t)0); CHK_PTYPE(int32_t const *, a_pi32Dst); (void)fMcBegin; } while (0) 667 669 #define IEM_MC_REF_GREG_U64(a_pu64Dst, a_iGReg) do { (a_pu64Dst) = (uint64_t *)((uintptr_t)0); CHK_PTYPE(uint64_t *, a_pu64Dst); (void)fMcBegin; } while (0) 670 #define IEM_MC_REF_GREG_I64(a_pi64Dst, a_iGReg) do { (a_pi64Dst) = (int64_t *)((uintptr_t)0); CHK_PTYPE(int64_t *, a_pi64Dst); (void)fMcBegin; } while (0) 671 #define IEM_MC_REF_GREG_I64_CONST(a_pi64Dst, a_iGReg) do { (a_pi64Dst) = (int64_t const *)((uintptr_t)0); CHK_PTYPE(int64_t const *, a_pi64Dst); (void)fMcBegin; } while (0) 668 672 #define IEM_MC_REF_EFLAGS(a_pEFlags) do { (a_pEFlags) = (uint32_t *)((uintptr_t)0); CHK_PTYPE(uint32_t *, a_pEFlags); (void)fMcBegin; } while (0) 669 673 #define IEM_MC_REF_FPUREG(a_pr80Dst, a_iSt) do { (a_pr80Dst) = (PRTFLOAT80U)((uintptr_t)0); CHK_PTYPE(PCRTFLOAT80U, a_pr80Dst); AssertCompile((a_iSt) < 8); (void)fMcBegin; } while (0) … … 740 744 #define IEM_MC_STORE_XREG_U32_ZX_U128(a_iXReg, a_u32Value) do { CHK_TYPE(uint32_t, a_u32Value); (void)fSseWrite; (void)fMcBegin; } while (0) 741 745 #define IEM_MC_STORE_XREG_HI_U64(a_iXReg, a_u64Value) do { CHK_TYPE(uint64_t, a_u64Value); (void)fSseWrite; (void)fMcBegin; } while (0) 746 #define IEM_MC_STORE_XREG_R32(a_iXReg, a_r32Value) do { CHK_TYPE(RTFLOAT32U, a_r32Value); (void)fSseWrite; (void)fMcBegin; } while (0) 747 #define IEM_MC_STORE_XREG_R64(a_iXReg, a_r64Value) do { CHK_TYPE(RTFLOAT64U, a_r64Value); (void)fSseWrite; (void)fMcBegin; } while (0) 742 748 #define IEM_MC_REF_XREG_U128(a_pu128Dst, a_iXReg) do { (a_pu128Dst) = (PRTUINT128U)((uintptr_t)0); CHK_PTYPE(PRTUINT128U, a_pu128Dst); (void)fSseWrite; (void)fMcBegin; } while (0) 743 749 #define IEM_MC_REF_XREG_U128_CONST(a_pu128Dst, a_iXReg) do { (a_pu128Dst) = (PCRTUINT128U)((uintptr_t)0); CHK_PTYPE(PCRTUINT128U, a_pu128Dst); (void)fSseWrite; (void)fMcBegin; } while (0)
Note:
See TracChangeset
for help on using the changeset viewer.