Changeset 104348 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Apr 17, 2024 2:41:37 PM (10 months ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstTwoByte0f.cpp.h
r104339 r104348 6808 6808 { 6809 6809 IEMOP_MNEMONIC2(RM, PCMPEQB, pcmpeqb, Vx, Wx, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 6810 return FNIEMOP_CALL_1(iemOpCommonSse2Opt_FullFull_To_Full, iemAImpl_pcmpeqb_u128);6810 SSE2_OPT_BODY_FullFull_To_Full(pcmpeqb, iemAImpl_pcmpeqb_u128, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64); 6811 6811 } 6812 6812 … … 6828 6828 { 6829 6829 IEMOP_MNEMONIC2(RM, PCMPEQW, pcmpeqw, Vx, Wx, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 6830 return FNIEMOP_CALL_1(iemOpCommonSse2Opt_FullFull_To_Full, iemAImpl_pcmpeqw_u128);6830 SSE2_OPT_BODY_FullFull_To_Full(pcmpeqw, iemAImpl_pcmpeqw_u128, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64); 6831 6831 } 6832 6832 … … 6848 6848 { 6849 6849 IEMOP_MNEMONIC2(RM, PCMPEQD, pcmpeqd, Vx, Wx, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 6850 return FNIEMOP_CALL_1(iemOpCommonSse2Opt_FullFull_To_Full, iemAImpl_pcmpeqd_u128);6850 SSE2_OPT_BODY_FullFull_To_Full(pcmpeqd, iemAImpl_pcmpeqd_u128, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64); 6851 6851 } 6852 6852 -
trunk/src/VBox/VMM/VMMAll/target-x86/IEMAllN8veEmit-x86.h
r104339 r104348 2251 2251 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(psubq, true /*a_fSub*/, kArmv8VecInstrArithSz_64, 0xfb); 2252 2252 2253 2254 /** 2255 * Common emitter for the pcmpeqb/pcmpeqw/pcmpeqd instructions. 2256 */ 2257 #ifdef RT_ARCH_AMD64 2258 # define IEMNATIVE_NATIVE_EMIT_PCMP_U128(a_Instr, a_enmOp, a_ArmElemSz, a_bOpcX86) \ 2259 DECL_INLINE_THROW(uint32_t) \ 2260 RT_CONCAT3(iemNativeEmit_,a_Instr,_rr_u128)(PIEMRECOMPILERSTATE pReNative, uint32_t off, \ 2261 uint8_t const idxSimdGstRegDst, uint8_t const idxSimdGstRegSrc) \ 2262 { \ 2263 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegDst), \ 2264 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForUpdate); \ 2265 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), \ 2266 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); \ 2267 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 5); \ 2268 pCodeBuf[off++] = X86_OP_PRF_SIZE_OP; \ 2269 if (idxSimdRegDst >= 8 || idxSimdRegSrc >= 8) \ 2270 pCodeBuf[off++] = (idxSimdRegSrc >= 8 ? X86_OP_REX_B : 0) \ 2271 | (idxSimdRegDst >= 8 ? X86_OP_REX_R : 0); \ 2272 pCodeBuf[off++] = 0x0f; \ 2273 pCodeBuf[off++] = (a_bOpcX86); \ 2274 pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, idxSimdRegDst & 7, idxSimdRegSrc & 7); \ 2275 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); \ 2276 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegSrc); \ 2277 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); \ 2278 return off; \ 2279 } \ 2280 DECL_INLINE_THROW(uint32_t) \ 2281 RT_CONCAT3(iemNativeEmit_,a_Instr,_rv_u128)(PIEMRECOMPILERSTATE pReNative, uint32_t off, \ 2282 uint8_t const idxSimdGstRegDst, uint8_t const idxVarSrc) \ 2283 { \ 2284 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegDst), \ 2285 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForUpdate); \ 2286 uint8_t const idxSimdRegSrc = iemNativeVarSimdRegisterAcquire(pReNative, idxVarSrc, &off, true /*fInitialized*/); \ 2287 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 5); \ 2288 pCodeBuf[off++] = X86_OP_PRF_SIZE_OP; \ 2289 if (idxSimdRegDst >= 8 || idxSimdRegSrc >= 8) \ 2290 pCodeBuf[off++] = (idxSimdRegSrc >= 8 ? X86_OP_REX_B : 0) \ 2291 | (idxSimdRegDst >= 8 ? X86_OP_REX_R : 0); \ 2292 pCodeBuf[off++] = 0x0f; \ 2293 pCodeBuf[off++] = (a_bOpcX86); \ 2294 pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, idxSimdRegDst & 7, idxSimdRegSrc & 7); \ 2295 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); \ 2296 iemNativeVarRegisterRelease(pReNative, idxVarSrc); \ 2297 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); \ 2298 return off; \ 2299 } \ 2300 typedef int ignore_semicolon 2301 #elif defined(RT_ARCH_ARM64) 2302 # define IEMNATIVE_NATIVE_EMIT_PCMP_U128(a_Instr, a_enmOp, a_ArmElemSz, a_bOpcX86) \ 2303 DECL_INLINE_THROW(uint32_t) \ 2304 RT_CONCAT3(iemNativeEmit_,a_Instr,_rr_u128)(PIEMRECOMPILERSTATE pReNative, uint32_t off, \ 2305 uint8_t const idxSimdGstRegDst, uint8_t const idxSimdGstRegSrc) \ 2306 { \ 2307 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegDst), \ 2308 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForUpdate); \ 2309 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), \ 2310 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); \ 2311 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1); \ 2312 pCodeBuf[off++] = Armv8A64MkVecInstrCmp((a_enmOp), idxSimdRegDst, idxSimdRegDst, idxSimdRegSrc, (a_ArmElemSz)); \ 2313 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); \ 2314 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegSrc); \ 2315 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); \ 2316 return off; \ 2317 } \ 2318 DECL_INLINE_THROW(uint32_t) \ 2319 RT_CONCAT3(iemNativeEmit_,a_Instr,_rv_u128)(PIEMRECOMPILERSTATE pReNative, uint32_t off, \ 2320 uint8_t const idxSimdGstRegDst, uint8_t const idxVarSrc) \ 2321 { \ 2322 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegDst), \ 2323 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForUpdate); \ 2324 uint8_t const idxSimdRegSrc = iemNativeVarSimdRegisterAcquire(pReNative, idxVarSrc, &off, true /*fInitialized*/); \ 2325 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1); \ 2326 pCodeBuf[off++] = Armv8A64MkVecInstrCmp((a_enmOp), idxSimdRegDst, idxSimdRegDst, idxSimdRegSrc, (a_ArmElemSz)); \ 2327 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); \ 2328 iemNativeVarRegisterRelease(pReNative, idxVarSrc); \ 2329 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); \ 2330 return off; \ 2331 } \ 2332 typedef int ignore_semicolon 2333 #else 2334 # error "Port me" 2335 #endif 2336 2337 IEMNATIVE_NATIVE_EMIT_PCMP_U128(pcmpeqb, kArmv8VecInstrCmpOp_Eq, kArmv8VecInstrArithSz_8, 0x74); 2338 IEMNATIVE_NATIVE_EMIT_PCMP_U128(pcmpeqw, kArmv8VecInstrCmpOp_Eq, kArmv8VecInstrArithSz_16, 0x75); 2339 IEMNATIVE_NATIVE_EMIT_PCMP_U128(pcmpeqd, kArmv8VecInstrCmpOp_Eq, kArmv8VecInstrArithSz_32, 0x76); 2340 2253 2341 #endif /* IEMNATIVE_WITH_SIMD_REG_ALLOCATOR */ 2254 2342
Note:
See TracChangeset
for help on using the changeset viewer.