Changeset 96034 in vbox
- Timestamp:
- Aug 4, 2022 8:00:12 PM (2 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r96032 r96034 3649 3649 IEMIMPL_MEDIA_F2 pabsw, 1 3650 3650 IEMIMPL_MEDIA_F2 pabsd, 1 3651 IEMIMPL_MEDIA_F2 psignb, 1 3652 IEMIMPL_MEDIA_F2 psignw, 1 3653 IEMIMPL_MEDIA_F2 psignd, 1 3651 3654 3652 3655 ;; … … 4184 4187 IEMIMPL_MEDIA_OPT_F3 vpavgb 4185 4188 IEMIMPL_MEDIA_OPT_F3 vpavgw 4189 IEMIMPL_MEDIA_OPT_F3 vpsignb 4190 IEMIMPL_MEDIA_OPT_F3 vpsignw 4191 IEMIMPL_MEDIA_OPT_F3 vpsignd 4186 4192 4187 4193 -
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r96032 r96034 12206 12206 12207 12207 /* 12208 * PSIGNB / VPSIGNB / PSIGNW / VPSIGNW / PSIGND / VPSIGND 12209 */ 12210 IEM_DECL_IMPL_DEF(void, iemAImpl_psignb_u64_fallback,(PCX86FXSTATE pFpuState, uint64_t *puDst, uint64_t const *puSrc)) 12211 { 12212 RTUINT64U uSrc1 = { *puDst }; 12213 RTUINT64U uSrc2 = { *puSrc }; 12214 RTUINT64U uDst; 12215 12216 for (uint32_t i = 0; i < RT_ELEMENTS(uDst.ai8); i++) 12217 { 12218 if (uSrc2.ai8[i] < 0) 12219 uDst.ai8[i] = -uSrc1.ai8[i]; 12220 else if (uSrc2.ai8[i] == 0) 12221 uDst.ai8[i] = 0; 12222 else /* uSrc2.ai8[i] > 0 */ 12223 uDst.ai8[i] = uSrc1.ai8[i]; 12224 } 12225 12226 *puDst = uDst.u; 12227 RT_NOREF(pFpuState); 12228 } 12229 12230 12231 IEM_DECL_IMPL_DEF(void, iemAImpl_psignb_u128_fallback,(PCX86FXSTATE pFpuState, PRTUINT128U puDst, PCRTUINT128U puSrc)) 12232 { 12233 RTUINT128U uSrc1 = *puDst; 12234 12235 for (uint32_t i = 0; i < RT_ELEMENTS(puDst->ai8); i++) 12236 { 12237 if (puSrc->ai8[i] < 0) 12238 puDst->ai8[i] = -uSrc1.ai8[i]; 12239 else if (puSrc->ai8[i] == 0) 12240 puDst->ai8[i] = 0; 12241 else /* puSrc->ai8[i] > 0 */ 12242 puDst->ai8[i] = uSrc1.ai8[i]; 12243 } 12244 12245 RT_NOREF(pFpuState); 12246 } 12247 12248 12249 IEM_DECL_IMPL_DEF(void, iemAImpl_psignw_u64_fallback,(PCX86FXSTATE pFpuState, uint64_t *puDst, uint64_t const *puSrc)) 12250 { 12251 RTUINT64U uSrc1 = { *puDst }; 12252 RTUINT64U uSrc2 = { *puSrc }; 12253 RTUINT64U uDst; 12254 12255 for (uint32_t i = 0; i < RT_ELEMENTS(uDst.ai16); i++) 12256 { 12257 if (uSrc2.ai16[i] < 0) 12258 uDst.ai16[i] = -uSrc1.ai16[i]; 12259 else if (uSrc2.ai16[i] == 0) 12260 uDst.ai16[i] = 0; 12261 else /* uSrc2.ai16[i] > 0 */ 12262 uDst.ai16[i] = uSrc1.ai16[i]; 12263 } 12264 12265 *puDst = uDst.u; 12266 RT_NOREF(pFpuState); 12267 } 12268 12269 12270 IEM_DECL_IMPL_DEF(void, iemAImpl_psignw_u128_fallback,(PCX86FXSTATE pFpuState, PRTUINT128U puDst, PCRTUINT128U puSrc)) 12271 { 12272 RTUINT128U uSrc1 = *puDst; 12273 12274 for (uint32_t i = 0; i < RT_ELEMENTS(puDst->ai16); i++) 12275 { 12276 if (puSrc->ai16[i] < 0) 12277 puDst->ai16[i] = -uSrc1.ai16[i]; 12278 else if (puSrc->ai16[i] == 0) 12279 puDst->ai16[i] = 0; 12280 else /* puSrc->ai16[i] > 0 */ 12281 puDst->ai16[i] = uSrc1.ai16[i]; 12282 } 12283 12284 RT_NOREF(pFpuState); 12285 } 12286 12287 12288 IEM_DECL_IMPL_DEF(void, iemAImpl_psignd_u64_fallback,(PCX86FXSTATE pFpuState, uint64_t *puDst, uint64_t const *puSrc)) 12289 { 12290 RTUINT64U uSrc1 = { *puDst }; 12291 RTUINT64U uSrc2 = { *puSrc }; 12292 RTUINT64U uDst; 12293 12294 for (uint32_t i = 0; i < RT_ELEMENTS(uDst.ai32); i++) 12295 { 12296 if (uSrc2.ai32[i] < 0) 12297 uDst.ai32[i] = -uSrc1.ai32[i]; 12298 else if (uSrc2.ai32[i] == 0) 12299 uDst.ai32[i] = 0; 12300 else /* uSrc2.ai32[i] > 0 */ 12301 uDst.ai32[i] = uSrc1.ai32[i]; 12302 } 12303 12304 *puDst = uDst.u; 12305 RT_NOREF(pFpuState); 12306 } 12307 12308 12309 IEM_DECL_IMPL_DEF(void, iemAImpl_psignd_u128_fallback,(PCX86FXSTATE pFpuState, PRTUINT128U puDst, PCRTUINT128U puSrc)) 12310 { 12311 RTUINT128U uSrc1 = *puDst; 12312 12313 for (uint32_t i = 0; i < RT_ELEMENTS(puDst->ai32); i++) 12314 { 12315 if (puSrc->ai32[i] < 0) 12316 puDst->ai32[i] = -uSrc1.ai32[i]; 12317 else if (puSrc->ai32[i] == 0) 12318 puDst->ai32[i] = 0; 12319 else /* puSrc->ai32[i] > 0 */ 12320 puDst->ai32[i] = uSrc1.ai32[i]; 12321 } 12322 12323 RT_NOREF(pFpuState); 12324 } 12325 12326 12327 IEM_DECL_IMPL_DEF(void, iemAImpl_vpsignb_u128_fallback,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2)) 12328 { 12329 for (uint32_t i = 0; i < RT_ELEMENTS(puDst->ai8); i++) 12330 { 12331 if (puSrc2->ai8[i] < 0) 12332 puDst->ai8[i] = -puSrc1->ai8[i]; 12333 else if (puSrc2->ai8[i] == 0) 12334 puDst->ai8[i] = 0; 12335 else /* puSrc2->ai8[i] > 0 */ 12336 puDst->ai8[i] = puSrc1->ai8[i]; 12337 } 12338 } 12339 12340 12341 IEM_DECL_IMPL_DEF(void, iemAImpl_vpsignb_u256_fallback,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2)) 12342 { 12343 for (uint32_t i = 0; i < RT_ELEMENTS(puDst->ai8); i++) 12344 { 12345 if (puSrc2->ai8[i] < 0) 12346 puDst->ai8[i] = -puSrc1->ai8[i]; 12347 else if (puSrc2->ai8[i] == 0) 12348 puDst->ai8[i] = 0; 12349 else /* puSrc2->ai8[i] > 0 */ 12350 puDst->ai8[i] = puSrc1->ai8[i]; 12351 } 12352 } 12353 12354 12355 IEM_DECL_IMPL_DEF(void, iemAImpl_vpsignw_u128_fallback,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2)) 12356 { 12357 for (uint32_t i = 0; i < RT_ELEMENTS(puDst->ai16); i++) 12358 { 12359 if (puSrc2->ai16[i] < 0) 12360 puDst->ai16[i] = -puSrc1->ai16[i]; 12361 else if (puSrc2->ai16[i] == 0) 12362 puDst->ai16[i] = 0; 12363 else /* puSrc2->ai16[i] > 0 */ 12364 puDst->ai16[i] = puSrc1->ai16[i]; 12365 } 12366 } 12367 12368 12369 IEM_DECL_IMPL_DEF(void, iemAImpl_vpsignw_u256_fallback,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2)) 12370 { 12371 for (uint32_t i = 0; i < RT_ELEMENTS(puDst->ai16); i++) 12372 { 12373 if (puSrc2->ai16[i] < 0) 12374 puDst->ai16[i] = -puSrc1->ai16[i]; 12375 else if (puSrc2->ai16[i] == 0) 12376 puDst->ai16[i] = 0; 12377 else /* puSrc2->ai16[i] > 0 */ 12378 puDst->ai16[i] = puSrc1->ai16[i]; 12379 } 12380 } 12381 12382 12383 IEM_DECL_IMPL_DEF(void, iemAImpl_vpsignd_u128_fallback,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2)) 12384 { 12385 for (uint32_t i = 0; i < RT_ELEMENTS(puDst->ai32); i++) 12386 { 12387 if (puSrc2->ai32[i] < 0) 12388 puDst->ai32[i] = -puSrc1->ai32[i]; 12389 else if (puSrc2->ai32[i] == 0) 12390 puDst->ai32[i] = 0; 12391 else /* puSrc2->ai32[i] > 0 */ 12392 puDst->ai32[i] = puSrc1->ai32[i]; 12393 } 12394 } 12395 12396 12397 IEM_DECL_IMPL_DEF(void, iemAImpl_vpsignd_u256_fallback,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2)) 12398 { 12399 for (uint32_t i = 0; i < RT_ELEMENTS(puDst->ai32); i++) 12400 { 12401 if (puSrc2->ai32[i] < 0) 12402 puDst->ai32[i] = -puSrc1->ai32[i]; 12403 else if (puSrc2->ai32[i] == 0) 12404 puDst->ai32[i] = 0; 12405 else /* puSrc2->ai32[i] > 0 */ 12406 puDst->ai32[i] = puSrc1->ai32[i]; 12407 } 12408 } 12409 12410 12411 /* 12208 12412 * CRC32 (SEE 4.2). 12209 12413 */ -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsThree0f38.cpp.h
r96032 r96034 305 305 /** Opcode 0x66 0x0f 0x38 0x07. */ 306 306 FNIEMOP_STUB(iemOp_phsubsw_Vx_Wx); 307 308 307 309 /** Opcode 0x0f 0x38 0x08. */ 308 FNIEMOP_STUB(iemOp_psignb_Pq_Qq); 310 FNIEMOP_DEF(iemOp_psignb_Pq_Qq) 311 { 312 IEMOP_MNEMONIC2(RM, PSIGNB, psignb, Pq, Qq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 313 return FNIEMOP_CALL_2(iemOpCommonMmx_FullFull_To_Full_Ex, 314 IEM_SELECT_HOST_OR_FALLBACK(fSsse3, iemAImpl_psignb_u64, &iemAImpl_psignb_u64_fallback), 315 IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSsse3); 316 } 317 318 309 319 /** Opcode 0x66 0x0f 0x38 0x08. */ 310 FNIEMOP_STUB(iemOp_psignb_Vx_Wx); 320 FNIEMOP_DEF(iemOp_psignb_Vx_Wx) 321 { 322 IEMOP_MNEMONIC2(RM, PSIGNB, psignb, Vx, Wx, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 323 return FNIEMOP_CALL_1(iemOpCommonSsse3_FullFull_To_Full, 324 IEM_SELECT_HOST_OR_FALLBACK(fSsse3, iemAImpl_psignb_u128, iemAImpl_psignb_u128_fallback)); 325 326 } 327 328 311 329 /** Opcode 0x0f 0x38 0x09. */ 312 FNIEMOP_STUB(iemOp_psignw_Pq_Qq); 330 FNIEMOP_DEF(iemOp_psignw_Pq_Qq) 331 { 332 IEMOP_MNEMONIC2(RM, PSIGNW, psignw, Pq, Qq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 333 return FNIEMOP_CALL_2(iemOpCommonMmx_FullFull_To_Full_Ex, 334 IEM_SELECT_HOST_OR_FALLBACK(fSsse3, iemAImpl_psignw_u64, &iemAImpl_psignw_u64_fallback), 335 IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSsse3); 336 } 337 338 313 339 /** Opcode 0x66 0x0f 0x38 0x09. */ 314 FNIEMOP_STUB(iemOp_psignw_Vx_Wx); 340 FNIEMOP_DEF(iemOp_psignw_Vx_Wx) 341 { 342 IEMOP_MNEMONIC2(RM, PSIGNW, psignw, Vx, Wx, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 343 return FNIEMOP_CALL_1(iemOpCommonSsse3_FullFull_To_Full, 344 IEM_SELECT_HOST_OR_FALLBACK(fSsse3, iemAImpl_psignw_u128, iemAImpl_psignw_u128_fallback)); 345 346 } 347 348 315 349 /** Opcode 0x0f 0x38 0x0a. */ 316 FNIEMOP_STUB(iemOp_psignd_Pq_Qq); 350 FNIEMOP_DEF(iemOp_psignd_Pq_Qq) 351 { 352 IEMOP_MNEMONIC2(RM, PSIGND, psignd, Pq, Qq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 353 return FNIEMOP_CALL_2(iemOpCommonMmx_FullFull_To_Full_Ex, 354 IEM_SELECT_HOST_OR_FALLBACK(fSsse3, iemAImpl_psignd_u64, &iemAImpl_psignd_u64_fallback), 355 IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSsse3); 356 } 357 358 317 359 /** Opcode 0x66 0x0f 0x38 0x0a. */ 318 FNIEMOP_STUB(iemOp_psignd_Vx_Wx); 360 FNIEMOP_DEF(iemOp_psignd_Vx_Wx) 361 { 362 IEMOP_MNEMONIC2(RM, PSIGND, psignd, Vx, Wx, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 363 return FNIEMOP_CALL_1(iemOpCommonSsse3_FullFull_To_Full, 364 IEM_SELECT_HOST_OR_FALLBACK(fSsse3, iemAImpl_psignd_u128, iemAImpl_psignd_u128_fallback)); 365 366 } 367 368 319 369 /** Opcode 0x0f 0x38 0x0b. */ 320 370 FNIEMOP_STUB(iemOp_pmulhrsw_Pq_Qq); -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsVexMap2.cpp.h
r96032 r96034 58 58 FNIEMOP_STUB(iemOp_vphsubsw_Vx_Hx_Wx); 59 59 /* Opcode VEX.0F38 0x08 - invalid. */ 60 61 60 62 /** Opcode VEX.66.0F38 0x08. */ 61 FNIEMOP_STUB(iemOp_vpsignb_Vx_Hx_Wx); 63 FNIEMOP_DEF(iemOp_vpsignb_Vx_Hx_Wx) 64 { 65 IEMOP_MNEMONIC3(VEX_RVM, VPSIGNB, vpsignb, Vx, Hx, Wx, DISOPTYPE_HARMLESS, 0); 66 IEMOPMEDIAOPTF3_INIT_VARS(vpsignb); 67 return FNIEMOP_CALL_1(iemOpCommonAvxAvx2_Vx_Hx_Wx_Opt, IEM_SELECT_HOST_OR_FALLBACK(fAvx2, &s_Host, &s_Fallback)); 68 } 69 70 62 71 /* Opcode VEX.0F38 0x09 - invalid. */ 72 73 63 74 /** Opcode VEX.66.0F38 0x09. */ 64 FNIEMOP_STUB(iemOp_vpsignw_Vx_Hx_Wx); 75 FNIEMOP_DEF(iemOp_vpsignw_Vx_Hx_Wx) 76 { 77 IEMOP_MNEMONIC3(VEX_RVM, VPSIGNW, vpsignw, Vx, Hx, Wx, DISOPTYPE_HARMLESS, 0); 78 IEMOPMEDIAOPTF3_INIT_VARS(vpsignw); 79 return FNIEMOP_CALL_1(iemOpCommonAvxAvx2_Vx_Hx_Wx_Opt, IEM_SELECT_HOST_OR_FALLBACK(fAvx2, &s_Host, &s_Fallback)); 80 } 81 82 65 83 /* Opcode VEX.0F38 0x0a - invalid. */ 84 85 66 86 /** Opcode VEX.66.0F38 0x0a. */ 67 FNIEMOP_STUB(iemOp_vpsignd_Vx_Hx_Wx); 87 FNIEMOP_DEF(iemOp_vpsignd_Vx_Hx_Wx) 88 { 89 IEMOP_MNEMONIC3(VEX_RVM, VPSIGND, vpsignd, Vx, Hx, Wx, DISOPTYPE_HARMLESS, 0); 90 IEMOPMEDIAOPTF3_INIT_VARS(vpsignd); 91 return FNIEMOP_CALL_1(iemOpCommonAvxAvx2_Vx_Hx_Wx_Opt, IEM_SELECT_HOST_OR_FALLBACK(fAvx2, &s_Host, &s_Fallback)); 92 } 93 94 68 95 /* Opcode VEX.0F38 0x0b - invalid. */ 69 96 /** Opcode VEX.66.0F38 0x0b. */ -
trunk/src/VBox/VMM/include/IEMInternal.h
r96032 r96034 1784 1784 FNIEMAIMPLMEDIAF2U64 iemAImpl_pabsw_u64, iemAImpl_pabsw_u64_fallback; 1785 1785 FNIEMAIMPLMEDIAF2U64 iemAImpl_pabsd_u64, iemAImpl_pabsd_u64_fallback; 1786 FNIEMAIMPLMEDIAF2U64 iemAImpl_psignb_u64, iemAImpl_psignb_u64_fallback; 1787 FNIEMAIMPLMEDIAF2U64 iemAImpl_psignw_u64, iemAImpl_psignw_u64_fallback; 1788 FNIEMAIMPLMEDIAF2U64 iemAImpl_psignd_u64, iemAImpl_psignd_u64_fallback; 1786 1789 FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_psllw_u64, iemAImpl_psrlw_u64, iemAImpl_psraw_u64; 1787 1790 FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_pslld_u64, iemAImpl_psrld_u64, iemAImpl_psrad_u64; … … 1825 1828 FNIEMAIMPLMEDIAF2U128 iemAImpl_pabsw_u128, iemAImpl_pabsw_u128_fallback; 1826 1829 FNIEMAIMPLMEDIAF2U128 iemAImpl_pabsd_u128, iemAImpl_pabsd_u128_fallback; 1830 FNIEMAIMPLMEDIAF2U128 iemAImpl_psignb_u128, iemAImpl_psignb_u128_fallback; 1831 FNIEMAIMPLMEDIAF2U128 iemAImpl_psignw_u128, iemAImpl_psignw_u128_fallback; 1832 FNIEMAIMPLMEDIAF2U128 iemAImpl_psignd_u128, iemAImpl_psignd_u128_fallback; 1827 1833 FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_packsswb_u128, iemAImpl_packuswb_u128; 1828 1834 FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_packssdw_u128, iemAImpl_packusdw_u128; … … 1876 1882 FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpavgb_u128, iemAImpl_vpavgb_u128_fallback; 1877 1883 FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpavgw_u128, iemAImpl_vpavgw_u128_fallback; 1884 FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpsignb_u128, iemAImpl_vpsignb_u128_fallback; 1885 FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpsignw_u128, iemAImpl_vpsignw_u128_fallback; 1886 FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpsignd_u128, iemAImpl_vpsignd_u128_fallback; 1878 1887 1879 1888 FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_vpabsb_u128, iemAImpl_vpabsb_u128_fallback; … … 1924 1933 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpavgb_u256, iemAImpl_vpavgb_u256_fallback; 1925 1934 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpavgw_u256, iemAImpl_vpavgw_u256_fallback; 1935 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsignb_u256, iemAImpl_vpsignb_u256_fallback; 1936 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsignw_u256, iemAImpl_vpsignw_u256_fallback; 1937 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsignd_u256, iemAImpl_vpsignd_u256_fallback; 1926 1938 1927 1939 FNIEMAIMPLMEDIAOPTF2U256 iemAImpl_vpabsb_u256, iemAImpl_vpabsb_u256_fallback;
Note:
See TracChangeset
for help on using the changeset viewer.