Changeset 106117 in vbox for trunk/src/VBox
- Timestamp:
- Sep 23, 2024 1:59:08 PM (2 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs.h
r106113 r106117 5975 5975 off = iemNativeEmitCommitEFlags<true /*fUpdateSkipping*/, a_fEflOutput, \ 5976 5976 iemNativeEflagsToLivenessMask<a_fEflInput>(), \ 5977 iemNativeEflagsToLivenessMask<a_fEflOutput>()>(pReNative, off, a_EFlags )5977 iemNativeEflagsToLivenessMask<a_fEflOutput>()>(pReNative, off, a_EFlags, a_fEflInput) 5978 5978 5979 5979 #undef IEM_MC_COMMIT_EFLAGS_OPT /* should not be used */ … … 5982 5982 off = iemNativeEmitCommitEFlags<false /*fUpdateSkipping*/, a_fEflOutput, \ 5983 5983 iemNativeEflagsToLivenessMask<a_fEflInput>(), \ 5984 iemNativeEflagsToLivenessMask<a_fEflOutput>()>(pReNative, off, a_EFlags )5984 iemNativeEflagsToLivenessMask<a_fEflOutput>()>(pReNative, off, a_EFlags, a_fEflInput) 5985 5985 5986 5986 /** Handles IEM_MC_COMMIT_EFLAGS_EX. */ 5987 5987 template<bool const a_fUpdateSkipping, uint32_t const a_fEflOutput, 5988 5988 uint64_t const a_fLivenessEflInputBits, uint64_t const a_fLivenessEflOutputBits> 5989 DECL_INLINE_THROW(uint32_t) iemNativeEmitCommitEFlags(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t idxVarEFlags) 5989 DECL_INLINE_THROW(uint32_t) 5990 iemNativeEmitCommitEFlags(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t idxVarEFlags, uint32_t fElfInput) 5990 5991 { 5991 5992 uint8_t const idxReg = iemNativeVarRegisterAcquire(pReNative, idxVarEFlags, &off, true /*fInitialized*/); … … 6034 6035 #endif 6035 6036 6036 #ifdef IEMNATIVE_ STRICT_EFLAGS_SKIPPING6037 #ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING 6037 6038 if RT_CONSTEXPR_IF(a_fUpdateSkipping) 6038 6039 { 6040 Assert(!(pReNative->fSkippingEFlags & fElfInput)); RT_NOREF(fElfInput); 6041 if RT_CONSTEXPR_IF((a_fEflOutput & X86_EFL_STATUS_BITS) == X86_EFL_STATUS_BITS) 6042 pReNative->fSkippingEFlags = 0; 6043 else 6044 pReNative->fSkippingEFlags &= ~(a_fEflOutput & X86_EFL_STATUS_BITS); 6045 # ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 6039 6046 if RT_CONSTEXPR_IF((a_fEflOutput & X86_EFL_STATUS_BITS) == X86_EFL_STATUS_BITS) 6040 6047 off = iemNativeEmitStoreImmToVCpuU32(pReNative, off, 0, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags)); … … 6042 6049 off = iemNativeEmitAndImmIntoVCpuU32(pReNative, off, ~(a_fEflOutput & X86_EFL_STATUS_BITS), 6043 6050 RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags)); 6051 # endif 6044 6052 } 6045 6053 #endif … … 6237 6245 IEMNATIVE_ASSERT_VAR_SIZE(pReNative, idxVarRef, sizeof(void *)); 6238 6246 6239 #ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 6247 #ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING 6248 Assert(!(pReNative->fSkippingEFlags & fEflInput)); 6249 pReNative->fSkippingEFlags &= ~fEflOutput; 6240 6250 IEMNATIVE_STRICT_EFLAGS_SKIPPING_EMIT_CHECK(pReNative, off, fEflInput); 6251 # ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 6241 6252 6242 6253 /* Updating the skipping according to the outputs is a little early, but … … 6247 6258 off = iemNativeEmitAndImmIntoVCpuU32(pReNative, off, ~(fEflOutput & X86_EFL_STATUS_BITS), 6248 6259 RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags)); 6249 #else 6260 # endif 6261 #endif 6250 6262 RT_NOREF(fEflInput, fEflOutput); 6251 #endif6252 6263 6253 6264 /* If we've delayed writing back the register value, flush it now. */ -
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r106113 r106117 2068 2068 pReNative->uCheckIrqSeqNo = 0; 2069 2069 pReNative->uTlbSeqNo = 0; 2070 #ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING 2071 pReNative->fSkippingEFlags = 0; 2072 #endif 2073 #ifdef IEMNATIVE_WITH_EFLAGS_POSTPONING 2074 pReNative->fPostponingEFlags = 0; 2075 #endif 2070 2076 2071 2077 #ifdef IEMNATIVE_WITH_DELAYED_PC_UPDATING … … 10301 10307 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeFullyRecompiledTbs); 10302 10308 10309 #ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING 10310 Assert(pReNative->fSkippingEFlags == 0); 10311 #endif 10312 #ifdef IEMNATIVE_WITH_EFLAGS_POSTPONING 10313 Assert(pReNative->fPostponingEFlags == 0); 10314 #endif 10315 10303 10316 #ifdef VBOX_WITH_STATISTICS 10304 10317 off = iemNativeEmitNativeTbExitStats(pReNative, off, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbFinished)); -
trunk/src/VBox/VMM/VMMAll/target-x86/IEMAllN8veEmit-x86.h
r106101 r106117 217 217 { 218 218 STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativeEflSkippedLogical); 219 pReNative->fSkippingEFlags |= X86_EFL_STATUS_BITS; 219 220 # ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 220 221 off = iemNativeEmitOrImmIntoVCpuU32(pReNative, off, X86_EFL_STATUS_BITS, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags)); … … 290 291 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 291 292 292 # ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 293 #ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING 294 pReNative->fSkippingEFlags &= ~X86_EFL_STATUS_BITS; 295 # ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 293 296 off = iemNativeEmitStoreImmToVCpuU32(pReNative, off, 0, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags)); 294 # endif 297 # endif 298 #endif 295 299 } 296 300 return off; … … 321 325 { 322 326 STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativeEflSkippedArithmetic); 327 pReNative->fSkippingEFlags |= X86_EFL_STATUS_BITS; 323 328 # ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 324 329 off = iemNativeEmitOrImmIntoVCpuU32(pReNative, off, X86_EFL_STATUS_BITS, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags)); … … 328 333 #endif 329 334 { 330 #ifdef IEMNATIVE_ STRICT_EFLAGS_SKIPPING335 #ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING 331 336 uint32_t fSkipped = 0; 332 337 #endif … … 485 490 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 486 491 487 #ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 492 #ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING 493 pReNative->fSkippingEFlags = fSkipped; 494 # ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 488 495 off = iemNativeEmitStoreImmToVCpuU32(pReNative, off, fSkipped, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags)); 496 # endif 489 497 #endif 490 498 } … … 1572 1580 { 1573 1581 STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativeEflSkippedShift); 1582 pReNative->fSkippingEFlags |= X86_EFL_STATUS_BITS; 1574 1583 # ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 1575 1584 off = iemNativeEmitOrImmIntoVCpuU32(pReNative, off, X86_EFL_STATUS_BITS, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags)); … … 1736 1745 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 1737 1746 1738 # ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 1747 #ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING 1748 pReNative->fSkippingEFlags = 0; 1749 # ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 1739 1750 off = iemNativeEmitStoreImmToVCpuU32(pReNative, off, 0, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags)); 1740 # endif 1751 # endif 1752 #endif 1741 1753 } 1742 1754 return off; -
trunk/src/VBox/VMM/include/IEMN8veRecompiler.h
r106113 r106117 1053 1053 */ 1054 1054 #ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING 1055 # define IEMNATIVE_STRICT_EFLAGS_SKIPPING_EMIT_CHECK(a_pReNative, a_off, a_fEflNeeded) do { \ 1056 AssertMsg(!((a_pReNative)->fSkippingEFlags & (a_fEflNeeded)), \ 1057 ("%#x & %#x -> %#x; off=%#x\n", (a_pReNative)->fSkippingEFlags, a_fEflNeeded, \ 1058 ((a_pReNative)->fSkippingEFlags & (a_fEflNeeded)), a_off)); \ 1059 (a_off) = iemNativeEmitEFlagsSkippingCheck(a_pReNative, a_off, a_fEflNeeded); \ 1060 } while (0) 1061 #else 1055 1062 # define IEMNATIVE_STRICT_EFLAGS_SKIPPING_EMIT_CHECK(a_pReNative, a_off, a_fEflNeeded) \ 1056 do { (a_off) = iemNativeEmitEFlagsSkippingCheck(a_pReNative, a_off, a_fEflNeeded); } while (0)1057 #else 1058 # define IEMNATIVE_STRICT_EFLAGS_SKIPPING_EMIT_CHECK(a_pReNative, a_off, a_fEflNeeded) do { } while (0)1063 AssertMsg(!((a_pReNative)->fSkippingEFlags & (a_fEflNeeded)), \ 1064 ("%#x & %#x -> %#x; off=%#x\n", (a_pReNative)->fSkippingEFlags, a_fEflNeeded, \ 1065 ((a_pReNative)->fSkippingEFlags & (a_fEflNeeded)), a_off)) 1059 1066 #endif 1060 1067 … … 1648 1655 /** The call number of the last CheckIrq, UINT32_MAX if not seen. */ 1649 1656 uint32_t idxLastCheckIrqCallNo; 1657 #ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING 1658 uint32_t fSkippingEFlags; 1659 #endif 1660 #ifdef IEMNATIVE_WITH_EFLAGS_POSTPONING 1661 uint32_t fPostponingEFlags; 1662 #endif 1650 1663 1651 1664 /** Core state requiring care with branches. */
Note:
See TracChangeset
for help on using the changeset viewer.