VirtualBox

Changeset 105407 in vbox


Ignore:
Timestamp:
Jul 18, 2024 5:54:12 PM (6 months ago)
Author:
vboxsync
Message:

VMM/IEM: Implement native emitters for pmovzxbw/pmovzxwd/pmovzxdq/pmovsxbw/pmovsxwd/pmovsxdq instruction emulations, bugref:10652 [fix, the register allocation order is important]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/target-x86/IEMAllN8veEmit-x86.h

    r105399 r105407  
    24512451                                                uint8_t const idxSimdGstRegDst, uint8_t const idxSimdGstRegSrc) \
    24522452    { \
     2453        /* \
     2454         * The order of register allocation is important here when idxSimdGstRegSrc == idxSimdGstRegDst, \
     2455         * if _ForFullWrite is allocated first the register won't be initialized. \
     2456         */ \
     2457        uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), \
     2458                                                                              kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); \
    24532459        uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegDst), \
    24542460                                                                              kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForFullWrite); \
    2455         uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), \
    2456                                                                               kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); \
    24572461        PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 6); \
    24582462        pCodeBuf[off++] = X86_OP_PRF_SIZE_OP; \
     
    25062510                                                uint8_t const idxSimdGstRegDst, uint8_t const idxSimdGstRegSrc) \
    25072511    { \
     2512        /* \
     2513         * The order of register allocation is important here when idxSimdGstRegSrc == idxSimdGstRegDst, \
     2514         * if _ForFullWrite is allocated first the register won't be initialized. \
     2515         */ \
     2516        uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), \
     2517                                                                              kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); \
    25082518        uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegDst), \
    25092519                                                                              kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForFullWrite); \
    2510         uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(idxSimdGstRegSrc), \
    2511                                                                               kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); \
    25122520        PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1); \
    25132521        pCodeBuf[off++] = Armv8A64MkVecInstrUShll(idxSimdRegDst, idxSimdRegSrc, 0, (a_ArmElemSz), (a_fArmUnsigned)); \
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette