Changeset 106037 in vbox
- Timestamp:
- Sep 12, 2024 3:17:06 PM (4 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py
r105853 r106037 3204 3204 'IEM_MC_IND_CALL_U64_AND_FINISH': (McBlock.parseMcGeneric, True, True, False, ), 3205 3205 'IEM_MC_INT_CLEAR_ZMM_256_UP': (McBlock.parseMcGeneric, True, True, False, ), 3206 'IEM_MC_LIVENESS_GREG_INPUT': (McBlock.parseMcGeneric, False, False, True, ), 3207 'IEM_MC_LIVENESS_GREG_CLOBBER': (McBlock.parseMcGeneric, False, False, True, ), 3208 'IEM_MC_LIVENESS_GREG_MODIFY': (McBlock.parseMcGeneric, False, False, True, ), 3209 'IEM_MC_LIVENESS_MREG_INPUT': (McBlock.parseMcGeneric, False, False, True, ), 3210 'IEM_MC_LIVENESS_MREG_CLOBBER': (McBlock.parseMcGeneric, False, False, True, ), 3211 'IEM_MC_LIVENESS_MREG_MODIFY': (McBlock.parseMcGeneric, False, False, True, ), 3212 'IEM_MC_LIVENESS_XREG_INPUT': (McBlock.parseMcGeneric, False, False, True, ), 3213 'IEM_MC_LIVENESS_XREG_CLOBBER': (McBlock.parseMcGeneric, False, False, True, ), 3214 'IEM_MC_LIVENESS_XREG_MODIFY': (McBlock.parseMcGeneric, False, False, True, ), 3206 3215 'IEM_MC_LOCAL': (McBlock.parseMcLocal, False, False, True, ), 3207 3216 'IEM_MC_LOCAL_ASSIGN': (McBlock.parseMcLocalAssign, False, False, True, ), -
trunk/src/VBox/VMM/VMMAll/IEMAllInstTwoByte0f.cpp.h
r105699 r106037 13125 13125 IEM_MC_PREPARE_SSE_USAGE(); 13126 13126 IEM_MC_NATIVE_IF(RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64) { 13127 IEM_MC_LIVENESS_GREG_CLOBBER(IEM_GET_MODRM_REG(pVCpu, bRm)); 13128 IEM_MC_LIVENESS_XREG_INPUT(IEM_GET_MODRM_RM(pVCpu, bRm)); 13127 13129 IEM_MC_NATIVE_EMIT_2(iemNativeEmit_pmovmskb_rr_u128, IEM_GET_MODRM_REG(pVCpu, bRm), IEM_GET_MODRM_RM(pVCpu, bRm)); 13128 13130 } IEM_MC_NATIVE_ELSE() { -
trunk/src/VBox/VMM/VMMAll/IEMAllN8veLiveness.h
r105770 r106037 1237 1237 #define IEM_MC_HINT_FLUSH_GUEST_SHADOW(g_fGstShwFlush) NOP() 1238 1238 1239 #define IEM_MC_LIVENESS_GREG_INPUT(a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg) 1240 #define IEM_MC_LIVENESS_GREG_CLOBBER(a_iGReg) IEM_LIVENESS_GPR_CLOBBER(a_iGReg) 1241 #define IEM_MC_LIVENESS_GREG_MODIFY(a_iGReg) IEM_LIVENESS_GPR_MODIFY(a_iGReg) 1242 1243 #define IEM_MC_LIVENESS_MREG_INPUT(a_iMReg) NOP() 1244 #define IEM_MC_LIVENESS_MREG_CLOBBER(a_iMReg) NOP() 1245 #define IEM_MC_LIVENESS_MREG_MODIFY(a_iMReg) NOP() 1246 1247 #define IEM_MC_LIVENESS_XREG_INPUT(a_iXReg) NOP() 1248 #define IEM_MC_LIVENESS_XREG_CLOBBER(a_iXReg) NOP() 1249 #define IEM_MC_LIVENESS_XREG_MODIFY(a_iXReg) NOP() 1250 -
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs.h
r106036 r106037 247 247 iemNativeVarFreeAll(pReNative); \ 248 248 } return off 249 250 251 252 /********************************************************************************************************************************* 253 * Liveness Stubs * 254 *********************************************************************************************************************************/ 255 256 #define IEM_MC_LIVENESS_GREG_INPUT(a_iGReg) ((void)0) 257 #define IEM_MC_LIVENESS_GREG_CLOBBER(a_iGReg) ((void)0) 258 #define IEM_MC_LIVENESS_GREG_MODIFY(a_iGReg) ((void)0) 259 260 #define IEM_MC_LIVENESS_MREG_INPUT(a_iMReg) ((void)0) 261 #define IEM_MC_LIVENESS_MREG_CLOBBER(a_iMReg) ((void)0) 262 #define IEM_MC_LIVENESS_MREG_MODIFY(a_iMReg) ((void)0) 263 264 #define IEM_MC_LIVENESS_XREG_INPUT(a_iXReg) ((void)0) 265 #define IEM_MC_LIVENESS_XREG_CLOBBER(a_iXReg) ((void)0) 266 #define IEM_MC_LIVENESS_XREG_MODIFY(a_iXReg) ((void)0) 249 267 250 268 … … 5978 5996 { 5979 5997 uint8_t const idxEflReg = iemNativeRegAllocTmpForGuestReg(pReNative, &off, kIemNativeGstReg_EFlags, 5980 kIemNativeGstRegUse_ForUpdate, false /*fNoVolatileRegs*/); 5998 kIemNativeGstRegUse_ForUpdate, false /*fNoVolatileRegs*/, 5999 true /*fSkipLivenessAssert*/); /** @todo proper liveness / eflags fix */ 5981 6000 5982 6001 /* Using 'if constexpr' forces code elimination in debug builds with VC. */ -
trunk/src/VBox/VMM/VMMAll/target-x86/IEMAllN8veEmit-x86.h
r105491 r106037 2290 2290 { 2291 2291 #ifdef RT_ARCH_AMD64 2292 uint8_t const idxRegDst = iemNativeRegAllocTmpForGuestReg(pReNative, &off, IEMNATIVEGSTREG_GPR(idxGstRegDst), kIemNativeGstRegUse_ForFullWrite); 2293 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), 2294 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); 2292 uint8_t const idxRegDst = iemNativeRegAllocTmpForGuestReg(pReNative, &off, IEMNATIVEGSTREG_GPR(idxGstRegDst), 2293 kIemNativeGstRegUse_ForFullWrite); 2294 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, 2295 IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), 2296 kIemNativeGstSimdRegLdStSz_Low128, 2297 kIemNativeGstRegUse_ReadOnly); 2295 2298 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 5); 2296 2299 2297 2300 pCodeBuf[off++] = X86_OP_PRF_SIZE_OP; 2298 2301 if (idxRegDst >= 8 || idxSimdRegSrc >= 8) 2299 pCodeBuf[off++] = 2300 2302 pCodeBuf[off++] = (idxSimdRegSrc >= 8 ? X86_OP_REX_B : 0) 2303 | (idxRegDst >= 8 ? X86_OP_REX_R : 0); 2301 2304 pCodeBuf[off++] = 0x0f; 2302 2305 pCodeBuf[off++] = 0xd7; … … 2305 2308 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegSrc); 2306 2309 iemNativeRegFreeTmp(pReNative, idxRegDst); 2307 #elif defined(RT_ARCH_ARM64) 2308 uint8_t const idxRegDst = iemNativeRegAllocTmpForGuestReg(pReNative, &off, IEMNATIVEGSTREG_GPR(idxGstRegDst), kIemNativeGstRegUse_ForFullWrite); 2310 2311 #elif defined(RT_ARCH_ARM64) 2312 uint8_t const idxRegDst = iemNativeRegAllocTmpForGuestReg(pReNative, &off, IEMNATIVEGSTREG_GPR(idxGstRegDst), 2313 kIemNativeGstRegUse_ForFullWrite); 2309 2314 uint8_t const idxRegTmp = iemNativeRegAllocTmp(pReNative, &off); 2310 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), 2311 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_Calculation); 2315 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, 2316 IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), 2317 kIemNativeGstSimdRegLdStSz_Low128, 2318 kIemNativeGstRegUse_Calculation); 2312 2319 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 7); 2313 2320 … … 2316 2323 * for different approaches as NEON doesn't has an instruction equivalent for pmovmskb, so we have to emulate that. 2317 2324 * 2318 * As there is no way around emulating the exact semantics of pmovmskb we will use the same algorithm as the sse2neon implementation because 2319 * there we can get away with loading any constants and the base algorithm is only 4 NEON instructions (+ 3 for extracting the result to a general register). 2325 * As there is no way around emulating the exact semantics of pmovmskb we will use the same algorithm 2326 * as the sse2neon implementation because there we can get away with loading any constants and the 2327 * base algorithm is only 4 NEON instructions (+ 3 for extracting the result to a general register). 2320 2328 * 2321 2329 * The following illustrates the algorithm: … … 2347 2355 iemNativeRegFreeTmp(pReNative, idxRegTmp); 2348 2356 iemNativeRegFreeTmp(pReNative, idxRegDst); 2357 2349 2358 #else 2350 2359 # error "Port me" -
trunk/src/VBox/VMM/include/IEMMc.h
r105664 r106037 3311 3311 #define IEM_MC_HINT_FLUSH_GUEST_SHADOW(g_fGstShwFlush) ((void)0) 3312 3312 3313 /** Recompiler liveness info: input GPR */ 3314 #define IEM_MC_LIVENESS_GREG_INPUT(a_iGReg) ((void)0) 3315 /** Recompiler liveness info: clobbered GPR */ 3316 #define IEM_MC_LIVENESS_GREG_CLOBBER(a_iGReg) ((void)0) 3317 /** Recompiler liveness info: modified GPR register (i.e. input & output) */ 3318 #define IEM_MC_LIVENESS_GREG_MODIFY(a_iGReg) ((void)0) 3319 3320 /** Recompiler liveness info: input MM register */ 3321 #define IEM_MC_LIVENESS_MREG_INPUT(a_iMReg) ((void)0) 3322 /** Recompiler liveness info: clobbered MM register */ 3323 #define IEM_MC_LIVENESS_MREG_CLOBBER(a_iMReg) ((void)0) 3324 /** Recompiler liveness info: modified MM register (i.e. input & output) */ 3325 #define IEM_MC_LIVENESS_MREG_MODIFY(a_iMReg) ((void)0) 3326 3327 /** Recompiler liveness info: input SSE register */ 3328 #define IEM_MC_LIVENESS_XREG_INPUT(a_iXReg) ((void)0) 3329 /** Recompiler liveness info: clobbered SSE register */ 3330 #define IEM_MC_LIVENESS_XREG_CLOBBER(a_iXReg) ((void)0) 3331 /** Recompiler liveness info: modified SSE register (i.e. input & output) */ 3332 #define IEM_MC_LIVENESS_XREG_MODIFY(a_iXReg) ((void)0) 3333 3334 /** @todo add more as needed. */ 3335 3313 3336 /** @} */ 3314 3337 -
trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
r105652 r106037 1152 1152 #define IEM_MC_HINT_FLUSH_GUEST_SHADOW(g_fGstShwFlush) ((void)fMcBegin) 1153 1153 1154 #define IEM_MC_LIVENESS_GREG_INPUT(a_iGReg) ((void)a_iGReg) 1155 #define IEM_MC_LIVENESS_GREG_CLOBBER(a_iGReg) ((void)a_iGReg) 1156 #define IEM_MC_LIVENESS_GREG_MODIFY(a_iGReg) ((void)a_iGReg) 1157 1158 #define IEM_MC_LIVENESS_MREG_INPUT(a_iMReg) ((void)a_iMReg) 1159 #define IEM_MC_LIVENESS_MREG_CLOBBER(a_iMReg) ((void)a_iMReg) 1160 #define IEM_MC_LIVENESS_MREG_MODIFY(a_iMReg) ((void)a_iMReg) 1161 1162 #define IEM_MC_LIVENESS_XREG_INPUT(a_iXReg) ((void)a_iXReg) 1163 #define IEM_MC_LIVENESS_XREG_CLOBBER(a_iXReg) ((void)a_iXReg) 1164 #define IEM_MC_LIVENESS_XREG_MODIFY(a_iXReg) ((void)a_iXReg) 1165 1154 1166 /** @} */ 1155 1167
Note:
See TracChangeset
for help on using the changeset viewer.