- Timestamp:
- Jul 12, 2024 3:33:03 PM (5 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r105309 r105311 6726 6726 ENDPROC iemAImpl_cvtsi2sd_r64_i32 6727 6727 6728 ;; 6729 ; cvtsi2sd instruction - 64-bit variant. 6728 6729 ;; 6730 ; vcvtsi2sd instruction - 32-bit variant. 6730 6731 ; 6731 6732 ; @return R0_32 The new MXCSR value of the guest. … … 6733 6734 ; @param A1 Pointer to the result operand (output). 6734 6735 ; @param A2 Pointer to the second operand (input). 6736 ; @param A3 Pointer to the third operand (input). 6737 ; 6738 BEGINPROC_FASTCALL iemAImpl_vcvtsi2sd_u128_i32, 16 6739 PROLOGUE_3_ARGS 6740 IEMIMPL_AVX_PROLOGUE 6741 SSE_AVX_LD_MXCSR A0_32 6742 6743 movdqu xmm0, [A2] 6744 vcvtsi2sd xmm0, xmm0, dword [A3] 6745 movdqu [A1], xmm0 6746 6747 SSE_AVX_ST_MXCSR R0_32, A0_32 6748 IEMIMPL_AVX_EPILOGUE 6749 EPILOGUE_3_ARGS 6750 ENDPROC iemAImpl_vcvtsi2sd_u128_i32 6751 6752 6753 ;; 6754 ; cvtsi2sd instruction - 64-bit variant. 6755 ; 6756 ; @return R0_32 The new MXCSR value of the guest. 6757 ; @param A0_32 The guest's MXCSR register value to use. 6758 ; @param A1 Pointer to the result operand (output). 6759 ; @param A2 Pointer to the second operand (input). 6735 6760 ; 6736 6761 BEGINPROC_FASTCALL iemAImpl_cvtsi2sd_r64_i64, 16 … … 6746 6771 EPILOGUE_3_ARGS 6747 6772 ENDPROC iemAImpl_cvtsi2sd_r64_i64 6773 6774 6775 ;; 6776 ; vcvtsi2sd instruction - 64-bit variant. 6777 ; 6778 ; @return R0_32 The new MXCSR value of the guest. 6779 ; @param A0_32 The guest's MXCSR register value to use. 6780 ; @param A1 Pointer to the result operand (output). 6781 ; @param A2 Pointer to the second operand (input). 6782 ; @param A3 Pointer to the third operand (input). 6783 ; 6784 BEGINPROC_FASTCALL iemAImpl_vcvtsi2sd_u128_i64, 16 6785 PROLOGUE_3_ARGS 6786 IEMIMPL_AVX_PROLOGUE 6787 SSE_AVX_LD_MXCSR A0_32 6788 6789 movdqu xmm0, [A2] 6790 vcvtsi2sd xmm0, xmm0, qword [A3] 6791 movdqu [A1], xmm0 6792 6793 SSE_AVX_ST_MXCSR R0_32, A0_32 6794 IEMIMPL_AVX_EPILOGUE 6795 EPILOGUE_3_ARGS 6796 ENDPROC iemAImpl_vcvtsi2sd_u128_i64 6748 6797 6749 6798 -
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r105309 r105311 19092 19092 19093 19093 /** 19094 * CVTSI2SD19094 * [V]CVTSI2SD 19095 19095 */ 19096 19096 #ifdef IEM_WITHOUT_ASSEMBLY … … 19110 19110 } 19111 19111 #endif 19112 19113 19114 IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vcvtsi2sd_u128_i32_fallback, (uint32_t uMxCsrIn, PX86XMMREG puDst, PCX86XMMREG puSrc1, const int32_t *pi32Src2)) 19115 { 19116 puDst->au64[1] = puSrc1->au64[1]; 19117 19118 softfloat_state_t SoftState = IEM_SOFTFLOAT_STATE_INITIALIZER_FROM_MXCSR(uMxCsrIn); 19119 float64_t r64Res = i32_to_f64(*pi32Src2, &SoftState); 19120 return iemSseSoftStateAndR64ToMxcsrAndIprtResult(&SoftState, r64Res, &puDst->ar64[0], uMxCsrIn); 19121 } 19122 19123 19124 IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vcvtsi2sd_u128_i64_fallback, (uint32_t uMxCsrIn, PX86XMMREG puDst, PCX86XMMREG puSrc1, const int64_t *pi64Src2)) 19125 { 19126 puDst->au64[1] = puSrc1->au64[1]; 19127 19128 softfloat_state_t SoftState = IEM_SOFTFLOAT_STATE_INITIALIZER_FROM_MXCSR(uMxCsrIn); 19129 float64_t r64Res = i64_to_f64(*pi64Src2, &SoftState); 19130 return iemSseSoftStateAndR64ToMxcsrAndIprtResult(&SoftState, r64Res, &puDst->ar64[0], uMxCsrIn); 19131 } 19112 19132 19113 19133 -
trunk/src/VBox/VMM/VMMAll/IEMAllInstVexMap1.cpp.h
r105309 r105311 2465 2465 else 2466 2466 { 2467 /* greg, [mem32] */2467 /* XMM, [mem32] */ 2468 2468 IEM_MC_BEGIN(IEM_MC_F_NOT_286_OR_OLDER, 0); 2469 2469 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); … … 2493 2493 2494 2494 /** Opcode VEX.F2.0F 0x2a - vcvtsi2sd Vsd, Hsd, Ey */ 2495 FNIEMOP_STUB(iemOp_vcvtsi2sd_Vsd_Hsd_Ey); 2495 FNIEMOP_DEF(iemOp_vcvtsi2sd_Vsd_Hsd_Ey) 2496 { 2497 IEMOP_MNEMONIC3(VEX_RVM, VCVTSI2SD, vcvtsi2sd, Vpd, Hpd, Ey, DISOPTYPE_HARMLESS | DISOPTYPE_X86_AVX, 0); 2498 IEMOP_HLP_IGNORE_VEX_W_PREFIX_IF_NOT_IN_64BIT(); 2499 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2500 if (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_SIZE_REX_W) 2501 { 2502 if (IEM_IS_MODRM_REG_MODE(bRm)) 2503 { 2504 /* XMM, greg64 */ 2505 IEM_MC_BEGIN(IEM_MC_F_64BIT, 0); 2506 IEMOP_HLP_DONE_VEX_DECODING_EX(fAvx); 2507 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 2508 IEM_MC_PREPARE_AVX_USAGE(); 2509 2510 IEM_MC_LOCAL(X86XMMREG, uDst); 2511 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, puDst, uDst, 0); 2512 IEM_MC_ARG(PCX86XMMREG, puSrc1, 1); 2513 IEM_MC_REF_XREG_XMM_CONST(puSrc1, IEM_GET_EFFECTIVE_VVVV(pVCpu)); 2514 IEM_MC_ARG(const int64_t *, pi64Src2, 2); 2515 IEM_MC_REF_GREG_I64_CONST(pi64Src2, IEM_GET_MODRM_RM(pVCpu, bRm)); 2516 IEM_MC_CALL_AVX_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx, iemAImpl_vcvtsi2sd_u128_i64, iemAImpl_vcvtsi2sd_u128_i64_fallback), 2517 puDst, puSrc1, pi64Src2); 2518 IEM_MC_MAYBE_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 2519 IEM_MC_STORE_XREG_XMM( IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 2520 IEM_MC_CLEAR_YREG_128_UP( IEM_GET_MODRM_REG(pVCpu, bRm)); 2521 IEM_MC_ADVANCE_RIP_AND_FINISH(); 2522 IEM_MC_END(); 2523 } 2524 else 2525 { 2526 /* XMM, [mem64] */ 2527 IEM_MC_BEGIN(IEM_MC_F_64BIT, 0); 2528 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 2529 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 2530 IEMOP_HLP_DONE_VEX_DECODING_EX(fAvx); 2531 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 2532 IEM_MC_PREPARE_AVX_USAGE(); 2533 2534 IEM_MC_LOCAL(X86XMMREG, uDst); 2535 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, puDst, uDst, 0); 2536 IEM_MC_ARG(PCX86XMMREG, puSrc1, 1); 2537 IEM_MC_REF_XREG_XMM_CONST(puSrc1, IEM_GET_EFFECTIVE_VVVV(pVCpu)); 2538 IEM_MC_LOCAL(int64_t, i64Src2); 2539 IEM_MC_ARG_LOCAL_REF(const int64_t *, pi64Src2, i64Src2, 2); 2540 IEM_MC_FETCH_MEM_I64(i64Src2, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 2541 IEM_MC_CALL_AVX_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx, iemAImpl_vcvtsi2sd_u128_i64, iemAImpl_vcvtsi2sd_u128_i64_fallback), 2542 puDst, puSrc1, pi64Src2); 2543 IEM_MC_MAYBE_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 2544 IEM_MC_STORE_XREG_XMM( IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 2545 IEM_MC_CLEAR_YREG_128_UP( IEM_GET_MODRM_REG(pVCpu, bRm)); 2546 IEM_MC_ADVANCE_RIP_AND_FINISH(); 2547 IEM_MC_END(); 2548 } 2549 } 2550 else 2551 { 2552 if (IEM_IS_MODRM_REG_MODE(bRm)) 2553 { 2554 /* XMM, greg32 */ 2555 IEM_MC_BEGIN(IEM_MC_F_NOT_286_OR_OLDER, 0); 2556 IEMOP_HLP_DONE_VEX_DECODING_EX(fAvx); 2557 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 2558 IEM_MC_PREPARE_AVX_USAGE(); 2559 2560 IEM_MC_LOCAL(X86XMMREG, uDst); 2561 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, puDst, uDst, 0); 2562 IEM_MC_ARG(PCX86XMMREG, puSrc1, 1); 2563 IEM_MC_REF_XREG_XMM_CONST(puSrc1, IEM_GET_EFFECTIVE_VVVV(pVCpu)); 2564 IEM_MC_ARG(const int32_t *, pi32Src2, 2); 2565 IEM_MC_REF_GREG_I32_CONST(pi32Src2, IEM_GET_MODRM_RM(pVCpu, bRm)); 2566 IEM_MC_CALL_AVX_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx, iemAImpl_vcvtsi2sd_u128_i32, iemAImpl_vcvtsi2sd_u128_i32_fallback), 2567 puDst, puSrc1, pi32Src2); 2568 IEM_MC_MAYBE_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 2569 IEM_MC_STORE_XREG_XMM( IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 2570 IEM_MC_CLEAR_YREG_128_UP( IEM_GET_MODRM_REG(pVCpu, bRm)); 2571 IEM_MC_ADVANCE_RIP_AND_FINISH(); 2572 IEM_MC_END(); 2573 } 2574 else 2575 { 2576 /* XMM, [mem32] */ 2577 IEM_MC_BEGIN(IEM_MC_F_NOT_286_OR_OLDER, 0); 2578 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 2579 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 2580 IEMOP_HLP_DONE_VEX_DECODING_EX(fAvx); 2581 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 2582 IEM_MC_PREPARE_AVX_USAGE(); 2583 2584 IEM_MC_LOCAL(X86XMMREG, uDst); 2585 IEM_MC_ARG_LOCAL_REF(PX86XMMREG, puDst, uDst, 0); 2586 IEM_MC_ARG(PCX86XMMREG, puSrc1, 1); 2587 IEM_MC_REF_XREG_XMM_CONST(puSrc1, IEM_GET_EFFECTIVE_VVVV(pVCpu)); 2588 IEM_MC_LOCAL(int32_t, i32Src2); 2589 IEM_MC_ARG_LOCAL_REF(const int32_t *, pi32Src2, i32Src2, 2); 2590 IEM_MC_FETCH_MEM_I32(i32Src2, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 2591 IEM_MC_CALL_AVX_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx, iemAImpl_vcvtsi2sd_u128_i32, iemAImpl_vcvtsi2sd_u128_i32_fallback), 2592 puDst, puSrc1, pi32Src2); 2593 IEM_MC_MAYBE_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 2594 IEM_MC_STORE_XREG_XMM( IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 2595 IEM_MC_CLEAR_YREG_128_UP( IEM_GET_MODRM_REG(pVCpu, bRm)); 2596 IEM_MC_ADVANCE_RIP_AND_FINISH(); 2597 IEM_MC_END(); 2598 } 2599 } 2600 } 2496 2601 2497 2602 -
trunk/src/VBox/VMM/include/IEMInternal.h
r105309 r105311 4168 4168 FNIEMAIMPLSSEF2R64I64 iemAImpl_cvtsi2sd_r64_i64; 4169 4169 4170 FNIEMAIMPLAVXF3XMMI32 iemAImpl_vcvtsi2sd_u128_i32, iemAImpl_vcvtsi2sd_u128_i32_fallback; 4171 FNIEMAIMPLAVXF3XMMI64 iemAImpl_vcvtsi2sd_u128_i64, iemAImpl_vcvtsi2sd_u128_i64_fallback; 4170 4172 4171 4173 typedef IEM_DECL_IMPL_TYPE(uint32_t, FNIEMAIMPLF2EFLMXCSRR32R32,(uint32_t uMxCsrIn, uint32_t *pfEFlags, RTFLOAT32U uSrc1, RTFLOAT32U uSrc2));
Note:
See TracChangeset
for help on using the changeset viewer.