Changeset 104298 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Apr 11, 2024 5:48:34 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
r104294 r104298 12846 12846 { 12847 12847 IEMOP_MNEMONIC2(RM, PADDQ, paddq, Vx, Wx, DISOPTYPE_HARMLESS | DISOPTYPE_X86_SSE, IEMOPHINT_IGNORES_OP_SIZES); 12848 return FNIEMOP_CALL_1(iemOpCommonSse2Opt_FullFull_To_Full, iemAImpl_paddq_u128);12848 SSE2_OPT_BODY_FullFull_To_Full(paddq, iemAImpl_paddq_u128, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64); 12849 12849 } 12850 12850 … … 13870 13870 { 13871 13871 IEMOP_MNEMONIC2(RM, PADDB, paddb, Vx, Wx, DISOPTYPE_HARMLESS | DISOPTYPE_X86_SSE, IEMOPHINT_IGNORES_OP_SIZES); 13872 return FNIEMOP_CALL_1(iemOpCommonSse2Opt_FullFull_To_Full, iemAImpl_paddb_u128);13872 SSE2_OPT_BODY_FullFull_To_Full(paddb, iemAImpl_paddb_u128, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64); 13873 13873 } 13874 13874 … … 13889 13889 { 13890 13890 IEMOP_MNEMONIC2(RM, PADDW, paddw, Vx, Wx, DISOPTYPE_HARMLESS | DISOPTYPE_X86_SSE, IEMOPHINT_IGNORES_OP_SIZES); 13891 return FNIEMOP_CALL_1(iemOpCommonSse2Opt_FullFull_To_Full, iemAImpl_paddw_u128);13891 SSE2_OPT_BODY_FullFull_To_Full(paddw, iemAImpl_paddw_u128, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64); 13892 13892 } 13893 13893 … … 13908 13908 { 13909 13909 IEMOP_MNEMONIC2(RM, PADDD, paddd, Vx, Wx, DISOPTYPE_HARMLESS | DISOPTYPE_X86_SSE, IEMOPHINT_IGNORES_OP_SIZES); 13910 return FNIEMOP_CALL_1(iemOpCommonSse2Opt_FullFull_To_Full, iemAImpl_paddd_u128);13910 SSE2_OPT_BODY_FullFull_To_Full(paddd, iemAImpl_paddd_u128, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64); 13911 13911 } 13912 13912 -
trunk/src/VBox/VMM/VMMAll/target-x86/IEMAllN8veEmit-x86.h
r104294 r104298 2153 2153 IEMNATIVE_NATIVE_EMIT_SHIFT_LEFT_IMM_U128(psllq, 64, kArmv8InstrShiftSz_U64, 0x73); 2154 2154 2155 2156 /** 2157 * Common emitter for the paddX/psubX instructions. 2158 */ 2159 #ifdef RT_ARCH_AMD64 2160 # define IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(a_Instr, a_fSub, a_ArmElemSz, a_bOpcX86) \ 2161 DECL_INLINE_THROW(uint32_t) \ 2162 RT_CONCAT3(iemNativeEmit_,a_Instr,_rr_u128)(PIEMRECOMPILERSTATE pReNative, uint32_t off, \ 2163 uint8_t const idxSimdGstRegDst, uint8_t const idxSimdGstRegSrc) \ 2164 { \ 2165 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegDst), \ 2166 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForUpdate); \ 2167 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), \ 2168 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); \ 2169 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 5); \ 2170 pCodeBuf[off++] = X86_OP_PRF_SIZE_OP; \ 2171 if (idxSimdRegDst >= 8 || idxSimdRegSrc >= 8) \ 2172 pCodeBuf[off++] = (idxSimdRegSrc >= 8 ? X86_OP_REX_B : 0) \ 2173 | (idxSimdRegDst >= 8 ? X86_OP_REX_R : 0); \ 2174 pCodeBuf[off++] = 0x0f; \ 2175 pCodeBuf[off++] = (a_bOpcX86); \ 2176 pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, idxSimdRegDst & 7, idxSimdRegSrc & 7); \ 2177 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); \ 2178 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegSrc); \ 2179 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); \ 2180 return off; \ 2181 } \ 2182 DECL_INLINE_THROW(uint32_t) \ 2183 RT_CONCAT3(iemNativeEmit_,a_Instr,_rv_u128)(PIEMRECOMPILERSTATE pReNative, uint32_t off, \ 2184 uint8_t const idxSimdGstRegDst, uint8_t const idxVarSrc) \ 2185 { \ 2186 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegDst), \ 2187 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForUpdate); \ 2188 uint8_t const idxSimdRegSrc = iemNativeVarSimdRegisterAcquire(pReNative, idxVarSrc, &off, true /*fInitialized*/); \ 2189 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 5); \ 2190 pCodeBuf[off++] = X86_OP_PRF_SIZE_OP; \ 2191 if (idxSimdRegDst >= 8 || idxSimdRegSrc >= 8) \ 2192 pCodeBuf[off++] = (idxSimdRegSrc >= 8 ? X86_OP_REX_B : 0) \ 2193 | (idxSimdRegDst >= 8 ? X86_OP_REX_R : 0); \ 2194 pCodeBuf[off++] = 0x0f; \ 2195 pCodeBuf[off++] = (a_bOpcX86); \ 2196 pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, idxSimdRegDst & 7, idxSimdRegSrc & 7); \ 2197 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); \ 2198 iemNativeVarRegisterRelease(pReNative, idxVarSrc); \ 2199 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); \ 2200 return off; \ 2201 } 2202 #elif defined(RT_ARCH_ARM64) 2203 # define IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(a_Instr, a_fSub, a_ArmElemSz, a_bOpcX86) \ 2204 DECL_INLINE_THROW(uint32_t) \ 2205 RT_CONCAT3(iemNativeEmit_,a_Instr,_rr_u128)(PIEMRECOMPILERSTATE pReNative, uint32_t off, \ 2206 uint8_t const idxSimdGstRegDst, uint8_t const idxSimdGstRegSrc) \ 2207 { \ 2208 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegDst), \ 2209 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForUpdate); \ 2210 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), \ 2211 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); \ 2212 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1); \ 2213 pCodeBuf[off++] = Armv8A64MkVecInstrAddSub((a_fSub), idxSimdRegDst, idxSimdRegDst, idxSimdRegSrc, (a_ArmElemSz)); \ 2214 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); \ 2215 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegSrc); \ 2216 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); \ 2217 return off; \ 2218 } \ 2219 DECL_INLINE_THROW(uint32_t) \ 2220 RT_CONCAT3(iemNativeEmit_,a_Instr,_rv_u128)(PIEMRECOMPILERSTATE pReNative, uint32_t off, \ 2221 uint8_t const idxSimdGstRegDst, uint8_t const idxVarSrc) \ 2222 { \ 2223 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegDst), \ 2224 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForUpdate); \ 2225 uint8_t const idxSimdRegSrc = iemNativeVarSimdRegisterAcquire(pReNative, idxVarSrc, &off, true /*fInitialized*/); \ 2226 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1); \ 2227 pCodeBuf[off++] = Armv8A64MkVecInstrAddSub((a_fSub), idxSimdRegDst, idxSimdRegDst, idxSimdRegSrc, (a_ArmElemSz)); \ 2228 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); \ 2229 iemNativeVarRegisterRelease(pReNative, idxVarSrc); \ 2230 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); \ 2231 return off; \ 2232 } 2233 #else 2234 # error "Port me" 2235 #endif 2236 2237 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(paddb, false /*a_fSub*/, kArmv8VecInstrArithSz_8, 0xfc); 2238 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(paddw, false /*a_fSub*/, kArmv8VecInstrArithSz_16, 0xfd); 2239 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(paddd, false /*a_fSub*/, kArmv8VecInstrArithSz_32, 0xfe); 2240 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(paddq, false /*a_fSub*/, kArmv8VecInstrArithSz_64, 0xd4); 2241 2242 //IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(psubb, true /*a_fSub*/, kArmv8VecInstrArithSz_8, 0xf8); 2243 //IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(psubw, true /*a_fSub*/, kArmv8VecInstrArithSz_16, 0xf9); 2244 //IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(psubd, true /*a_fSub*/, kArmv8VecInstrArithSz_32, 0xfa); 2245 //IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(psubq, true /*a_fSub*/, kArmv8VecInstrArithSz_64, 0xfb); 2246 2155 2247 #endif 2156 2248
Note:
See TracChangeset
for help on using the changeset viewer.