Changeset 101369 in vbox for trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
- Timestamp:
- Oct 6, 2023 1:22:15 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r101305 r101369 48 48 #define IEM_WITH_OPAQUE_DECODER_STATE 49 49 #define VMCPU_INCL_CPUM_GST_CTX 50 #define VMM_INCLUDED_SRC_include_IEMMc_h /* block IEMMc.h inclusion. */ 50 51 #include <VBox/vmm/iem.h> 51 52 #include <VBox/vmm/cpum.h> … … 1126 1127 * Called before starting a new recompile job. 1127 1128 */ 1128 static PIEMRECOMPILERSTATE iemNativeReInit(PIEMRECOMPILERSTATE pReNative )1129 static PIEMRECOMPILERSTATE iemNativeReInit(PIEMRECOMPILERSTATE pReNative, PCIEMTB pTb) 1129 1130 { 1130 1131 pReNative->cLabels = 0; 1131 1132 pReNative->cFixups = 0; 1133 pReNative->pTbOrg = pTb; 1132 1134 return pReNative; 1133 1135 } … … 1142 1144 * @param pVCpu The cross context virtual CPU structure of the calling 1143 1145 * thread. 1146 * @param pTb The TB that's about to be recompiled. 1144 1147 * @thread EMT(pVCpu) 1145 1148 */ 1146 static PIEMRECOMPILERSTATE iemNativeInit(PVMCPUCC pVCpu )1149 static PIEMRECOMPILERSTATE iemNativeInit(PVMCPUCC pVCpu, PCIEMTB pTb) 1147 1150 { 1148 1151 VMCPU_ASSERT_EMT(pVCpu); … … 1172 1175 */ 1173 1176 pVCpu->iem.s.pNativeRecompilerStateR3 = pReNative; 1174 return iemNativeReInit(pReNative );1177 return iemNativeReInit(pReNative, pTb); 1175 1178 } 1176 1179 … … 1906 1909 1907 1910 1911 /** Same as iemRegFinishClearingRF. */ 1912 DECLINLINE(uint32_t) iemNativeEmitFinishClearingRF(PIEMRECOMPILERSTATE pReNative, uint32_t off) 1913 { 1914 uint32_t const fFlags = pReNative->pTbOrg->fFlags; 1915 if (fFlags & IEMTB_F_INHIBIT_SHADOW) 1916 { 1917 } 1918 IEMTB_F_IEM_F_MASK 1919 1920 // 1921 if (RT_LIKELY(!( pVCpu->cpum.GstCtx.eflags.uBoth 1922 & (X86_EFL_TF | X86_EFL_RF | CPUMCTX_INHIBIT_SHADOW | CPUMCTX_DBG_HIT_DRX_MASK | CPUMCTX_DBG_DBGF_MASK)) )) 1923 return VINF_SUCCESS; 1924 return iemFinishInstructionWithFlagsSet(pVCpu); 1925 } 1926 1927 1928 /** Same as iemRegAddToEip32AndFinishingClearingRF. */ 1929 DECLINLINE(uint32_t) iemNativeEmitAddToEip32AndFinishingClearingRF(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t cbInstr) 1930 { 1931 /* Increment RIP. */ 1932 pVCpu->cpum.GstCtx.rip = (uint32_t)(pVCpu->cpum.GstCtx.eip + cbInstr); 1933 1934 /* Consider flags. */ 1935 return iemNativeEmitFinishClearingRF(pReNative, off); 1936 } 1937 1938 1908 1939 /* 1909 1940 * MC definitions for the native recompiler. … … 1921 1952 #define IEM_MC_DEFER_TO_CIMPL_3_RET_THREADED(a_cbInstr, a_fFlags, a_pfnCImpl, a0, a1, a2) \ 1922 1953 return iemNativeEmitCImplCall3(pReNative, off, pCallEntry->idxInstr, (uintptr_t)a_pfnCImpl, a_cbInstr, a0, a1, a2) 1954 1955 1956 #define IEM_MC_BEGIN(a_cArgs, a_cLocals, a_fFlags) { 1957 1958 #define IEM_MC_END() } AssertFailedReturn(UINT32_MAX /* shouldn't be reached! */) 1959 1960 #define IEM_MC_ADVANCE_RIP_AND_FINISH_THREADED_PC16(a_cbInstr) \ 1961 return iemNativeEmitAddToIp16AndFinishingClearingRF(pReNative, off, a_cbInstr) 1962 1963 #define IEM_MC_ADVANCE_RIP_AND_FINISH_THREADED_PC32(a_cbInstr) \ 1964 return iemNativeEmitAddToEip32AndFinishingClearingRF(pReNative, off, a_cbInstr) 1965 1966 #define IEM_MC_ADVANCE_RIP_AND_FINISH_THREADED_PC64(a_cbInstr) \ 1967 return iemNativeEmitAddToRip64AndFinishingClearingRF(pReNative, off, a_cbInstr) 1968 1923 1969 1924 1970 /* … … 1965 2011 PIEMRECOMPILERSTATE pReNative = pVCpu->iem.s.pNativeRecompilerStateR3; 1966 2012 if (RT_LIKELY(pReNative)) 1967 iemNativeReInit(pReNative );2013 iemNativeReInit(pReNative, pTb); 1968 2014 else 1969 2015 { 1970 pReNative = iemNativeInit(pVCpu );2016 pReNative = iemNativeInit(pVCpu, pTb); 1971 2017 AssertReturn(pReNative, pTb); 1972 2018 }
Note:
See TracChangeset
for help on using the changeset viewer.