Changeset 93906 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Feb 24, 2022 10:28:32 AM (3 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r93635 r93906 11911 11911 (a_pr80Dst)->au16[4] = UINT16_C(0xffff); \ 11912 11912 } while (0) 11913 #define IEM_MC_STORE_MEM_INDEF_D80_BY_REF(a_pd80Dst) \ 11914 do { \ 11915 (a_pd80Dst)->au64[0] = UINT64_C(0xc000000000000000); \ 11916 (a_pd80Dst)->au16[4] = UINT16_C(0xffff); \ 11917 } while (0) 11913 11918 11914 11919 #ifndef IEM_WITH_SETJMP -
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r93792 r93906 2521 2521 2522 2522 ;; 2523 ; Loads an 80-bit floating point register value in BCD format from memory. 2524 ; 2525 ; @param A0 FPU context (fxsave). 2526 ; @param A1 Pointer to a IEMFPURESULT for the output. 2527 ; @param A2 Pointer to the 80-bit BCD value to load. 2528 ; 2529 BEGINPROC_FASTCALL iemAImpl_fld_r80_from_d80, 12 2530 PROLOGUE_3_ARGS 2531 sub xSP, 20h 2532 2533 fninit 2534 FPU_LD_FXSTATE_FCW_AND_SAFE_FSW A0 2535 fbld tword [A2] 2536 2537 fnstsw word [A1 + IEMFPURESULT.FSW] 2538 fnclex 2539 fstp tword [A1 + IEMFPURESULT.r80Result] 2540 2541 fninit 2542 add xSP, 20h 2543 EPILOGUE_3_ARGS 2544 ENDPROC iemAImpl_fld_r80_from_d80 2545 2546 2547 ;; 2548 ; Store a 80-bit floating point register to memory as BCD 2549 ; 2550 ; @param A0 FPU context (fxsave). 2551 ; @param A1 Where to return the output FSW. 2552 ; @param A2 Where to store the 80-bit BCD value. 2553 ; @param A3 Pointer to the 80-bit register value. 2554 ; 2555 BEGINPROC_FASTCALL iemAImpl_fst_r80_to_d80, 16 2556 PROLOGUE_4_ARGS 2557 sub xSP, 20h 2558 2559 fninit 2560 fld tword [A3] 2561 FPU_LD_FXSTATE_FCW_AND_SAFE_FSW A0 2562 fbstp tword [A2] 2563 2564 fnstsw word [A1] 2565 2566 fninit 2567 add xSP, 20h 2568 EPILOGUE_4_ARGS 2569 ENDPROC iemAImpl_fst_r80_to_d80 2570 2571 2572 ;; 2523 2573 ; FPU instruction working on two 80-bit floating point values. 2524 2574 ; -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsOneByte.cpp.h
r93115 r93906 10105 10105 10106 10106 /** Opcode 0xdf !11/6. */ 10107 FNIEMOP_STUB_1(iemOp_fbstp_m80d, uint8_t, bRm); 10107 FNIEMOP_DEF_1(iemOp_fbstp_m80d, uint8_t, bRm) 10108 { 10109 IEMOP_MNEMONIC(fbstp_m80d, "fbstp m80d"); 10110 IEM_MC_BEGIN(3, 2); 10111 IEM_MC_LOCAL(RTGCPTR, GCPtrEffDst); 10112 IEM_MC_LOCAL(uint16_t, u16Fsw); 10113 IEM_MC_ARG_LOCAL_REF(uint16_t *, pu16Fsw, u16Fsw, 0); 10114 IEM_MC_ARG(PRTPBCD80U, pd80Dst, 1); 10115 IEM_MC_ARG(PCRTFLOAT80U, pr80Value, 2); 10116 10117 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm, 0); 10118 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 10119 IEM_MC_MAYBE_RAISE_DEVICE_NOT_AVAILABLE(); 10120 IEM_MC_MAYBE_RAISE_FPU_XCPT(); 10121 10122 IEM_MC_MEM_MAP(pd80Dst, IEM_ACCESS_DATA_W, pVCpu->iem.s.iEffSeg, GCPtrEffDst, 1 /*arg*/); 10123 IEM_MC_PREPARE_FPU_USAGE(); 10124 IEM_MC_IF_FPUREG_NOT_EMPTY_REF_R80(pr80Value, 0) 10125 IEM_MC_CALL_FPU_AIMPL_3(iemAImpl_fst_r80_to_d80, pu16Fsw, pd80Dst, pr80Value); 10126 IEM_MC_MEM_COMMIT_AND_UNMAP_FOR_FPU_STORE(pd80Dst, IEM_ACCESS_DATA_W, u16Fsw); 10127 IEM_MC_UPDATE_FSW_WITH_MEM_OP_THEN_POP(u16Fsw, pVCpu->iem.s.iEffSeg, GCPtrEffDst); 10128 IEM_MC_ELSE() 10129 IEM_MC_IF_FCW_IM() 10130 IEM_MC_STORE_MEM_INDEF_D80_BY_REF(pd80Dst); 10131 IEM_MC_MEM_COMMIT_AND_UNMAP(pd80Dst, IEM_ACCESS_DATA_W); 10132 IEM_MC_ENDIF(); 10133 IEM_MC_FPU_STACK_UNDERFLOW_MEM_OP_THEN_POP(UINT8_MAX, pVCpu->iem.s.iEffSeg, GCPtrEffDst); 10134 IEM_MC_ENDIF(); 10135 IEM_MC_ADVANCE_RIP(); 10136 10137 IEM_MC_END(); 10138 return VINF_SUCCESS; 10139 } 10108 10140 10109 10141
Note:
See TracChangeset
for help on using the changeset viewer.