Changeset 106037 in vbox for trunk/src/VBox/VMM/VMMAll/target-x86
- Timestamp:
- Sep 12, 2024 3:17:06 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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"
Note:
See TracChangeset
for help on using the changeset viewer.